summaryrefslogtreecommitdiff
path: root/profiles/prefix
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/prefix')
-rw-r--r--profiles/prefix/aix/5.2.0.0/eapi1
-rw-r--r--profiles/prefix/aix/5.2.0.0/parent1
-rw-r--r--profiles/prefix/aix/5.2.0.0/ppc/eapi1
-rw-r--r--profiles/prefix/aix/5.2.0.0/ppc/make.defaults6
-rw-r--r--profiles/prefix/aix/5.2.0.0/ppc/parent1
-rw-r--r--profiles/prefix/aix/5.3.0.0/eapi1
-rw-r--r--profiles/prefix/aix/5.3.0.0/parent1
-rw-r--r--profiles/prefix/aix/5.3.0.0/ppc/eapi1
-rw-r--r--profiles/prefix/aix/5.3.0.0/ppc/make.defaults6
-rw-r--r--profiles/prefix/aix/5.3.0.0/ppc/parent1
-rw-r--r--profiles/prefix/aix/6.1.0.0/eapi1
-rw-r--r--profiles/prefix/aix/6.1.0.0/parent1
-rw-r--r--profiles/prefix/aix/6.1.0.0/ppc/eapi1
-rw-r--r--profiles/prefix/aix/6.1.0.0/ppc/make.defaults6
-rw-r--r--profiles/prefix/aix/6.1.0.0/ppc/parent1
-rw-r--r--profiles/prefix/aix/7.1.0.0/eapi1
-rw-r--r--profiles/prefix/aix/7.1.0.0/parent1
-rw-r--r--profiles/prefix/aix/7.1.0.0/ppc/eapi1
-rw-r--r--profiles/prefix/aix/7.1.0.0/ppc/make.defaults6
-rw-r--r--profiles/prefix/aix/7.1.0.0/ppc/parent1
-rw-r--r--profiles/prefix/aix/7.2.0.0/eapi1
-rw-r--r--profiles/prefix/aix/7.2.0.0/parent1
-rw-r--r--profiles/prefix/aix/7.2.0.0/ppc/eapi1
-rw-r--r--profiles/prefix/aix/7.2.0.0/ppc/make.defaults6
-rw-r--r--profiles/prefix/aix/7.2.0.0/ppc/parent1
-rw-r--r--profiles/prefix/aix/eapi1
-rw-r--r--profiles/prefix/aix/make.defaults19
-rw-r--r--profiles/prefix/aix/package.mask14
-rw-r--r--profiles/prefix/aix/package.unmask15
-rw-r--r--profiles/prefix/aix/package.use.force6
-rw-r--r--profiles/prefix/aix/package.use.mask10
-rw-r--r--profiles/prefix/aix/packages9
-rw-r--r--profiles/prefix/aix/parent3
-rw-r--r--profiles/prefix/aix/profile.bashrc14
-rw-r--r--profiles/prefix/aix/use.force9
-rw-r--r--profiles/prefix/aix/use.mask29
-rw-r--r--profiles/prefix/darwin/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.10/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.10/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/10.10/package.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.10/package.unmask7
-rw-r--r--profiles/prefix/darwin/macos/10.10/package.use.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.10/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.10/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.10/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.10/x64/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.10/x64/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.10/x64/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.10/x64/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.10/x64/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.10/x64/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.10/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.10/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.10/x86/package.mask9
-rw-r--r--profiles/prefix/darwin/macos/10.10/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.10/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.10/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.10/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.11/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.11/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/10.11/package.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.11/package.unmask7
-rw-r--r--profiles/prefix/darwin/macos/10.11/package.use.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.11/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.11/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.11/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.11/x64/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.11/x64/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.11/x64/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.11/x64/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.11/x64/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.11/x64/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.11/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.11/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.11/x86/package.mask9
-rw-r--r--profiles/prefix/darwin/macos/10.11/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.11/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.11/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.11/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.12/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.12/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/10.12/package.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.12/package.unmask7
-rw-r--r--profiles/prefix/darwin/macos/10.12/package.use.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.12/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.12/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.12/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.12/x64/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.12/x64/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.12/x64/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.12/x64/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.12/x64/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.12/x64/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.12/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.12/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.12/x86/package.mask9
-rw-r--r--profiles/prefix/darwin/macos/10.12/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.12/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.12/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.12/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.13/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.13/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/10.13/package.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.13/package.unmask7
-rw-r--r--profiles/prefix/darwin/macos/10.13/package.use.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.13/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.13/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.13/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.13/x64/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.13/x64/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.13/x64/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.13/x64/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.13/x64/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.13/x64/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.13/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.13/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.13/x86/package.mask9
-rw-r--r--profiles/prefix/darwin/macos/10.13/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.13/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.13/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.13/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.4/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.4/make.defaults4
-rw-r--r--profiles/prefix/darwin/macos/10.4/package.mask15
-rw-r--r--profiles/prefix/darwin/macos/10.4/package.use.mask12
-rw-r--r--profiles/prefix/darwin/macos/10.4/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.4/ppc/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.4/ppc/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.4/ppc/package.mask3
-rw-r--r--profiles/prefix/darwin/macos/10.4/ppc/package.use.mask3
-rw-r--r--profiles/prefix/darwin/macos/10.4/ppc/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.4/ppc/use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.4/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.4/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.4/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.4/x86/package.unmask2
-rw-r--r--profiles/prefix/darwin/macos/10.4/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.4/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.4/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.4/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.5/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.5/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/10.5/package.mask12
-rw-r--r--profiles/prefix/darwin/macos/10.5/package.use.mask12
-rw-r--r--profiles/prefix/darwin/macos/10.5/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.5/ppc/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.5/ppc/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.5/ppc/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.5/ppc/package.unmask2
-rw-r--r--profiles/prefix/darwin/macos/10.5/ppc/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.5/ppc/package.use.mask8
-rw-r--r--profiles/prefix/darwin/macos/10.5/ppc/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.5/ppc/use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.5/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.5/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.5/x64/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.5/x64/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.5/x64/package.unmask3
-rw-r--r--profiles/prefix/darwin/macos/10.5/x64/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.5/x64/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.5/x64/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.5/x64/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.5/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.5/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.5/x86/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.5/x86/package.unmask3
-rw-r--r--profiles/prefix/darwin/macos/10.5/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.5/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.5/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.5/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.6/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.6/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/10.6/package.use.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.6/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.6/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.6/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.6/x64/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.6/x64/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.6/x64/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.6/x64/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.6/x64/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.6/x64/use.mask36
-rw-r--r--profiles/prefix/darwin/macos/10.6/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.6/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.6/x86/package.mask3
-rw-r--r--profiles/prefix/darwin/macos/10.6/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.6/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.6/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.6/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.7/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.7/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/10.7/package.use.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.7/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.7/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.7/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.7/x64/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.7/x64/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.7/x64/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.7/x64/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.7/x64/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.7/x64/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.7/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.7/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.7/x86/package.mask9
-rw-r--r--profiles/prefix/darwin/macos/10.7/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.7/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.7/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.7/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.8/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.8/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/10.8/package.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.8/package.unmask7
-rw-r--r--profiles/prefix/darwin/macos/10.8/package.use.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.8/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.8/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.8/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.8/x64/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.8/x64/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.8/x64/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.8/x64/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.8/x64/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.8/x64/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.8/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.8/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.8/x86/package.mask9
-rw-r--r--profiles/prefix/darwin/macos/10.8/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.8/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.8/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.8/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.9/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.9/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/10.9/package.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.9/package.unmask7
-rw-r--r--profiles/prefix/darwin/macos/10.9/package.use.mask7
-rw-r--r--profiles/prefix/darwin/macos/10.9/parent1
-rw-r--r--profiles/prefix/darwin/macos/10.9/profile.bashrc4
-rw-r--r--profiles/prefix/darwin/macos/10.9/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.9/x64/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.9/x64/package.mask2
-rw-r--r--profiles/prefix/darwin/macos/10.9/x64/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.9/x64/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.9/x64/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.9/x64/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/10.9/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/10.9/x86/make.defaults5
-rw-r--r--profiles/prefix/darwin/macos/10.9/x86/package.mask9
-rw-r--r--profiles/prefix/darwin/macos/10.9/x86/package.use.force6
-rw-r--r--profiles/prefix/darwin/macos/10.9/x86/package.use.mask4
-rw-r--r--profiles/prefix/darwin/macos/10.9/x86/parent2
-rw-r--r--profiles/prefix/darwin/macos/10.9/x86/use.mask34
-rw-r--r--profiles/prefix/darwin/macos/arch/eapi1
-rw-r--r--profiles/prefix/darwin/macos/arch/ppc/eapi1
-rw-r--r--profiles/prefix/darwin/macos/arch/ppc/make.defaults12
-rw-r--r--profiles/prefix/darwin/macos/arch/ppc/package.mask10
-rw-r--r--profiles/prefix/darwin/macos/arch/ppc/package.use.force7
-rw-r--r--profiles/prefix/darwin/macos/arch/ppc/package.use.mask14
-rw-r--r--profiles/prefix/darwin/macos/arch/ppc/use.force6
-rw-r--r--profiles/prefix/darwin/macos/arch/ppc/use.mask6
-rw-r--r--profiles/prefix/darwin/macos/arch/x64/eapi1
-rw-r--r--profiles/prefix/darwin/macos/arch/x64/make.defaults16
-rw-r--r--profiles/prefix/darwin/macos/arch/x64/package.mask12
-rw-r--r--profiles/prefix/darwin/macos/arch/x64/package.use.force7
-rw-r--r--profiles/prefix/darwin/macos/arch/x64/package.use.mask18
-rw-r--r--profiles/prefix/darwin/macos/arch/x64/use.force6
-rw-r--r--profiles/prefix/darwin/macos/arch/x64/use.mask6
-rw-r--r--profiles/prefix/darwin/macos/arch/x86/eapi1
-rw-r--r--profiles/prefix/darwin/macos/arch/x86/make.defaults16
-rw-r--r--profiles/prefix/darwin/macos/arch/x86/package.mask5
-rw-r--r--profiles/prefix/darwin/macos/arch/x86/package.use.force7
-rw-r--r--profiles/prefix/darwin/macos/arch/x86/package.use.mask18
-rw-r--r--profiles/prefix/darwin/macos/arch/x86/use.force6
-rw-r--r--profiles/prefix/darwin/macos/arch/x86/use.mask6
-rw-r--r--profiles/prefix/darwin/macos/eapi1
-rw-r--r--profiles/prefix/darwin/macos/make.defaults8
-rw-r--r--profiles/prefix/darwin/macos/package.mask8
-rw-r--r--profiles/prefix/darwin/macos/package.use.force14
-rw-r--r--profiles/prefix/darwin/macos/package.use.mask22
-rw-r--r--profiles/prefix/darwin/macos/packages7
-rw-r--r--profiles/prefix/darwin/macos/parent1
-rw-r--r--profiles/prefix/darwin/make.defaults18
-rw-r--r--profiles/prefix/darwin/package.mask72
-rw-r--r--profiles/prefix/darwin/package.use.mask47
-rw-r--r--profiles/prefix/darwin/packages7
-rw-r--r--profiles/prefix/darwin/parent3
-rw-r--r--profiles/prefix/darwin/use.force6
-rw-r--r--profiles/prefix/darwin/use.mask44
-rw-r--r--profiles/prefix/eapi1
-rw-r--r--profiles/prefix/linux-standalone/amd64/eapi1
-rw-r--r--profiles/prefix/linux-standalone/amd64/legacy/eapi1
-rw-r--r--profiles/prefix/linux-standalone/amd64/legacy/parent2
-rw-r--r--profiles/prefix/linux-standalone/amd64/make.defaults4
-rw-r--r--profiles/prefix/linux-standalone/amd64/parent2
-rw-r--r--profiles/prefix/linux-standalone/arm/armv7a/eapi1
-rw-r--r--profiles/prefix/linux-standalone/arm/armv7a/make.defaults4
-rw-r--r--profiles/prefix/linux-standalone/arm/armv7a/parent2
-rw-r--r--profiles/prefix/linux-standalone/arm64/eapi1
-rw-r--r--profiles/prefix/linux-standalone/arm64/make.defaults4
-rw-r--r--profiles/prefix/linux-standalone/arm64/parent3
-rw-r--r--profiles/prefix/linux-standalone/eapi1
-rw-r--r--profiles/prefix/linux-standalone/make.defaults13
-rw-r--r--profiles/prefix/linux-standalone/packages12
-rw-r--r--profiles/prefix/linux-standalone/parent1
-rw-r--r--profiles/prefix/linux-standalone/ppc64/eapi1
-rw-r--r--profiles/prefix/linux-standalone/ppc64/make.defaults4
-rw-r--r--profiles/prefix/linux-standalone/ppc64/parent2
-rw-r--r--profiles/prefix/linux-standalone/profile.bashrc86
-rw-r--r--profiles/prefix/linux-standalone/x86/eapi1
-rw-r--r--profiles/prefix/linux-standalone/x86/legacy/eapi1
-rw-r--r--profiles/prefix/linux-standalone/x86/legacy/parent2
-rw-r--r--profiles/prefix/linux-standalone/x86/make.defaults4
-rw-r--r--profiles/prefix/linux-standalone/x86/parent2
-rw-r--r--profiles/prefix/linux/amd64/eapi1
-rw-r--r--profiles/prefix/linux/amd64/make.defaults11
-rw-r--r--profiles/prefix/linux/amd64/parent2
-rw-r--r--profiles/prefix/linux/arm/eapi1
-rw-r--r--profiles/prefix/linux/arm/make.defaults6
-rw-r--r--profiles/prefix/linux/arm/parent2
-rw-r--r--profiles/prefix/linux/eapi1
-rw-r--r--profiles/prefix/linux/make.defaults34
-rw-r--r--profiles/prefix/linux/package.mask2
-rw-r--r--profiles/prefix/linux/packages7
-rw-r--r--profiles/prefix/linux/parent1
-rw-r--r--profiles/prefix/linux/ppc64/eapi1
-rw-r--r--profiles/prefix/linux/ppc64/make.defaults12
-rw-r--r--profiles/prefix/linux/ppc64/packages7
-rw-r--r--profiles/prefix/linux/ppc64/parent2
-rw-r--r--profiles/prefix/linux/profile.bashrc44
-rw-r--r--profiles/prefix/linux/use.mask7
-rw-r--r--profiles/prefix/linux/x86/eapi1
-rw-r--r--profiles/prefix/linux/x86/make.defaults9
-rw-r--r--profiles/prefix/linux/x86/parent2
-rw-r--r--profiles/prefix/linux/x86/profile.bashrc12
-rw-r--r--profiles/prefix/make.defaults20
-rw-r--r--profiles/prefix/mint/eapi1
-rw-r--r--profiles/prefix/mint/m68k/eapi1
-rw-r--r--profiles/prefix/mint/m68k/make.defaults6
-rw-r--r--profiles/prefix/mint/m68k/parent1
-rw-r--r--profiles/prefix/mint/m68k/use.mask5
-rw-r--r--profiles/prefix/mint/make.defaults12
-rw-r--r--profiles/prefix/mint/package.use.force9
-rw-r--r--profiles/prefix/mint/package.use.mask14
-rw-r--r--profiles/prefix/mint/packages4
-rw-r--r--profiles/prefix/mint/parent3
-rw-r--r--profiles/prefix/mint/use.mask33
-rw-r--r--profiles/prefix/package.mask22
-rw-r--r--profiles/prefix/package.use.mask25
-rw-r--r--profiles/prefix/packages9
-rw-r--r--profiles/prefix/parent1
-rw-r--r--profiles/prefix/sunos/eapi1
-rw-r--r--profiles/prefix/sunos/make.defaults13
-rw-r--r--profiles/prefix/sunos/packages4
-rw-r--r--profiles/prefix/sunos/parent3
-rw-r--r--profiles/prefix/sunos/solaris/5.10/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.10/package.mask3
-rw-r--r--profiles/prefix/sunos/solaris/5.10/parent1
-rw-r--r--profiles/prefix/sunos/solaris/5.10/profile.bashrc10
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc/make.defaults7
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc/package.mask4
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc/package.use.mask3
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc/parent2
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc64/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc64/make.defaults7
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc64/package.mask4
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc64/package.use.mask3
-rw-r--r--profiles/prefix/sunos/solaris/5.10/sparc64/parent2
-rw-r--r--profiles/prefix/sunos/solaris/5.10/use.mask7
-rw-r--r--profiles/prefix/sunos/solaris/5.10/x64/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.10/x64/make.defaults7
-rw-r--r--profiles/prefix/sunos/solaris/5.10/x64/package.mask2
-rw-r--r--profiles/prefix/sunos/solaris/5.10/x64/package.use.mask4
-rw-r--r--profiles/prefix/sunos/solaris/5.10/x64/parent2
-rw-r--r--profiles/prefix/sunos/solaris/5.10/x86/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.10/x86/make.defaults7
-rw-r--r--profiles/prefix/sunos/solaris/5.10/x86/parent2
-rw-r--r--profiles/prefix/sunos/solaris/5.11/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.11/package.use.mask7
-rw-r--r--profiles/prefix/sunos/solaris/5.11/packages11
-rw-r--r--profiles/prefix/sunos/solaris/5.11/parent1
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc/make.defaults7
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc/package.mask4
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc/package.use.mask3
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc/parent2
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc64/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc64/make.defaults7
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc64/package.mask4
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc64/package.use.mask3
-rw-r--r--profiles/prefix/sunos/solaris/5.11/sparc64/parent2
-rw-r--r--profiles/prefix/sunos/solaris/5.11/x64/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.11/x64/make.defaults7
-rw-r--r--profiles/prefix/sunos/solaris/5.11/x64/package.use.mask4
-rw-r--r--profiles/prefix/sunos/solaris/5.11/x64/parent2
-rw-r--r--profiles/prefix/sunos/solaris/5.11/x86/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.11/x86/make.defaults7
-rw-r--r--profiles/prefix/sunos/solaris/5.11/x86/package.use.mask3
-rw-r--r--profiles/prefix/sunos/solaris/5.11/x86/parent2
-rw-r--r--profiles/prefix/sunos/solaris/5.9/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.9/package.mask14
-rw-r--r--profiles/prefix/sunos/solaris/5.9/package.use.mask7
-rw-r--r--profiles/prefix/sunos/solaris/5.9/parent1
-rw-r--r--profiles/prefix/sunos/solaris/5.9/sparc/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/5.9/sparc/make.defaults7
-rw-r--r--profiles/prefix/sunos/solaris/5.9/sparc/package.mask4
-rw-r--r--profiles/prefix/sunos/solaris/5.9/sparc/parent2
-rw-r--r--profiles/prefix/sunos/solaris/5.9/use.mask7
-rw-r--r--profiles/prefix/sunos/solaris/arch/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/arch/sparc/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/arch/sparc/make.defaults11
-rw-r--r--profiles/prefix/sunos/solaris/arch/sparc/package.mask9
-rw-r--r--profiles/prefix/sunos/solaris/arch/sparc/package.use.mask10
-rw-r--r--profiles/prefix/sunos/solaris/arch/sparc/use.force6
-rw-r--r--profiles/prefix/sunos/solaris/arch/sparc64/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/arch/sparc64/package.mask9
-rw-r--r--profiles/prefix/sunos/solaris/arch/sparc64/package.use.mask9
-rw-r--r--profiles/prefix/sunos/solaris/arch/x64/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/arch/x64/make.defaults9
-rw-r--r--profiles/prefix/sunos/solaris/arch/x64/package.mask6
-rw-r--r--profiles/prefix/sunos/solaris/arch/x64/package.use.mask6
-rw-r--r--profiles/prefix/sunos/solaris/arch/x64/use.force6
-rw-r--r--profiles/prefix/sunos/solaris/arch/x64/use.mask6
-rw-r--r--profiles/prefix/sunos/solaris/arch/x86/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/arch/x86/make.defaults9
-rw-r--r--profiles/prefix/sunos/solaris/arch/x86/package.mask6
-rw-r--r--profiles/prefix/sunos/solaris/arch/x86/package.use.mask6
-rw-r--r--profiles/prefix/sunos/solaris/arch/x86/use.force6
-rw-r--r--profiles/prefix/sunos/solaris/arch/x86/use.mask6
-rw-r--r--profiles/prefix/sunos/solaris/eapi1
-rw-r--r--profiles/prefix/sunos/solaris/make.defaults6
-rw-r--r--profiles/prefix/sunos/solaris/package.mask32
-rw-r--r--profiles/prefix/sunos/solaris/package.use.force9
-rw-r--r--profiles/prefix/sunos/solaris/package.use.mask32
-rw-r--r--profiles/prefix/sunos/solaris/parent1
-rw-r--r--profiles/prefix/sunos/solaris/profile.bashrc11
-rw-r--r--profiles/prefix/sunos/use.force6
-rw-r--r--profiles/prefix/sunos/use.mask29
-rw-r--r--profiles/prefix/use.force7
-rw-r--r--profiles/prefix/use.mask18
-rw-r--r--profiles/prefix/use.stable.mask7
-rw-r--r--profiles/prefix/windows/cygwin/eapi1
-rw-r--r--profiles/prefix/windows/cygwin/make.defaults11
-rw-r--r--profiles/prefix/windows/cygwin/package.mask10
-rw-r--r--profiles/prefix/windows/cygwin/package.use10
-rw-r--r--profiles/prefix/windows/cygwin/packages5
-rw-r--r--profiles/prefix/windows/cygwin/parent1
-rw-r--r--profiles/prefix/windows/cygwin/use.force5
-rw-r--r--profiles/prefix/windows/cygwin/use.mask10
-rw-r--r--profiles/prefix/windows/cygwin/x64/eapi1
-rw-r--r--profiles/prefix/windows/cygwin/x64/make.defaults17
-rw-r--r--profiles/prefix/windows/cygwin/x64/parent1
-rw-r--r--profiles/prefix/windows/cygwin/x86/eapi1
-rw-r--r--profiles/prefix/windows/cygwin/x86/make.defaults13
-rw-r--r--profiles/prefix/windows/cygwin/x86/parent1
-rw-r--r--profiles/prefix/windows/eapi1
-rw-r--r--profiles/prefix/windows/package.mask6
-rw-r--r--profiles/prefix/windows/parent3
-rw-r--r--profiles/prefix/windows/use.force5
-rw-r--r--profiles/prefix/windows/use.mask8
-rw-r--r--profiles/prefix/windows/winnt/3.5/eapi1
-rw-r--r--profiles/prefix/windows/winnt/3.5/parent1
-rw-r--r--profiles/prefix/windows/winnt/3.5/x86/eapi1
-rw-r--r--profiles/prefix/windows/winnt/3.5/x86/make.defaults6
-rw-r--r--profiles/prefix/windows/winnt/3.5/x86/parent1
-rw-r--r--profiles/prefix/windows/winnt/5.2/eapi1
-rw-r--r--profiles/prefix/windows/winnt/5.2/parent1
-rw-r--r--profiles/prefix/windows/winnt/5.2/x86/eapi1
-rw-r--r--profiles/prefix/windows/winnt/5.2/x86/make.defaults6
-rw-r--r--profiles/prefix/windows/winnt/5.2/x86/parent1
-rw-r--r--profiles/prefix/windows/winnt/6.0/eapi1
-rw-r--r--profiles/prefix/windows/winnt/6.0/parent1
-rw-r--r--profiles/prefix/windows/winnt/6.0/x86/eapi1
-rw-r--r--profiles/prefix/windows/winnt/6.0/x86/make.defaults6
-rw-r--r--profiles/prefix/windows/winnt/6.0/x86/parent1
-rw-r--r--profiles/prefix/windows/winnt/6.1/eapi1
-rw-r--r--profiles/prefix/windows/winnt/6.1/parent1
-rw-r--r--profiles/prefix/windows/winnt/6.1/x86/eapi1
-rw-r--r--profiles/prefix/windows/winnt/6.1/x86/make.defaults6
-rw-r--r--profiles/prefix/windows/winnt/6.1/x86/parent1
-rw-r--r--profiles/prefix/windows/winnt/eapi1
-rw-r--r--profiles/prefix/windows/winnt/make.defaults10
-rw-r--r--profiles/prefix/windows/winnt/package.mask8
-rw-r--r--profiles/prefix/windows/winnt/package.use.mask6
-rw-r--r--profiles/prefix/windows/winnt/packages37
-rw-r--r--profiles/prefix/windows/winnt/parent1
-rw-r--r--profiles/prefix/windows/winnt/profile.bashrc151
-rw-r--r--profiles/prefix/windows/winnt/use.force5
-rw-r--r--profiles/prefix/windows/winnt/use.mask75
487 files changed, 3522 insertions, 0 deletions
diff --git a/profiles/prefix/aix/5.2.0.0/eapi b/profiles/prefix/aix/5.2.0.0/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/5.2.0.0/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/5.2.0.0/parent b/profiles/prefix/aix/5.2.0.0/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/5.2.0.0/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/5.2.0.0/ppc/eapi b/profiles/prefix/aix/5.2.0.0/ppc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/5.2.0.0/ppc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/5.2.0.0/ppc/make.defaults b/profiles/prefix/aix/5.2.0.0/ppc/make.defaults
new file mode 100644
index 000000000000..4957fcf7471f
--- /dev/null
+++ b/profiles/prefix/aix/5.2.0.0/ppc/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="ppc-aix"
+CHOST="powerpc-ibm-aix5.2.0.0"
+ACCEPT_KEYWORDS="~ppc-aix"
diff --git a/profiles/prefix/aix/5.2.0.0/ppc/parent b/profiles/prefix/aix/5.2.0.0/ppc/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/5.2.0.0/ppc/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/5.3.0.0/eapi b/profiles/prefix/aix/5.3.0.0/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/5.3.0.0/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/5.3.0.0/parent b/profiles/prefix/aix/5.3.0.0/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/5.3.0.0/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/5.3.0.0/ppc/eapi b/profiles/prefix/aix/5.3.0.0/ppc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/5.3.0.0/ppc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/5.3.0.0/ppc/make.defaults b/profiles/prefix/aix/5.3.0.0/ppc/make.defaults
new file mode 100644
index 000000000000..c1c7ee8d60bf
--- /dev/null
+++ b/profiles/prefix/aix/5.3.0.0/ppc/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="ppc-aix"
+CHOST="powerpc-ibm-aix5.3.0.0"
+ACCEPT_KEYWORDS="~ppc-aix"
diff --git a/profiles/prefix/aix/5.3.0.0/ppc/parent b/profiles/prefix/aix/5.3.0.0/ppc/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/5.3.0.0/ppc/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/6.1.0.0/eapi b/profiles/prefix/aix/6.1.0.0/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/6.1.0.0/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/6.1.0.0/parent b/profiles/prefix/aix/6.1.0.0/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/6.1.0.0/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/6.1.0.0/ppc/eapi b/profiles/prefix/aix/6.1.0.0/ppc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/6.1.0.0/ppc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/6.1.0.0/ppc/make.defaults b/profiles/prefix/aix/6.1.0.0/ppc/make.defaults
new file mode 100644
index 000000000000..84bf77f3fbea
--- /dev/null
+++ b/profiles/prefix/aix/6.1.0.0/ppc/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="ppc-aix"
+CHOST="powerpc-ibm-aix6.1.0.0"
+ACCEPT_KEYWORDS="~ppc-aix"
diff --git a/profiles/prefix/aix/6.1.0.0/ppc/parent b/profiles/prefix/aix/6.1.0.0/ppc/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/6.1.0.0/ppc/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/7.1.0.0/eapi b/profiles/prefix/aix/7.1.0.0/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/7.1.0.0/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/7.1.0.0/parent b/profiles/prefix/aix/7.1.0.0/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/7.1.0.0/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/7.1.0.0/ppc/eapi b/profiles/prefix/aix/7.1.0.0/ppc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/7.1.0.0/ppc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/7.1.0.0/ppc/make.defaults b/profiles/prefix/aix/7.1.0.0/ppc/make.defaults
new file mode 100644
index 000000000000..0a100e97e6ea
--- /dev/null
+++ b/profiles/prefix/aix/7.1.0.0/ppc/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="ppc-aix"
+CHOST="powerpc-ibm-aix7.1.0.0"
+ACCEPT_KEYWORDS="~ppc-aix"
diff --git a/profiles/prefix/aix/7.1.0.0/ppc/parent b/profiles/prefix/aix/7.1.0.0/ppc/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/7.1.0.0/ppc/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/7.2.0.0/eapi b/profiles/prefix/aix/7.2.0.0/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/7.2.0.0/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/7.2.0.0/parent b/profiles/prefix/aix/7.2.0.0/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/7.2.0.0/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/7.2.0.0/ppc/eapi b/profiles/prefix/aix/7.2.0.0/ppc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/7.2.0.0/ppc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/7.2.0.0/ppc/make.defaults b/profiles/prefix/aix/7.2.0.0/ppc/make.defaults
new file mode 100644
index 000000000000..3889a5c0d917
--- /dev/null
+++ b/profiles/prefix/aix/7.2.0.0/ppc/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="ppc-aix"
+CHOST="powerpc-ibm-aix7.2.0.0"
+ACCEPT_KEYWORDS="~ppc-aix"
diff --git a/profiles/prefix/aix/7.2.0.0/ppc/parent b/profiles/prefix/aix/7.2.0.0/ppc/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/aix/7.2.0.0/ppc/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/aix/eapi b/profiles/prefix/aix/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/aix/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/aix/make.defaults b/profiles/prefix/aix/make.defaults
new file mode 100644
index 000000000000..4a1d10f6f86a
--- /dev/null
+++ b/profiles/prefix/aix/make.defaults
@@ -0,0 +1,19 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# System-wide defaults for all AIX profiles
+# This file should rarely need to be changed
+
+# 'Sane' defaults
+ELIBC="AIX"
+KERNEL="AIX"
+
+# no scanelf
+FEATURES="nostrip"
+
+# multilib build stuff, single ABI (no multilib)
+MULTILIB_ABIS="ppc"
+DEFAULT_ABI="ppc"
+ABI="ppc"
+IUSE_IMPLICIT="abi_ppc_32"
+LIBDIR_ppc="lib"
diff --git a/profiles/prefix/aix/package.mask b/profiles/prefix/aix/package.mask
new file mode 100644
index 000000000000..623528a0bf3a
--- /dev/null
+++ b/profiles/prefix/aix/package.mask
@@ -0,0 +1,14 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (03 Mar 2017)
+# Breaks (openssh, ...) because of PR target/65058
+>=sys-devel/gcc-4.8.5
+
+# Michael Haubenwallner <haubi@gentoo.org> (14 Apr 2014)
+# Endless loop while compiling gcc-4.2.4 for yet unknown reason.
+~sys-devel/make-4.0
+
+# Fabian Groffen <grobian@gentoo.org> (04 Apr 2007)
+# This is the only linker for AIX
+-sys-devel/native-cctools
diff --git a/profiles/prefix/aix/package.unmask b/profiles/prefix/aix/package.unmask
new file mode 100644
index 000000000000..4316cec44a8e
--- /dev/null
+++ b/profiles/prefix/aix/package.unmask
@@ -0,0 +1,15 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (03 Mar 2017)
+# Only these versions have the patches for proper AIX support.
+~sys-devel/gcc-4.2.4
+~sys-devel/gcc-4.8.4
+
+# Michael Haubenwallner <haubi@gentoo.org> (14 Apr 2014)
+# Endless loop while compiling gcc-4.2.4 for yet unknown reason.
+~sys-devel/make-4.0
+
+# Fabian Groffen <grobian@gentoo.org> (04 Apr 2007)
+# This is the only linker for AIX
+-sys-devel/native-cctools
diff --git a/profiles/prefix/aix/package.use.force b/profiles/prefix/aix/package.use.force
new file mode 100644
index 000000000000..a30f00532c5e
--- /dev/null
+++ b/profiles/prefix/aix/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (2009-03-18)
+# Plugins need to be built and installed using libtool (#261186)
+net-nds/openldap minimal
diff --git a/profiles/prefix/aix/package.use.mask b/profiles/prefix/aix/package.use.mask
new file mode 100644
index 000000000000..0e514aff0a3d
--- /dev/null
+++ b/profiles/prefix/aix/package.use.mask
@@ -0,0 +1,10 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (13 Mar 2017)
+# libstdbuf.so build failure is fixed in coreutils-8.27
+<sys-apps/coreutils-8.27 stdbuf
+
+# Michael Haubenwallner <haubi@gentoo.org> (16 Feb 2012)
+# JIT implementation in pcre does not know about AIX.
+dev-libs/libpcre jit
diff --git a/profiles/prefix/aix/packages b/profiles/prefix/aix/packages
new file mode 100644
index 000000000000..d0c7983dff6c
--- /dev/null
+++ b/profiles/prefix/aix/packages
@@ -0,0 +1,9 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# AIX uses the native (non-source available) linker
+*sys-devel/native-cctools
+# because AIX ar isn't able to unpack .deb files, we need deb2targz
+*app-arch/deb2targz
+# need some dll helpers on AIX
+*sys-apps/aix-miscutils
diff --git a/profiles/prefix/aix/parent b/profiles/prefix/aix/parent
new file mode 100644
index 000000000000..8f6bb2022d1e
--- /dev/null
+++ b/profiles/prefix/aix/parent
@@ -0,0 +1,3 @@
+../../base
+../../arch/base
+..
diff --git a/profiles/prefix/aix/profile.bashrc b/profiles/prefix/aix/profile.bashrc
new file mode 100644
index 000000000000..b596fc8dda1d
--- /dev/null
+++ b/profiles/prefix/aix/profile.bashrc
@@ -0,0 +1,14 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# never use /bin/sh as CONFIG_SHELL on AIX: it is ways too slow,
+# as well as broken in some corner cases.
+export CONFIG_SHELL=${BASH}
+
+if [[ ${EBUILD_PHASE} == setup ]] ; then
+ if [[ ${CATEGORY}/${P} == app-arch/tar-1.29* ]] ; then
+ # for distinct EEXIST and ENOTEMPTY,
+ # https://savannah.gnu.org/patch/?9284
+ [[ " ${CPPFLAGS} " == *" -D_LINUX_SOURCE_COMPAT "* ]] || CPPFLAGS="-D_LINUX_SOURCE_COMPAT ${CPPFLAGS}"
+ fi
+fi
diff --git a/profiles/prefix/aix/use.force b/profiles/prefix/aix/use.force
new file mode 100644
index 000000000000..f69f9dce1b4d
--- /dev/null
+++ b/profiles/prefix/aix/use.force
@@ -0,0 +1,9 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add AIX OS
+kernel_AIX
+elibc_AIX
+
+# Force the flag corresponding to the default ABI
+abi_ppc_32
diff --git a/profiles/prefix/aix/use.mask b/profiles/prefix/aix/use.mask
new file mode 100644
index 000000000000..28f2cc6ab75a
--- /dev/null
+++ b/profiles/prefix/aix/use.mask
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add AIX libc
+-elibc_AIX
+-kernel_AIX
+
+# these will more than likely never work on AIX
+3dfx
+acpi
+alsa
+apm
+caps
+cman
+clvm
+directfb
+djbfft
+fbcon
+fmod
+ggi
+gpm
+hardened
+oss
+svga
+sybase
+sybase-ct
+rtc
+uclibc
+v4l
diff --git a/profiles/prefix/darwin/eapi b/profiles/prefix/darwin/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.10/eapi b/profiles/prefix/darwin/macos/10.10/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.10/make.defaults b/profiles/prefix/darwin/macos/10.10/make.defaults
new file mode 100644
index 000000000000..ae958cc22081
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.10"
+
+# sandbox is working with use of Mac OS X's seatbelt (since 10.5)
+# but it generates problems, #456234
+#FEATURES="sandbox"
diff --git a/profiles/prefix/darwin/macos/10.10/package.mask b/profiles/prefix/darwin/macos/10.10/package.mask
new file mode 100644
index 000000000000..c8a0f51c1211
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/package.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (30 Sep 2012)
+# Requires XQuartz, since Apple dropped much of X-support in 10.8
+# (a.k.a. Mountain Lion), bug #431182
+media-libs/opengl-apple
diff --git a/profiles/prefix/darwin/macos/10.10/package.unmask b/profiles/prefix/darwin/macos/10.10/package.unmask
new file mode 100644
index 000000000000..f72a8fab624d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/package.unmask
@@ -0,0 +1,7 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# James Le Cuirot <chewi@gentoo.org> (29 Jul 2015)
+# Recent releases are supported in 10.10.
+dev-java/oracle-jdk-bin
+dev-java/oracle-jre-bin
diff --git a/profiles/prefix/darwin/macos/10.10/package.use.mask b/profiles/prefix/darwin/macos/10.10/package.use.mask
new file mode 100644
index 000000000000..0e3b22de53b7
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (10 Apr 2011)
+# as long as util-linux installs uuid.h which breaks the system headers
+# (hence we don't) we can't do uuid support here
+x11-libs/libSM -uuid
diff --git a/profiles/prefix/darwin/macos/10.10/parent b/profiles/prefix/darwin/macos/10.10/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.10/profile.bashrc b/profiles/prefix/darwin/macos/10.10/profile.bashrc
new file mode 100644
index 000000000000..e80837769875
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.10
diff --git a/profiles/prefix/darwin/macos/10.10/x64/eapi b/profiles/prefix/darwin/macos/10.10/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.10/x64/make.defaults b/profiles/prefix/darwin/macos/10.10/x64/make.defaults
new file mode 100644
index 000000000000..47aeed03be0f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x64/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-apple-darwin14"
+CHOST_amd64="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.10/x64/package.mask b/profiles/prefix/darwin/macos/10.10/x64/package.mask
new file mode 100644
index 000000000000..90062e0f6d10
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.10/x64/package.use.force b/profiles/prefix/darwin/macos/10.10/x64/package.use.force
new file mode 100644
index 000000000000..37fe719d893e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x64/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.10/x64/package.use.mask b/profiles/prefix/darwin/macos/10.10/x64/package.use.mask
new file mode 100644
index 000000000000..cbce096ae6b6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.10/x64/parent b/profiles/prefix/darwin/macos/10.10/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/darwin/macos/10.10/x64/use.mask b/profiles/prefix/darwin/macos/10.10/x64/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x64/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.10/x86/eapi b/profiles/prefix/darwin/macos/10.10/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.10/x86/make.defaults b/profiles/prefix/darwin/macos/10.10/x86/make.defaults
new file mode 100644
index 000000000000..25bb4496025c
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin14"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.10/x86/package.mask b/profiles/prefix/darwin/macos/10.10/x86/package.mask
new file mode 100644
index 000000000000..21e0df1269c9
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x86/package.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The Carbon interface has been removed entirely in Lion, only tk-8.6
+# will come with Cocoa support. If you must have tk, you'll have to
+# force USE=-aqua, but don't report bugs for incompatabilities you might
+# encounter.
+# NOTE: keep this mask synced with arch/x64
+<dev-lang/tk-8.6
diff --git a/profiles/prefix/darwin/macos/10.10/x86/package.use.force b/profiles/prefix/darwin/macos/10.10/x86/package.use.force
new file mode 100644
index 000000000000..37fe719d893e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.10/x86/package.use.mask b/profiles/prefix/darwin/macos/10.10/x86/package.use.mask
new file mode 100644
index 000000000000..cbce096ae6b6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.10/x86/parent b/profiles/prefix/darwin/macos/10.10/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.10/x86/use.mask b/profiles/prefix/darwin/macos/10.10/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.10/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.11/eapi b/profiles/prefix/darwin/macos/10.11/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.11/make.defaults b/profiles/prefix/darwin/macos/10.11/make.defaults
new file mode 100644
index 000000000000..b0c23df10794
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.11"
+
+# sandbox is working with use of Mac OS X's seatbelt (since 10.5)
+# but it generates problems, #456234
+#FEATURES="sandbox"
diff --git a/profiles/prefix/darwin/macos/10.11/package.mask b/profiles/prefix/darwin/macos/10.11/package.mask
new file mode 100644
index 000000000000..25d98fcad184
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/package.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (30 Sep 2012)
+# Requires XQuartz, since Apple dropped much of X-support in 10.8
+# (a.k.a. Mountain Lion), bug #431182
+media-libs/opengl-apple
diff --git a/profiles/prefix/darwin/macos/10.11/package.unmask b/profiles/prefix/darwin/macos/10.11/package.unmask
new file mode 100644
index 000000000000..ffa904e1603a
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/package.unmask
@@ -0,0 +1,7 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# James Le Cuirot <chewi@gentoo.org> (29 Jul 2015)
+# Recent releases are supported in >10.10.
+dev-java/oracle-jdk-bin
+dev-java/oracle-jre-bin
diff --git a/profiles/prefix/darwin/macos/10.11/package.use.mask b/profiles/prefix/darwin/macos/10.11/package.use.mask
new file mode 100644
index 000000000000..a2e4210b6c4b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (10 Apr 2011)
+# as long as util-linux installs uuid.h which breaks the system headers
+# (hence we don't) we can't do uuid support here
+x11-libs/libSM -uuid
diff --git a/profiles/prefix/darwin/macos/10.11/parent b/profiles/prefix/darwin/macos/10.11/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.11/profile.bashrc b/profiles/prefix/darwin/macos/10.11/profile.bashrc
new file mode 100644
index 000000000000..45e4fccece0c
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.11
diff --git a/profiles/prefix/darwin/macos/10.11/x64/eapi b/profiles/prefix/darwin/macos/10.11/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.11/x64/make.defaults b/profiles/prefix/darwin/macos/10.11/x64/make.defaults
new file mode 100644
index 000000000000..d48346f6f6b3
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x64/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-apple-darwin15"
+CHOST_amd64="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.11/x64/package.mask b/profiles/prefix/darwin/macos/10.11/x64/package.mask
new file mode 100644
index 000000000000..a99368d0861f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.11/x64/package.use.force b/profiles/prefix/darwin/macos/10.11/x64/package.use.force
new file mode 100644
index 000000000000..3890d8713529
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x64/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.11/x64/package.use.mask b/profiles/prefix/darwin/macos/10.11/x64/package.use.mask
new file mode 100644
index 000000000000..76d41d1fd860
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.11/x64/parent b/profiles/prefix/darwin/macos/10.11/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/darwin/macos/10.11/x64/use.mask b/profiles/prefix/darwin/macos/10.11/x64/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x64/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.11/x86/eapi b/profiles/prefix/darwin/macos/10.11/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.11/x86/make.defaults b/profiles/prefix/darwin/macos/10.11/x86/make.defaults
new file mode 100644
index 000000000000..f77f7777f6cf
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin15"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.11/x86/package.mask b/profiles/prefix/darwin/macos/10.11/x86/package.mask
new file mode 100644
index 000000000000..0873d990d5a0
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x86/package.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The Carbon interface has been removed entirely in Lion, only tk-8.6
+# will come with Cocoa support. If you must have tk, you'll have to
+# force USE=-aqua, but don't report bugs for incompatabilities you might
+# encounter.
+# NOTE: keep this mask synced with arch/x64
+<dev-lang/tk-8.6
diff --git a/profiles/prefix/darwin/macos/10.11/x86/package.use.force b/profiles/prefix/darwin/macos/10.11/x86/package.use.force
new file mode 100644
index 000000000000..3890d8713529
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.11/x86/package.use.mask b/profiles/prefix/darwin/macos/10.11/x86/package.use.mask
new file mode 100644
index 000000000000..76d41d1fd860
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.11/x86/parent b/profiles/prefix/darwin/macos/10.11/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.11/x86/use.mask b/profiles/prefix/darwin/macos/10.11/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.11/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.12/eapi b/profiles/prefix/darwin/macos/10.12/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.12/make.defaults b/profiles/prefix/darwin/macos/10.12/make.defaults
new file mode 100644
index 000000000000..65768d98975f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.12"
+
+# sandbox is working with use of Mac OS X's seatbelt (since 10.5)
+# but it generates problems, #456234
+#FEATURES="sandbox"
diff --git a/profiles/prefix/darwin/macos/10.12/package.mask b/profiles/prefix/darwin/macos/10.12/package.mask
new file mode 100644
index 000000000000..3a93b13de32a
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/package.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (30 Sep 2012)
+# Requires XQuartz, since Apple dropped much of X-support in 10.8
+# (a.k.a. Mountain Lion), bug #431182
+media-libs/opengl-apple
diff --git a/profiles/prefix/darwin/macos/10.12/package.unmask b/profiles/prefix/darwin/macos/10.12/package.unmask
new file mode 100644
index 000000000000..9b6d7fac0541
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/package.unmask
@@ -0,0 +1,7 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# James Le Cuirot <chewi@gentoo.org> (29 Jul 2015)
+# Recent releases are supported in >10.10.
+dev-java/oracle-jdk-bin
+dev-java/oracle-jre-bin
diff --git a/profiles/prefix/darwin/macos/10.12/package.use.mask b/profiles/prefix/darwin/macos/10.12/package.use.mask
new file mode 100644
index 000000000000..45a85366bdbc
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (10 Apr 2011)
+# as long as util-linux installs uuid.h which breaks the system headers
+# (hence we don't) we can't do uuid support here
+x11-libs/libSM -uuid
diff --git a/profiles/prefix/darwin/macos/10.12/parent b/profiles/prefix/darwin/macos/10.12/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.12/profile.bashrc b/profiles/prefix/darwin/macos/10.12/profile.bashrc
new file mode 100644
index 000000000000..606735442cef
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.12
diff --git a/profiles/prefix/darwin/macos/10.12/x64/eapi b/profiles/prefix/darwin/macos/10.12/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.12/x64/make.defaults b/profiles/prefix/darwin/macos/10.12/x64/make.defaults
new file mode 100644
index 000000000000..46f92cb62b20
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x64/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-apple-darwin16"
+CHOST_amd64="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.12/x64/package.mask b/profiles/prefix/darwin/macos/10.12/x64/package.mask
new file mode 100644
index 000000000000..5b64a27123b6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.12/x64/package.use.force b/profiles/prefix/darwin/macos/10.12/x64/package.use.force
new file mode 100644
index 000000000000..bbe3384ec5bb
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x64/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.12/x64/package.use.mask b/profiles/prefix/darwin/macos/10.12/x64/package.use.mask
new file mode 100644
index 000000000000..2b71fbdac61e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.12/x64/parent b/profiles/prefix/darwin/macos/10.12/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/darwin/macos/10.12/x64/use.mask b/profiles/prefix/darwin/macos/10.12/x64/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x64/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.12/x86/eapi b/profiles/prefix/darwin/macos/10.12/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.12/x86/make.defaults b/profiles/prefix/darwin/macos/10.12/x86/make.defaults
new file mode 100644
index 000000000000..bdc6f366701e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin16"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.12/x86/package.mask b/profiles/prefix/darwin/macos/10.12/x86/package.mask
new file mode 100644
index 000000000000..dfef4895f302
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x86/package.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The Carbon interface has been removed entirely in Lion, only tk-8.6
+# will come with Cocoa support. If you must have tk, you'll have to
+# force USE=-aqua, but don't report bugs for incompatabilities you might
+# encounter.
+# NOTE: keep this mask synced with arch/x64
+<dev-lang/tk-8.6
diff --git a/profiles/prefix/darwin/macos/10.12/x86/package.use.force b/profiles/prefix/darwin/macos/10.12/x86/package.use.force
new file mode 100644
index 000000000000..bbe3384ec5bb
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.12/x86/package.use.mask b/profiles/prefix/darwin/macos/10.12/x86/package.use.mask
new file mode 100644
index 000000000000..2b71fbdac61e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.12/x86/parent b/profiles/prefix/darwin/macos/10.12/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.12/x86/use.mask b/profiles/prefix/darwin/macos/10.12/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.12/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.13/eapi b/profiles/prefix/darwin/macos/10.13/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.13/make.defaults b/profiles/prefix/darwin/macos/10.13/make.defaults
new file mode 100644
index 000000000000..6dc36a684969
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.13"
+
+# sandbox is working with use of Mac OS X's seatbelt (since 10.5)
+# but it generates problems, #456234
+#FEATURES="sandbox"
diff --git a/profiles/prefix/darwin/macos/10.13/package.mask b/profiles/prefix/darwin/macos/10.13/package.mask
new file mode 100644
index 000000000000..41658a130edd
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/package.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (30 Sep 2012)
+# Requires XQuartz, since Apple dropped much of X-support in 10.8
+# (a.k.a. Mountain Lion), bug #431182
+media-libs/opengl-apple
diff --git a/profiles/prefix/darwin/macos/10.13/package.unmask b/profiles/prefix/darwin/macos/10.13/package.unmask
new file mode 100644
index 000000000000..40d7b786343e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/package.unmask
@@ -0,0 +1,7 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# James Le Cuirot <chewi@gentoo.org> (29 Jul 2015)
+# Recent releases are supported in >10.10.
+dev-java/oracle-jdk-bin
+dev-java/oracle-jre-bin
diff --git a/profiles/prefix/darwin/macos/10.13/package.use.mask b/profiles/prefix/darwin/macos/10.13/package.use.mask
new file mode 100644
index 000000000000..16ddb12d86d4
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (10 Apr 2011)
+# as long as util-linux installs uuid.h which breaks the system headers
+# (hence we don't) we can't do uuid support here
+x11-libs/libSM -uuid
diff --git a/profiles/prefix/darwin/macos/10.13/parent b/profiles/prefix/darwin/macos/10.13/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.13/profile.bashrc b/profiles/prefix/darwin/macos/10.13/profile.bashrc
new file mode 100644
index 000000000000..960cf84d39ab
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.13
diff --git a/profiles/prefix/darwin/macos/10.13/x64/eapi b/profiles/prefix/darwin/macos/10.13/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.13/x64/make.defaults b/profiles/prefix/darwin/macos/10.13/x64/make.defaults
new file mode 100644
index 000000000000..fa11dd005680
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x64/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-apple-darwin17"
+CHOST_amd64="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.13/x64/package.mask b/profiles/prefix/darwin/macos/10.13/x64/package.mask
new file mode 100644
index 000000000000..320a6bbb1a0c
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.13/x64/package.use.force b/profiles/prefix/darwin/macos/10.13/x64/package.use.force
new file mode 100644
index 000000000000..4cd81fcc677c
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x64/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.13/x64/package.use.mask b/profiles/prefix/darwin/macos/10.13/x64/package.use.mask
new file mode 100644
index 000000000000..70e5d808db3d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.13/x64/parent b/profiles/prefix/darwin/macos/10.13/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/darwin/macos/10.13/x64/use.mask b/profiles/prefix/darwin/macos/10.13/x64/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x64/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.13/x86/eapi b/profiles/prefix/darwin/macos/10.13/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.13/x86/make.defaults b/profiles/prefix/darwin/macos/10.13/x86/make.defaults
new file mode 100644
index 000000000000..801d199034d3
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin17"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.13/x86/package.mask b/profiles/prefix/darwin/macos/10.13/x86/package.mask
new file mode 100644
index 000000000000..94be57326b14
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x86/package.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The Carbon interface has been removed entirely in Lion, only tk-8.6
+# will come with Cocoa support. If you must have tk, you'll have to
+# force USE=-aqua, but don't report bugs for incompatabilities you might
+# encounter.
+# NOTE: keep this mask synced with arch/x64
+<dev-lang/tk-8.6
diff --git a/profiles/prefix/darwin/macos/10.13/x86/package.use.force b/profiles/prefix/darwin/macos/10.13/x86/package.use.force
new file mode 100644
index 000000000000..4cd81fcc677c
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.13/x86/package.use.mask b/profiles/prefix/darwin/macos/10.13/x86/package.use.mask
new file mode 100644
index 000000000000..70e5d808db3d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.13/x86/parent b/profiles/prefix/darwin/macos/10.13/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.13/x86/use.mask b/profiles/prefix/darwin/macos/10.13/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.13/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.4/eapi b/profiles/prefix/darwin/macos/10.4/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.4/make.defaults b/profiles/prefix/darwin/macos/10.4/make.defaults
new file mode 100644
index 000000000000..f8958c17eaf1
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/make.defaults
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.4"
diff --git a/profiles/prefix/darwin/macos/10.4/package.mask b/profiles/prefix/darwin/macos/10.4/package.mask
new file mode 100644
index 000000000000..92066a995673
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/package.mask
@@ -0,0 +1,15 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (03 May 2012)
+# Needs 10.6 or up
+>=dev-lang/ghc-7
+
+# Fabian Groffen <grobian@gentoo.org> (11 Jul 2011)
+# Needs headers only available starting from 10.5 (Leopard)
+sys-process/lsof
+
+# Fabian Groffen <grobian@gentoo.org> (30 Apr 2011)
+# These releases got a rewrite that is no longer compatible with
+# CoreAudio as available on Tiger and Leopard
+>=media-libs/mediastreamer-2.7.3
diff --git a/profiles/prefix/darwin/macos/10.4/package.use.mask b/profiles/prefix/darwin/macos/10.4/package.use.mask
new file mode 100644
index 000000000000..abb881877509
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/package.use.mask
@@ -0,0 +1,12 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Fabian Groffen <grobian@gentoo.org> (28 Apr 2008)
+# mach_override.h missing
+# http://www.erlang.org/pipermail/erlang-questions/2007-July/027870.html
+dev-lang/erlang hipe
+
+# Elias Pipping <pipping@gentoo.org> (25 Nov 2007)
+# there's no (official) java6 on macosx
+dev-util/checkstyle test
diff --git a/profiles/prefix/darwin/macos/10.4/parent b/profiles/prefix/darwin/macos/10.4/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.4/ppc/eapi b/profiles/prefix/darwin/macos/10.4/ppc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/ppc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.4/ppc/make.defaults b/profiles/prefix/darwin/macos/10.4/ppc/make.defaults
new file mode 100644
index 000000000000..a7ca397782c9
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/ppc/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="powerpc-apple-darwin8"
+CHOST_ppc="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.4/ppc/package.mask b/profiles/prefix/darwin/macos/10.4/ppc/package.mask
new file mode 100644
index 000000000000..2a5c2e63e2f4
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/ppc/package.mask
@@ -0,0 +1,3 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/darwin/macos/10.4/ppc/package.use.mask b/profiles/prefix/darwin/macos/10.4/ppc/package.use.mask
new file mode 100644
index 000000000000..f7ac4607b395
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/ppc/package.use.mask
@@ -0,0 +1,3 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/darwin/macos/10.4/ppc/parent b/profiles/prefix/darwin/macos/10.4/ppc/parent
new file mode 100644
index 000000000000..59ddeb924a6d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/ppc/parent
@@ -0,0 +1,2 @@
+..
+../../arch/ppc
diff --git a/profiles/prefix/darwin/macos/10.4/ppc/use.mask b/profiles/prefix/darwin/macos/10.4/ppc/use.mask
new file mode 100644
index 000000000000..cb5937b71a2e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/ppc/use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+-altivec
diff --git a/profiles/prefix/darwin/macos/10.4/profile.bashrc b/profiles/prefix/darwin/macos/10.4/profile.bashrc
new file mode 100644
index 000000000000..f227ae79ef20
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.4
diff --git a/profiles/prefix/darwin/macos/10.4/x86/eapi b/profiles/prefix/darwin/macos/10.4/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.4/x86/make.defaults b/profiles/prefix/darwin/macos/10.4/x86/make.defaults
new file mode 100644
index 000000000000..aa58c46bfa62
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin8"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.4/x86/package.unmask b/profiles/prefix/darwin/macos/10.4/x86/package.unmask
new file mode 100644
index 000000000000..320a6bbb1a0c
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/x86/package.unmask
@@ -0,0 +1,2 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.4/x86/package.use.force b/profiles/prefix/darwin/macos/10.4/x86/package.use.force
new file mode 100644
index 000000000000..eb7f4d25673f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.4/x86/package.use.mask b/profiles/prefix/darwin/macos/10.4/x86/package.use.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.4/x86/parent b/profiles/prefix/darwin/macos/10.4/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.4/x86/use.mask b/profiles/prefix/darwin/macos/10.4/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.4/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.5/eapi b/profiles/prefix/darwin/macos/10.5/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.5/make.defaults b/profiles/prefix/darwin/macos/10.5/make.defaults
new file mode 100644
index 000000000000..b4eacf03871f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.5"
+
+# sandbox is working with use of Mac OS X's seatbelt (since 10.5)
+# but it generates problems, #456234
+#FEATURES="sandbox"
diff --git a/profiles/prefix/darwin/macos/10.5/package.mask b/profiles/prefix/darwin/macos/10.5/package.mask
new file mode 100644
index 000000000000..daf51e691ebf
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/package.mask
@@ -0,0 +1,12 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (03 May 2012)
+# Needs 10.6 or up
+>=dev-lang/ghc-7
+
+# Fabian Groffen <grobian@gentoo.org> (06 Nov 2011)
+# These releases got a rewrite that is no longer compatible with
+# CoreAudio as available on Tiger and Leopard
+>=media-libs/mediastreamer-2.7.3
+
diff --git a/profiles/prefix/darwin/macos/10.5/package.use.mask b/profiles/prefix/darwin/macos/10.5/package.use.mask
new file mode 100644
index 000000000000..abb881877509
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/package.use.mask
@@ -0,0 +1,12 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Fabian Groffen <grobian@gentoo.org> (28 Apr 2008)
+# mach_override.h missing
+# http://www.erlang.org/pipermail/erlang-questions/2007-July/027870.html
+dev-lang/erlang hipe
+
+# Elias Pipping <pipping@gentoo.org> (25 Nov 2007)
+# there's no (official) java6 on macosx
+dev-util/checkstyle test
diff --git a/profiles/prefix/darwin/macos/10.5/parent b/profiles/prefix/darwin/macos/10.5/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.5/ppc/eapi b/profiles/prefix/darwin/macos/10.5/ppc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/ppc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.5/ppc/make.defaults b/profiles/prefix/darwin/macos/10.5/ppc/make.defaults
new file mode 100644
index 000000000000..8b8ab7718059
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/ppc/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="powerpc-apple-darwin9"
+CHOST_ppc="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.5/ppc/package.mask b/profiles/prefix/darwin/macos/10.5/ppc/package.mask
new file mode 100644
index 000000000000..13d119cb0a6d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/ppc/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.5/ppc/package.unmask b/profiles/prefix/darwin/macos/10.5/ppc/package.unmask
new file mode 100644
index 000000000000..320a6bbb1a0c
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/ppc/package.unmask
@@ -0,0 +1,2 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.5/ppc/package.use.force b/profiles/prefix/darwin/macos/10.5/ppc/package.use.force
new file mode 100644
index 000000000000..eb7f4d25673f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/ppc/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.5/ppc/package.use.mask b/profiles/prefix/darwin/macos/10.5/ppc/package.use.mask
new file mode 100644
index 000000000000..5e018747494e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/ppc/package.use.mask
@@ -0,0 +1,8 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# flag returns compile errors
+media-video/mplayer cpudetection
+# libs mising
+media-video/mplayer sdl libcaca dv nas bidi enca cdparanoia samba live openal
diff --git a/profiles/prefix/darwin/macos/10.5/ppc/parent b/profiles/prefix/darwin/macos/10.5/ppc/parent
new file mode 100644
index 000000000000..59ddeb924a6d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/ppc/parent
@@ -0,0 +1,2 @@
+..
+../../arch/ppc
diff --git a/profiles/prefix/darwin/macos/10.5/ppc/use.mask b/profiles/prefix/darwin/macos/10.5/ppc/use.mask
new file mode 100644
index 000000000000..cb5937b71a2e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/ppc/use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+-altivec
diff --git a/profiles/prefix/darwin/macos/10.5/profile.bashrc b/profiles/prefix/darwin/macos/10.5/profile.bashrc
new file mode 100644
index 000000000000..b623585a96cc
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.5
diff --git a/profiles/prefix/darwin/macos/10.5/x64/eapi b/profiles/prefix/darwin/macos/10.5/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.5/x64/make.defaults b/profiles/prefix/darwin/macos/10.5/x64/make.defaults
new file mode 100644
index 000000000000..dec1335075b7
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x64/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-apple-darwin9"
+CHOST_amd64="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.5/x64/package.mask b/profiles/prefix/darwin/macos/10.5/x64/package.mask
new file mode 100644
index 000000000000..320a6bbb1a0c
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.5/x64/package.unmask b/profiles/prefix/darwin/macos/10.5/x64/package.unmask
new file mode 100644
index 000000000000..ca74cff56ac6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x64/package.unmask
@@ -0,0 +1,3 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/darwin/macos/10.5/x64/package.use.force b/profiles/prefix/darwin/macos/10.5/x64/package.use.force
new file mode 100644
index 000000000000..eb7f4d25673f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x64/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.5/x64/package.use.mask b/profiles/prefix/darwin/macos/10.5/x64/package.use.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.5/x64/parent b/profiles/prefix/darwin/macos/10.5/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/darwin/macos/10.5/x64/use.mask b/profiles/prefix/darwin/macos/10.5/x64/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x64/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.5/x86/eapi b/profiles/prefix/darwin/macos/10.5/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.5/x86/make.defaults b/profiles/prefix/darwin/macos/10.5/x86/make.defaults
new file mode 100644
index 000000000000..ce7d752b743c
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin9"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.5/x86/package.mask b/profiles/prefix/darwin/macos/10.5/x86/package.mask
new file mode 100644
index 000000000000..13d119cb0a6d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x86/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.5/x86/package.unmask b/profiles/prefix/darwin/macos/10.5/x86/package.unmask
new file mode 100644
index 000000000000..ca74cff56ac6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x86/package.unmask
@@ -0,0 +1,3 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/darwin/macos/10.5/x86/package.use.force b/profiles/prefix/darwin/macos/10.5/x86/package.use.force
new file mode 100644
index 000000000000..eb7f4d25673f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.5/x86/package.use.mask b/profiles/prefix/darwin/macos/10.5/x86/package.use.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.5/x86/parent b/profiles/prefix/darwin/macos/10.5/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.5/x86/use.mask b/profiles/prefix/darwin/macos/10.5/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.5/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.6/eapi b/profiles/prefix/darwin/macos/10.6/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.6/make.defaults b/profiles/prefix/darwin/macos/10.6/make.defaults
new file mode 100644
index 000000000000..7251a95b1ada
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.6"
+
+# sandbox is working with use of Mac OS X's seatbelt (since 10.5)
+# but it generates problems, #456234
+#FEATURES="sandbox"
diff --git a/profiles/prefix/darwin/macos/10.6/package.use.mask b/profiles/prefix/darwin/macos/10.6/package.use.mask
new file mode 100644
index 000000000000..cba856984633
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Elias Pipping <pipping@gentoo.org> (25 Nov 2007)
+# there's no (official) java6 on macosx
+dev-util/checkstyle test
diff --git a/profiles/prefix/darwin/macos/10.6/parent b/profiles/prefix/darwin/macos/10.6/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.6/profile.bashrc b/profiles/prefix/darwin/macos/10.6/profile.bashrc
new file mode 100644
index 000000000000..21253613c396
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.6
diff --git a/profiles/prefix/darwin/macos/10.6/x64/eapi b/profiles/prefix/darwin/macos/10.6/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.6/x64/make.defaults b/profiles/prefix/darwin/macos/10.6/x64/make.defaults
new file mode 100644
index 000000000000..af0134eefb65
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x64/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-apple-darwin10"
+CHOST_amd64="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.6/x64/package.mask b/profiles/prefix/darwin/macos/10.6/x64/package.mask
new file mode 100644
index 000000000000..0cc0ba14627f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.6/x64/package.use.force b/profiles/prefix/darwin/macos/10.6/x64/package.use.force
new file mode 100644
index 000000000000..eb7f4d25673f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x64/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.6/x64/package.use.mask b/profiles/prefix/darwin/macos/10.6/x64/package.use.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.6/x64/parent b/profiles/prefix/darwin/macos/10.6/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/darwin/macos/10.6/x64/use.mask b/profiles/prefix/darwin/macos/10.6/x64/use.mask
new file mode 100644
index 000000000000..d25cb678586f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x64/use.mask
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Unmask osp, used by asterisk; bug 115798
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.6/x86/eapi b/profiles/prefix/darwin/macos/10.6/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.6/x86/make.defaults b/profiles/prefix/darwin/macos/10.6/x86/make.defaults
new file mode 100644
index 000000000000..89da7dfebd35
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin10"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.6/x86/package.mask b/profiles/prefix/darwin/macos/10.6/x86/package.mask
new file mode 100644
index 000000000000..2a5c2e63e2f4
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x86/package.mask
@@ -0,0 +1,3 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/darwin/macos/10.6/x86/package.use.force b/profiles/prefix/darwin/macos/10.6/x86/package.use.force
new file mode 100644
index 000000000000..eb7f4d25673f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.6/x86/package.use.mask b/profiles/prefix/darwin/macos/10.6/x86/package.use.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.6/x86/parent b/profiles/prefix/darwin/macos/10.6/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.6/x86/use.mask b/profiles/prefix/darwin/macos/10.6/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.6/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.7/eapi b/profiles/prefix/darwin/macos/10.7/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.7/make.defaults b/profiles/prefix/darwin/macos/10.7/make.defaults
new file mode 100644
index 000000000000..09b93d3de3f2
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.7"
+
+# sandbox is working with use of Mac OS X's seatbelt (since 10.5)
+# but it generates problems, #456234
+#FEATURES="sandbox"
diff --git a/profiles/prefix/darwin/macos/10.7/package.use.mask b/profiles/prefix/darwin/macos/10.7/package.use.mask
new file mode 100644
index 000000000000..61d76c7770fe
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (10 Apr 2011)
+# as long as util-linux installs uuid.h which breaks the system headers
+# (hence we don't) we can't do uuid support here
+x11-libs/libSM -uuid
diff --git a/profiles/prefix/darwin/macos/10.7/parent b/profiles/prefix/darwin/macos/10.7/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.7/profile.bashrc b/profiles/prefix/darwin/macos/10.7/profile.bashrc
new file mode 100644
index 000000000000..e335b82de74e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.7
diff --git a/profiles/prefix/darwin/macos/10.7/x64/eapi b/profiles/prefix/darwin/macos/10.7/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.7/x64/make.defaults b/profiles/prefix/darwin/macos/10.7/x64/make.defaults
new file mode 100644
index 000000000000..e6c8b3450d4b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x64/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-apple-darwin11"
+CHOST_amd64="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.7/x64/package.mask b/profiles/prefix/darwin/macos/10.7/x64/package.mask
new file mode 100644
index 000000000000..c217bea65701
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.7/x64/package.use.force b/profiles/prefix/darwin/macos/10.7/x64/package.use.force
new file mode 100644
index 000000000000..3024cdfd84c2
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x64/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.7/x64/package.use.mask b/profiles/prefix/darwin/macos/10.7/x64/package.use.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.7/x64/parent b/profiles/prefix/darwin/macos/10.7/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/darwin/macos/10.7/x64/use.mask b/profiles/prefix/darwin/macos/10.7/x64/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x64/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.7/x86/eapi b/profiles/prefix/darwin/macos/10.7/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.7/x86/make.defaults b/profiles/prefix/darwin/macos/10.7/x86/make.defaults
new file mode 100644
index 000000000000..c1d087fbd5e6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin11"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.7/x86/package.mask b/profiles/prefix/darwin/macos/10.7/x86/package.mask
new file mode 100644
index 000000000000..6e7cf1fbfb04
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x86/package.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The Carbon interface has been removed entirely in Lion, only tk-8.6
+# will come with Cocoa support. If you must have tk, you'll have to
+# force USE=-aqua, but don't report bugs for incompatabilities you might
+# encounter.
+# NOTE: keep this mask synced with arch/x64
+<dev-lang/tk-8.6
diff --git a/profiles/prefix/darwin/macos/10.7/x86/package.use.force b/profiles/prefix/darwin/macos/10.7/x86/package.use.force
new file mode 100644
index 000000000000..3024cdfd84c2
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.7/x86/package.use.mask b/profiles/prefix/darwin/macos/10.7/x86/package.use.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.7/x86/parent b/profiles/prefix/darwin/macos/10.7/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.7/x86/use.mask b/profiles/prefix/darwin/macos/10.7/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.7/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.8/eapi b/profiles/prefix/darwin/macos/10.8/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.8/make.defaults b/profiles/prefix/darwin/macos/10.8/make.defaults
new file mode 100644
index 000000000000..36cc9c2d39e6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.8"
+
+# sandbox is working with use of Mac OS X's seatbelt (since 10.5)
+# but it generates problems, #456234
+#FEATURES="sandbox"
diff --git a/profiles/prefix/darwin/macos/10.8/package.mask b/profiles/prefix/darwin/macos/10.8/package.mask
new file mode 100644
index 000000000000..0d1a44f9d1f3
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/package.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (30 Sep 2012)
+# Requires XQuartz, since Apple dropped much of X-support in 10.8
+# (a.k.a. Mountain Lion), bug #431182
+media-libs/opengl-apple
diff --git a/profiles/prefix/darwin/macos/10.8/package.unmask b/profiles/prefix/darwin/macos/10.8/package.unmask
new file mode 100644
index 000000000000..522ceb60c053
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/package.unmask
@@ -0,0 +1,7 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# James Le Cuirot <chewi@gentoo.org> (29 Jul 2015)
+# Recent releases are supported in 10.8.
+dev-java/oracle-jdk-bin
+dev-java/oracle-jre-bin
diff --git a/profiles/prefix/darwin/macos/10.8/package.use.mask b/profiles/prefix/darwin/macos/10.8/package.use.mask
new file mode 100644
index 000000000000..5d32c2572ec9
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (10 Apr 2011)
+# as long as util-linux installs uuid.h which breaks the system headers
+# (hence we don't) we can't do uuid support here
+x11-libs/libSM -uuid
diff --git a/profiles/prefix/darwin/macos/10.8/parent b/profiles/prefix/darwin/macos/10.8/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.8/profile.bashrc b/profiles/prefix/darwin/macos/10.8/profile.bashrc
new file mode 100644
index 000000000000..f9c6eec58bbd
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.8
diff --git a/profiles/prefix/darwin/macos/10.8/x64/eapi b/profiles/prefix/darwin/macos/10.8/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.8/x64/make.defaults b/profiles/prefix/darwin/macos/10.8/x64/make.defaults
new file mode 100644
index 000000000000..1b8e40a7b3b6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x64/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-apple-darwin12"
+CHOST_amd64="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.8/x64/package.mask b/profiles/prefix/darwin/macos/10.8/x64/package.mask
new file mode 100644
index 000000000000..633c704dafd1
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.8/x64/package.use.force b/profiles/prefix/darwin/macos/10.8/x64/package.use.force
new file mode 100644
index 000000000000..8e66f5a37ccd
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x64/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.8/x64/package.use.mask b/profiles/prefix/darwin/macos/10.8/x64/package.use.mask
new file mode 100644
index 000000000000..7e1e64983ebd
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.8/x64/parent b/profiles/prefix/darwin/macos/10.8/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/darwin/macos/10.8/x64/use.mask b/profiles/prefix/darwin/macos/10.8/x64/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x64/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.8/x86/eapi b/profiles/prefix/darwin/macos/10.8/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.8/x86/make.defaults b/profiles/prefix/darwin/macos/10.8/x86/make.defaults
new file mode 100644
index 000000000000..cda566d1f3c1
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin12"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.8/x86/package.mask b/profiles/prefix/darwin/macos/10.8/x86/package.mask
new file mode 100644
index 000000000000..6e7cf1fbfb04
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x86/package.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The Carbon interface has been removed entirely in Lion, only tk-8.6
+# will come with Cocoa support. If you must have tk, you'll have to
+# force USE=-aqua, but don't report bugs for incompatabilities you might
+# encounter.
+# NOTE: keep this mask synced with arch/x64
+<dev-lang/tk-8.6
diff --git a/profiles/prefix/darwin/macos/10.8/x86/package.use.force b/profiles/prefix/darwin/macos/10.8/x86/package.use.force
new file mode 100644
index 000000000000..8e66f5a37ccd
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.8/x86/package.use.mask b/profiles/prefix/darwin/macos/10.8/x86/package.use.mask
new file mode 100644
index 000000000000..7e1e64983ebd
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.8/x86/parent b/profiles/prefix/darwin/macos/10.8/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.8/x86/use.mask b/profiles/prefix/darwin/macos/10.8/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.8/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.9/eapi b/profiles/prefix/darwin/macos/10.9/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.9/make.defaults b/profiles/prefix/darwin/macos/10.9/make.defaults
new file mode 100644
index 000000000000..346de818f06b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MACOSX_DEPLOYMENT_TARGET="10.9"
+
+# sandbox is working with use of Mac OS X's seatbelt (since 10.5)
+# but it generates problems, #456234
+#FEATURES="sandbox"
diff --git a/profiles/prefix/darwin/macos/10.9/package.mask b/profiles/prefix/darwin/macos/10.9/package.mask
new file mode 100644
index 000000000000..8669e34bc83e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/package.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (30 Sep 2012)
+# Requires XQuartz, since Apple dropped much of X-support in 10.8
+# (a.k.a. Mountain Lion), bug #431182
+media-libs/opengl-apple
diff --git a/profiles/prefix/darwin/macos/10.9/package.unmask b/profiles/prefix/darwin/macos/10.9/package.unmask
new file mode 100644
index 000000000000..728cd4f5190e
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/package.unmask
@@ -0,0 +1,7 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# James Le Cuirot <chewi@gentoo.org> (29 Jul 2015)
+# Recent releases are supported in 10.9.
+dev-java/oracle-jdk-bin
+dev-java/oracle-jre-bin
diff --git a/profiles/prefix/darwin/macos/10.9/package.use.mask b/profiles/prefix/darwin/macos/10.9/package.use.mask
new file mode 100644
index 000000000000..fc77c22b7f25
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (10 Apr 2011)
+# as long as util-linux installs uuid.h which breaks the system headers
+# (hence we don't) we can't do uuid support here
+x11-libs/libSM -uuid
diff --git a/profiles/prefix/darwin/macos/10.9/parent b/profiles/prefix/darwin/macos/10.9/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/macos/10.9/profile.bashrc b/profiles/prefix/darwin/macos/10.9/profile.bashrc
new file mode 100644
index 000000000000..8a0c588ed92d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/profile.bashrc
@@ -0,0 +1,4 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+export MACOSX_DEPLOYMENT_TARGET=10.9
diff --git a/profiles/prefix/darwin/macos/10.9/x64/eapi b/profiles/prefix/darwin/macos/10.9/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.9/x64/make.defaults b/profiles/prefix/darwin/macos/10.9/x64/make.defaults
new file mode 100644
index 000000000000..def0ef7cdecf
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x64/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="x86_64-apple-darwin13"
+CHOST_amd64="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.9/x64/package.mask b/profiles/prefix/darwin/macos/10.9/x64/package.mask
new file mode 100644
index 000000000000..17532723914b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/darwin/macos/10.9/x64/package.use.force b/profiles/prefix/darwin/macos/10.9/x64/package.use.force
new file mode 100644
index 000000000000..7d3ab2bb8526
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x64/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.9/x64/package.use.mask b/profiles/prefix/darwin/macos/10.9/x64/package.use.mask
new file mode 100644
index 000000000000..a47b5f8b1d1d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.9/x64/parent b/profiles/prefix/darwin/macos/10.9/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/darwin/macos/10.9/x64/use.mask b/profiles/prefix/darwin/macos/10.9/x64/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x64/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/10.9/x86/eapi b/profiles/prefix/darwin/macos/10.9/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/10.9/x86/make.defaults b/profiles/prefix/darwin/macos/10.9/x86/make.defaults
new file mode 100644
index 000000000000..e46679e23636
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x86/make.defaults
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CHOST="i686-apple-darwin13"
+CHOST_x86="${CHOST}"
diff --git a/profiles/prefix/darwin/macos/10.9/x86/package.mask b/profiles/prefix/darwin/macos/10.9/x86/package.mask
new file mode 100644
index 000000000000..71da32f6e834
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x86/package.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The Carbon interface has been removed entirely in Lion, only tk-8.6
+# will come with Cocoa support. If you must have tk, you'll have to
+# force USE=-aqua, but don't report bugs for incompatabilities you might
+# encounter.
+# NOTE: keep this mask synced with arch/x64
+<dev-lang/tk-8.6
diff --git a/profiles/prefix/darwin/macos/10.9/x86/package.use.force b/profiles/prefix/darwin/macos/10.9/x86/package.use.force
new file mode 100644
index 000000000000..7d3ab2bb8526
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x86/package.use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Elias Pipping <pipping@gentoo.org> (30 Sep 2007)
+# compiles with -aqua, doesn't work, though
+media-video/mplayer aqua
diff --git a/profiles/prefix/darwin/macos/10.9/x86/package.use.mask b/profiles/prefix/darwin/macos/10.9/x86/package.use.mask
new file mode 100644
index 000000000000..a47b5f8b1d1d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x86/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/darwin/macos/10.9/x86/parent b/profiles/prefix/darwin/macos/10.9/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/darwin/macos/10.9/x86/use.mask b/profiles/prefix/darwin/macos/10.9/x86/use.mask
new file mode 100644
index 000000000000..dcc0e997a9a8
--- /dev/null
+++ b/profiles/prefix/darwin/macos/10.9/x86/use.mask
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This file masks out USE flags that are simply NOT allowed in the default
+# x86 profile. This works, for example, if another architecture's
+# profile have a USE flag associated with (such as altivec, mmx, etc).
+
+# Unmask x86 instruction sets
+-ifc
+-cpu_flags_x86_mmx
+-cpu_flags_x86_mmxext
+-cpu_flags_x86_sse
+-cpu_flags_x86_sse2
+-cpu_flags_x86_ssse3
+-svga
+
+# Unmask nvidia XvMC support
+-nvidia
+
+# Unmask dev-db/oracle-instantclient-basic support
+-oci8-instant-client
+
+# Modular X: unmask for architectures on which they are available
+-input_devices_synaptics
+-input_devices_vmmouse
+-input_devices_wacom
+-video_cards_nvidia
+-video_cards_vmware
+
+# Modular X: mask for architectures on which they aren't available
+video_cards_newport
+
+# ibm is only used for ppc64 stuff
+ibm
diff --git a/profiles/prefix/darwin/macos/arch/eapi b/profiles/prefix/darwin/macos/arch/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/arch/ppc/eapi b/profiles/prefix/darwin/macos/arch/ppc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/ppc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/arch/ppc/make.defaults b/profiles/prefix/darwin/macos/arch/ppc/make.defaults
new file mode 100644
index 000000000000..da7fa953c1fc
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/ppc/make.defaults
@@ -0,0 +1,12 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="ppc-macos"
+ACCEPT_KEYWORDS="~ppc-macos"
+
+# multilib build stuff, single ABI (no multilib)
+MULTILIB_ABIS="ppc"
+DEFAULT_ABI="ppc"
+ABI="ppc"
+IUSE_IMPLICIT="abi_ppc_32"
+LIBDIR_ppc="lib"
diff --git a/profiles/prefix/darwin/macos/arch/ppc/package.mask b/profiles/prefix/darwin/macos/arch/ppc/package.mask
new file mode 100644
index 000000000000..55f215184f4b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/ppc/package.mask
@@ -0,0 +1,10 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The 32-bits profile is inherited by the 64-bits one!
+# All the Mac OS X profiles inherit from their matching arch profile here.
+
+
+# Fabian Groffen <grobian@gentoo.org> (5 Mar 2012)
+# Apple removed entire PowerPC support from ld in ld64-128.2
+>=sys-devel/binutils-apple-4.3
diff --git a/profiles/prefix/darwin/macos/arch/ppc/package.use.force b/profiles/prefix/darwin/macos/arch/ppc/package.use.force
new file mode 100644
index 000000000000..5b234c4e9499
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/ppc/package.use.force
@@ -0,0 +1,7 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (20 Dec 2016)
+# Force the host target to avoid dependency hell
+sys-devel/clang llvm_targets_PowerPC
+sys-devel/llvm llvm_targets_PowerPC
diff --git a/profiles/prefix/darwin/macos/arch/ppc/package.use.mask b/profiles/prefix/darwin/macos/arch/ppc/package.use.mask
new file mode 100644
index 000000000000..8f009750a2ca
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/ppc/package.use.mask
@@ -0,0 +1,14 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The 32-bits profile is inherited by the 64-bits one!
+# All the Mac OS X profiles inherit from their matching arch profile here.
+
+
+# Elias Pipping <pipping@gentoo.org> (01 Sep 2007)
+# imlib2 does not compile with USE=mmx
+media-libs/imlib2 cpu_flags_x86_mmx
+
+# Elias Pipping <pipping@gentoo.org> (01 Sep 2007)
+# mpg123 does not compile with USE=mmx
+media-sound/mpg123 cpu_flags_x86_mmx
diff --git a/profiles/prefix/darwin/macos/arch/ppc/use.force b/profiles/prefix/darwin/macos/arch/ppc/use.force
new file mode 100644
index 000000000000..2df1dde89af6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/ppc/use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag corresponding to the default ABI
+ppc-macos
+abi_ppc_32
diff --git a/profiles/prefix/darwin/macos/arch/ppc/use.mask b/profiles/prefix/darwin/macos/arch/ppc/use.mask
new file mode 100644
index 000000000000..837168ea147f
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/ppc/use.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Unmask the flag corresponding to the default ABI
+-ppc-macos
+-abi_ppc_32
diff --git a/profiles/prefix/darwin/macos/arch/x64/eapi b/profiles/prefix/darwin/macos/arch/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/arch/x64/make.defaults b/profiles/prefix/darwin/macos/arch/x64/make.defaults
new file mode 100644
index 000000000000..f03f6a88c4ff
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x64/make.defaults
@@ -0,0 +1,16 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x64-macos"
+ACCEPT_KEYWORDS="~x64-macos"
+
+CPU_FLAGS_X86="mmx mmxext sse sse2"
+
+# multilib build stuff, single ABI (no multilib)
+MULTILIB_ABIS="amd64"
+DEFAULT_ABI="amd64"
+ABI="amd64"
+IUSE_IMPLICIT="abi_x86_64"
+LIBDIR_amd64="lib"
+# We use Clang, let it figure out what is the best to use
+CFLAGS="-march=native"
diff --git a/profiles/prefix/darwin/macos/arch/x64/package.mask b/profiles/prefix/darwin/macos/arch/x64/package.mask
new file mode 100644
index 000000000000..a1de0b1fec70
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x64/package.mask
@@ -0,0 +1,12 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The 32-bits profile is inherited by the 64-bits one!
+# All the Mac OS X profiles inherit from their matching arch profile here.
+
+# The Carbon interface has been removed in the 64-bits userland, only
+# tk-8.6 will come with Cocoa support. If you must have tk, you'll have
+# to force USE=-aqua, but don't report bugs for incompatabilities you
+# might encounter.
+# NOTE: keep this mask synced with 10.7/x86
+<dev-lang/tk-8.6
diff --git a/profiles/prefix/darwin/macos/arch/x64/package.use.force b/profiles/prefix/darwin/macos/arch/x64/package.use.force
new file mode 100644
index 000000000000..84034d863e33
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x64/package.use.force
@@ -0,0 +1,7 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (20 Dec 2016)
+# Force the host target to avoid dependency hell
+sys-devel/clang llvm_targets_X86
+sys-devel/llvm llvm_targets_X86
diff --git a/profiles/prefix/darwin/macos/arch/x64/package.use.mask b/profiles/prefix/darwin/macos/arch/x64/package.use.mask
new file mode 100644
index 000000000000..42c047050b54
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x64/package.use.mask
@@ -0,0 +1,18 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The 32-bits profile is inherited by the 64-bits one!
+# All the Mac OS X profiles inherit from their matching arch profile here.
+
+
+# Christoph Junghans <ottoxr@gentoo.org> (29 Dec 2014)
+# disable optimized assembly code, bug #529584
+media-libs/xvid -pic
+
+# Jeremy Olexa <darkside@gentoo.org> (29 Jul 2010)
+# Relocation issues on 32-bit OSX only, bug #329859
+media-sound/mpg123 -cpu_flags_x86_mmx -cpu_flags_x86_sse
+
+# Fabian Groffen <grobian@gentoo.org> (01 Feb 2009)
+# Doesn't compile on 32-bits OSX only, bug #257225
+media-video/ffmpeg -cpu_flags_x86_mmx
diff --git a/profiles/prefix/darwin/macos/arch/x64/use.force b/profiles/prefix/darwin/macos/arch/x64/use.force
new file mode 100644
index 000000000000..7ffc124249d7
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x64/use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag corresponding to the default ABI
+x64-macos
+abi_x86_64
diff --git a/profiles/prefix/darwin/macos/arch/x64/use.mask b/profiles/prefix/darwin/macos/arch/x64/use.mask
new file mode 100644
index 000000000000..01a9fae674b6
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x64/use.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Unmask the flag corresponding to the default ABI
+-x64-macos
+-abi_x86_64
diff --git a/profiles/prefix/darwin/macos/arch/x86/eapi b/profiles/prefix/darwin/macos/arch/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/arch/x86/make.defaults b/profiles/prefix/darwin/macos/arch/x86/make.defaults
new file mode 100644
index 000000000000..8870f4ea4e4d
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x86/make.defaults
@@ -0,0 +1,16 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x86-macos"
+ACCEPT_KEYWORDS="~x86-macos"
+
+CPU_FLAGS_X86="mmx mmxext sse sse2"
+
+# multilib build stuff, single ABI (no multilib)
+MULTILIB_ABIS="x86"
+DEFAULT_ABI="x86"
+ABI="x86"
+IUSE_IMPLICIT="abi_x86_32"
+LIBDIR_x86="lib"
+# We use Clang, let it figure out what is the best to use
+CFLAGS="-march=native"
diff --git a/profiles/prefix/darwin/macos/arch/x86/package.mask b/profiles/prefix/darwin/macos/arch/x86/package.mask
new file mode 100644
index 000000000000..216c87ab6373
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x86/package.mask
@@ -0,0 +1,5 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Mac OS X profiles inherit from their matching arch profile here.
+
diff --git a/profiles/prefix/darwin/macos/arch/x86/package.use.force b/profiles/prefix/darwin/macos/arch/x86/package.use.force
new file mode 100644
index 000000000000..84034d863e33
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x86/package.use.force
@@ -0,0 +1,7 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (20 Dec 2016)
+# Force the host target to avoid dependency hell
+sys-devel/clang llvm_targets_X86
+sys-devel/llvm llvm_targets_X86
diff --git a/profiles/prefix/darwin/macos/arch/x86/package.use.mask b/profiles/prefix/darwin/macos/arch/x86/package.use.mask
new file mode 100644
index 000000000000..0a0aaa598d36
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x86/package.use.mask
@@ -0,0 +1,18 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Mac OS X profiles inherit from their matching arch profile here.
+
+
+# Alexandre Rostovtsev <tetromono@gentoo.org> (09 Jan 2012)
+# jsc JIT compilation is supported only on amd64/arm/x86 and their prefixes, so
+# it's masked in base profile and unmasked here (bug #396313).
+net-libs/webkit-gtk -jit
+
+# Jeremy Olexa <darkside@gentoo.org> (29 Jul 2010)
+# Relocation issues on 32-bit OSX, bug #329859
+media-sound/mpg123 cpu_flags_x86_mmx cpu_flags_x86_sse
+
+# Fabian Groffen <grobian@gentoo.org> (01 Feb 2009)
+# Doesn't compile, bug #257225
+media-video/ffmpeg cpu_flags_x86_mmx
diff --git a/profiles/prefix/darwin/macos/arch/x86/use.force b/profiles/prefix/darwin/macos/arch/x86/use.force
new file mode 100644
index 000000000000..e5de807ddf57
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x86/use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag corresponding to the default ABI
+x86-macos
+abi_x86_32
diff --git a/profiles/prefix/darwin/macos/arch/x86/use.mask b/profiles/prefix/darwin/macos/arch/x86/use.mask
new file mode 100644
index 000000000000..64aad1244f84
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/x86/use.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Unmask the flag corresponding to the default ABI
+-x86-macos
+-abi_x86_32
diff --git a/profiles/prefix/darwin/macos/eapi b/profiles/prefix/darwin/macos/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/darwin/macos/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/darwin/macos/make.defaults b/profiles/prefix/darwin/macos/make.defaults
new file mode 100644
index 000000000000..3c693127c433
--- /dev/null
+++ b/profiles/prefix/darwin/macos/make.defaults
@@ -0,0 +1,8 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# on OSX one should have objc available
+USE="objc objc++"
+
+# we have OSX, so let's use it's virtues
+USE="${USE} aqua coreaudio ipv6"
diff --git a/profiles/prefix/darwin/macos/package.mask b/profiles/prefix/darwin/macos/package.mask
new file mode 100644
index 000000000000..2adeb6a71837
--- /dev/null
+++ b/profiles/prefix/darwin/macos/package.mask
@@ -0,0 +1,8 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# James Le Cuirot <chewi@gentoo.org> (29 Jul 2015)
+# Recent Oracle releases only support recent Mac OS releases. We can't
+# keep old versions due to vulnerabilities.
+dev-java/oracle-jdk-bin
+dev-java/oracle-jre-bin
diff --git a/profiles/prefix/darwin/macos/package.use.force b/profiles/prefix/darwin/macos/package.use.force
new file mode 100644
index 000000000000..24696d95b0f3
--- /dev/null
+++ b/profiles/prefix/darwin/macos/package.use.force
@@ -0,0 +1,14 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (31 May 2015)
+# for clang ebuild to work, llvm must build the clang frontend
+sys-devel/llvm clang
+
+# Fabian Groffen <grobian@gentoo.org> (24 Mar 2012)
+# Non-threaded target doesn't exist for Mac OS X Intel
+media-gfx/tachyon threads opengl
+
+# Elias Pipping <pipping@gentoo.org> (29 Nov 2007)
+# won't compile without
+media-libs/libsdl opengl
diff --git a/profiles/prefix/darwin/macos/package.use.mask b/profiles/prefix/darwin/macos/package.use.mask
new file mode 100644
index 000000000000..cd0aa4ef5dba
--- /dev/null
+++ b/profiles/prefix/darwin/macos/package.use.mask
@@ -0,0 +1,22 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# James Le Cuirot <chewi@gentoo.org> (29 Jul 2015)
+# JavaFX is included on Mac OS. I think a browser plugin is too but as
+# libjvm rather than libnpjp2 like on Linux so keep nsplugin masked.
+dev-java/oracle-jdk-bin -javafx
+dev-java/oracle-jre-bin -javafx
+
+# Fabian Groffen <grobian@gentoo.org> (30 Oct 2009)
+# X and linux only
+media-video/mplayer xvmc xv dga X xinerama xscreensaver
+media-video/mplayer dvb lirc jack joystick
+
+# Fabian Groffen <grobian@gentoo.org> (06 Aug 2008)
+# runtime loading is horribly broken (it uses fixed .so.0, but when
+# that's fixed it still doesn't work)
+dev-vcs/subversion dso
+
+# Elias Pipping <pipping@gentoo.org> (27 Aug 2007)
+# elinks does not compile with USE=perl (tested with 0.11.{2,3})
+www-client/elinks perl
diff --git a/profiles/prefix/darwin/macos/packages b/profiles/prefix/darwin/macos/packages
new file mode 100644
index 000000000000..a16706c6fe74
--- /dev/null
+++ b/profiles/prefix/darwin/macos/packages
@@ -0,0 +1,7 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Mac OS X is built with LLVM/Clang
+-*sys-devel/gcc
+-*sys-devel/gcc-config
+*sys-devel/clang
diff --git a/profiles/prefix/darwin/macos/parent b/profiles/prefix/darwin/macos/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/darwin/macos/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/darwin/make.defaults b/profiles/prefix/darwin/make.defaults
new file mode 100644
index 000000000000..57e1bb0fd545
--- /dev/null
+++ b/profiles/prefix/darwin/make.defaults
@@ -0,0 +1,18 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# System-wide defaults for all Darwin profiles
+# This file should rarely need to be changed
+
+# 'Sane' defaults
+ELIBC="Darwin"
+KERNEL="Darwin"
+
+# strip isn't GNU
+FEATURES="nostrip"
+
+# ALSA + Darwin != working
+USE_EXPAND="-ALSA_CARDS"
+
+# This is the sort of equivalent of --as-needed
+LDFLAGS="-Wl,-dead_strip_dylibs"
diff --git a/profiles/prefix/darwin/package.mask b/profiles/prefix/darwin/package.mask
new file mode 100644
index 000000000000..5f339ea021ca
--- /dev/null
+++ b/profiles/prefix/darwin/package.mask
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Fabian Groffen <grobian@gentoo.org> (18 Dec 2016)
+# has multiple compilation issue, resolved for 1.1.8, bug #602990
+=app-misc/pax-utils-1.1.7
+
+# Fabian Groffen <grobian@gentoo.org> (10 Sep 2016)
+# revbump for adding libcxx dependency, which we already have, so avoid
+# the hassle
+=sys-devel/llvm-3.8.1-r2
+
+# Fabian Groffen <grobian@gentoo.org> (31 May 2015)
+# fails to compile due to some missing compilerrt stuff, hints at asan,
+# not sure what the problem actually is, 3.7 and 3.8 compile just fine
+=sys-devel/llvm-3.6*
+=sys-devel/clang-3.6*
+
+# Fabian Groffen <grobian@gentoo.org> (08 Feb 2015)
+# missing faccesstat (missing gnulib), bug #538502
+=sys-devel/patch-2.7.4
+
+# Fabian Groffen <grobian@gentoo.org> (19 Oct 2014)
+# Fails during bootstrap, has install_name problems for libstdbuf
+=sys-apps/coreutils-8.23
+
+# Fabian Groffen <grobian@gentoo.org> (12 Aug 2014)
+# Needs some patching, bug #513428
+~dev-libs/libffi-3.1
+
+# Fabian Groffen <grobian@gentoo.org> (14 Jan 2014)
+# util-linux has no business on Darwin systems
+sys-apps/util-linux
+
+# Fabian Groffen <grobian@gentoo.org> (19 Feb 2012)
+# Using FSF GCC on Mac OS X is not supported by Gentoo Prefix. While
+# the FSF GCC compiler is certainly useful, some - if not many -
+# packages expect the Apple branch of GCC, and its (sometimes peculiar)
+# behaviour. Do not file bugs for packages that fail to compile with
+# FSF GCC, if you have patches, please send them directly to upstream.
+sys-devel/gcc
+
+# Fabian Groffen <grobian@gentoo.org> (30 Dec 2011)
+# Does not support Darwin, http://mj.ucw.cz/pciutils.html
+sys-apps/pciutils
+
+# Fabian Groffen <grobian@gentoo.org> (11 May 2011)
+# Uses the horribly broken build-system waf. When hacked far enough,
+# produces a MH_OBJ with invalid install_name called _cairo.bundle.
+~dev-python/pycairo-1.10.0
+
+# Fabian Groffen <grobian@gentoo.org> (21 Apr 2010)
+# state of mesa is probably not too good on OSX, opengl-apple is
+# preferred
+media-libs/mesa
+
+
+# Fabian Groffen <grobian@gentoo.org> (27 Oct 2009)
+# Fails compiling due to some missing dwarf symbols and internal
+# segfaults
+~sys-devel/gcc-4.4.2
+~sys-devel/gcc-4.4.3
+~sys-devel/gcc-4.4.4
+
+# Elias Pipping <pipping@gentoo.org> (09 Oct 2007)
+# darwin-miscutils are only available on darwin
+-sys-apps/darwin-miscutils
+
+# Fabian Groffen <grobian@gentoo.org> (21 Jan 2007)
+# dies with "exhausted memory" errors on Darwin
+=dev-vcs/cvs-1.12.12*
diff --git a/profiles/prefix/darwin/package.use.mask b/profiles/prefix/darwin/package.use.mask
new file mode 100644
index 000000000000..d83ac53d383f
--- /dev/null
+++ b/profiles/prefix/darwin/package.use.mask
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Andreas Sturmlechner <asturm@gentoo.org> (03 Sep 2017)
+# Required media-libs/phonon no longer provides USE=aqua
+dev-qt/qtdemo phonon
+
+# Fabian Groffen <grobian@gentoo.org> (06 Apr 2016)
+# dev-libs/re2 needs love, bug #563932
+app-misc/sphinx re2
+
+# Fabian Groffen <grobian@gentoo.org> (10 Jan 2016)
+# libutempter isn't ported for Darwin, bug #506494
+net-misc/mosh utempter
+
+# Fabian Groffen <grobian@gentoo.org> (26 May 2015)
+# Avoid pulling in broken and unnecessary ossp-uuid, bug #324527
+dev-db/postgresql uuid
+
+# Christoph Junghans <junghans@gentoo.org> (26 Aug 2012)
+# libutempter support does not work on Darwin (bug #388791)
+x11-terms/eterm utempter
+
+# Fabian Groffen <grobian@gentoo.org> (24 Mar 2012)
+# There's no upstream support for MPI on Darwin
+media-gfx/tachyon mpi
+
+# Fabian Groffen <grobian@gentoo.org> (01 Jan 2012)
+# gdb server is not supported on this platform
+sys-devel/gdb server
+
+# Fabian Groffen <grobian@gentoo.org> (16 Feb 2011)
+# De-mask of OSX-specific USE-flags that are useful for VLC
+media-video/vlc -audioqueue -macosx-dialog-provider -macosx-eyetv -macosx-quartztext
+
+# Fabian Groffen <grobian@gentoo.org> (08 Jan 2011)
+# Darwin has libuuid from util-linux
+x11-libs/libSM -uuid
+
+# Fabian Groffen <grobian@gentoo.org> (30 Oct 2009)
+# linux only
+media-video/mplayer dvb lirc jack joystick
+
+# Elias Pipping <pipping@gentoo.org> (16 Nov 2007)
+# make fails
+sys-devel/gcc objc-gc
diff --git a/profiles/prefix/darwin/packages b/profiles/prefix/darwin/packages
new file mode 100644
index 000000000000..ef9a3cc79bf3
--- /dev/null
+++ b/profiles/prefix/darwin/packages
@@ -0,0 +1,7 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+*sys-apps/darwin-miscutils
+*sys-devel/binutils-apple
+*sys-libs/csu
+*sys-process/pkill-darwin
diff --git a/profiles/prefix/darwin/parent b/profiles/prefix/darwin/parent
new file mode 100644
index 000000000000..8f6bb2022d1e
--- /dev/null
+++ b/profiles/prefix/darwin/parent
@@ -0,0 +1,3 @@
+../../base
+../../arch/base
+..
diff --git a/profiles/prefix/darwin/use.force b/profiles/prefix/darwin/use.force
new file mode 100644
index 000000000000..c318091c77bc
--- /dev/null
+++ b/profiles/prefix/darwin/use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add Darwin OS
+kernel_Darwin
+elibc_Darwin
diff --git a/profiles/prefix/darwin/use.mask b/profiles/prefix/darwin/use.mask
new file mode 100644
index 000000000000..8ba77145d248
--- /dev/null
+++ b/profiles/prefix/darwin/use.mask
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#Add USE flags that don't work on Darwin/OpenDarwin/OS X here
+
+# readd globally masked darwin-only flags
+-coreaudio
+-aqua
+
+# Re-add Darwin libc
+-elibc_Darwin
+-kernel_Darwin
+
+
+# these will more than likely never work on darwin
+3dfx
+acpi
+alsa
+apm
+caps
+cman
+clvm
+directfb
+djbfft
+fbcon
+fmod
+ggi
+gpm
+hardened
+
+oss
+sybase
+sybase-ct
+rtc
+v4l
+
+# introspection is far from working on OSX
+introspection
+
+# libcap doesn't work on OSX (fcaps.eclass), bug #534264
+filecaps
+
+# linux-exclusive feature
+inotify
diff --git a/profiles/prefix/eapi b/profiles/prefix/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux-standalone/amd64/eapi b/profiles/prefix/linux-standalone/amd64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux-standalone/amd64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux-standalone/amd64/legacy/eapi b/profiles/prefix/linux-standalone/amd64/legacy/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux-standalone/amd64/legacy/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux-standalone/amd64/legacy/parent b/profiles/prefix/linux-standalone/amd64/legacy/parent
new file mode 100644
index 000000000000..0ca4be1beb9c
--- /dev/null
+++ b/profiles/prefix/linux-standalone/amd64/legacy/parent
@@ -0,0 +1,2 @@
+..
+../../../../features/prefix/standalone/legacy
diff --git a/profiles/prefix/linux-standalone/amd64/make.defaults b/profiles/prefix/linux-standalone/amd64/make.defaults
new file mode 100644
index 000000000000..d0228073bb37
--- /dev/null
+++ b/profiles/prefix/linux-standalone/amd64/make.defaults
@@ -0,0 +1,4 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ACCEPT_KEYWORDS="~${ARCH} ~${ARCH}-linux"
diff --git a/profiles/prefix/linux-standalone/amd64/parent b/profiles/prefix/linux-standalone/amd64/parent
new file mode 100644
index 000000000000..16c974fd71e3
--- /dev/null
+++ b/profiles/prefix/linux-standalone/amd64/parent
@@ -0,0 +1,2 @@
+../../../default/linux/amd64/13.0/no-multilib
+..
diff --git a/profiles/prefix/linux-standalone/arm/armv7a/eapi b/profiles/prefix/linux-standalone/arm/armv7a/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux-standalone/arm/armv7a/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux-standalone/arm/armv7a/make.defaults b/profiles/prefix/linux-standalone/arm/armv7a/make.defaults
new file mode 100644
index 000000000000..1e89fa034dc8
--- /dev/null
+++ b/profiles/prefix/linux-standalone/arm/armv7a/make.defaults
@@ -0,0 +1,4 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ACCEPT_KEYWORDS="~${ARCH}"
diff --git a/profiles/prefix/linux-standalone/arm/armv7a/parent b/profiles/prefix/linux-standalone/arm/armv7a/parent
new file mode 100644
index 000000000000..4365b5efad89
--- /dev/null
+++ b/profiles/prefix/linux-standalone/arm/armv7a/parent
@@ -0,0 +1,2 @@
+../../../../default/linux/arm/13.0/armv7a
+../..
diff --git a/profiles/prefix/linux-standalone/arm64/eapi b/profiles/prefix/linux-standalone/arm64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux-standalone/arm64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux-standalone/arm64/make.defaults b/profiles/prefix/linux-standalone/arm64/make.defaults
new file mode 100644
index 000000000000..1e89fa034dc8
--- /dev/null
+++ b/profiles/prefix/linux-standalone/arm64/make.defaults
@@ -0,0 +1,4 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ACCEPT_KEYWORDS="~${ARCH}"
diff --git a/profiles/prefix/linux-standalone/arm64/parent b/profiles/prefix/linux-standalone/arm64/parent
new file mode 100644
index 000000000000..522a9bfe67ae
--- /dev/null
+++ b/profiles/prefix/linux-standalone/arm64/parent
@@ -0,0 +1,3 @@
+../../../default/linux/arm64/13.0/
+..
+../../../arch/arm64/little-endian/
diff --git a/profiles/prefix/linux-standalone/eapi b/profiles/prefix/linux-standalone/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux-standalone/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux-standalone/make.defaults b/profiles/prefix/linux-standalone/make.defaults
new file mode 100644
index 000000000000..20c32e1479f0
--- /dev/null
+++ b/profiles/prefix/linux-standalone/make.defaults
@@ -0,0 +1,13 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# 'Sane' defaults
+ELIBC="glibc"
+KERNEL="linux"
+
+# 2006/10/28 - Luca Barbato <lu_zero@gentoo.org>
+# on glibc system you cannot turn it off
+USE="iconv"
+
+# build gcc with parallelization support
+USE="${USE} openmp"
diff --git a/profiles/prefix/linux-standalone/packages b/profiles/prefix/linux-standalone/packages
new file mode 100644
index 000000000000..8d5b9aeeb330
--- /dev/null
+++ b/profiles/prefix/linux-standalone/packages
@@ -0,0 +1,12 @@
+# RAP does not need busybox for emergency recovery, the host have all those tools.
+-*sys-apps/busybox
+
+# Most of the iproute2 suit require root privilege to function.
+-*sys-apps/iproute2
+
+# Man pages are not essential.
+-*sys-apps/man-pages
+-*virtual/man
+
+# A service manager is not essential.
+-*virtual/service-manager
diff --git a/profiles/prefix/linux-standalone/parent b/profiles/prefix/linux-standalone/parent
new file mode 100644
index 000000000000..b222cd302d48
--- /dev/null
+++ b/profiles/prefix/linux-standalone/parent
@@ -0,0 +1 @@
+../../features/prefix/standalone
diff --git a/profiles/prefix/linux-standalone/ppc64/eapi b/profiles/prefix/linux-standalone/ppc64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux-standalone/ppc64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux-standalone/ppc64/make.defaults b/profiles/prefix/linux-standalone/ppc64/make.defaults
new file mode 100644
index 000000000000..decd8d8b1eaf
--- /dev/null
+++ b/profiles/prefix/linux-standalone/ppc64/make.defaults
@@ -0,0 +1,4 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ACCEPT_KEYWORDS="~${ARCH}"
diff --git a/profiles/prefix/linux-standalone/ppc64/parent b/profiles/prefix/linux-standalone/ppc64/parent
new file mode 100644
index 000000000000..51fedc0bc3e6
--- /dev/null
+++ b/profiles/prefix/linux-standalone/ppc64/parent
@@ -0,0 +1,2 @@
+../../../default/linux/powerpc/ppc64/13.0/64bit-userland
+..
diff --git a/profiles/prefix/linux-standalone/profile.bashrc b/profiles/prefix/linux-standalone/profile.bashrc
new file mode 100644
index 000000000000..4b39a3e25d5b
--- /dev/null
+++ b/profiles/prefix/linux-standalone/profile.bashrc
@@ -0,0 +1,86 @@
+# -*- mode: shell-script; -*-
+# RAP specific patches pending upstream:
+# binutils: http://article.gmane.org/gmane.comp.gnu.binutils/67593
+# gcc: https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00331.html
+
+# Disable RAP trick during bootstrap stage2
+[[ -z ${BOOTSTRAP_RAP_STAGE2} ]] || return 0
+
+if [[ ${CATEGORY}/${PN} == sys-devel/gcc && ${EBUILD_PHASE} == configure ]]; then
+ cd "${S}"
+ einfo "Prefixifying dynamic linkers..."
+ for h in gcc/config/*/*linux*.h; do
+ ebegin " Updating $h"
+ sed -i -r "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g" $h
+ eend $?
+ done
+
+ # use sysroot of toolchain to get currect include and library at compile time
+ EXTRA_ECONF="${EXTRA_ECONF} --with-sysroot=${EPREFIX}"
+
+ ebegin "remove --sysroot call on ld for native toolchain"
+ sed -i 's/--sysroot=%R//' gcc/gcc.c
+ eend $?
+elif [[ ${CATEGORY}/${PN} == sys-devel/binutils && ${EBUILD_PHASE} == prepare ]]; then
+ ebegin "Prefixifying native library path"
+ sed -i -r "/NATIVE_LIB_DIRS/s,((/usr(/local|)|)/lib),${EPREFIX}\1,g" \
+ "${S}"/ld/configure.tgt
+ eend $?
+ ebegin "Prefixifying path to /etc/ld.so.conf"
+ sed -i -r "s,\"/etc,\"${EPREFIX}/etc," "${S}"/ld/emultempl/elf32.em
+ eend $?
+elif [[ ${CATEGORY}/${PN} == sys-libs/glibc && ${EBUILD_PHASE} == compile ]]; then
+ cd "${S}"
+ einfo "Prefixifying hardcoded path"
+
+ for f in libio/iopopen.c \
+ shadow/lckpwdf.c resolv/{netdb,resolv}.h elf/rtld.c \
+ nis/nss_compat/compat-{grp,initgroups,{,s}pwd}.c \
+ nss/{bug-erange,nss_files/files-init{,groups}}.c \
+ sysdeps/{{generic,unix/sysv/linux}/paths.h,posix/system.c}
+ do
+ ebegin " Updating $f"
+ sed -i -r "s,([:\"])/(etc|usr|bin|var),\1${EPREFIX}/\2,g" $f
+ eend $?
+ done
+ ebegin " Updating nss/db-Makefile"
+ sed -i -r \
+ -e "s,/(etc|var),${EPREFIX}/\1,g" \
+ nss/db-Makefile
+ eend $?
+elif [[ ${CATEGORY}/${PN} == dev-lang/python && ${EBUILD_PHASE} == configure ]]; then
+ # Guide h2py to look into glibc of Prefix
+ ebegin "Guiding h2py to look into Prefix"
+ export include="${EPREFIX}"/usr/include
+ sed -i -r \
+ -e "s,/usr/include,\"${EPREFIX}\"/usr/include,g" "${S}"/Lib/plat-linux*/regen
+ eend $?
+ ebegin "Prefixifying distutils paths"
+ sed -re "s,([^[:alnum:]])(/usr[/[:alnum:]]*/(lib[[:alnum:]]*|include)|/lib[[:alnum:]]*),\1${EPREFIX}\2,g" \
+ -i "${S}"/setup.py
+ eend $?
+elif [[ ${CATEGORY}/${PN} == dev-lang/perl && ${EBUILD_PHASE} == configure ]]; then
+ ebegin "Prefixifying pwd path"
+ sed -r "s,'((|/usr)/bin/pwd),'${EPREFIX}\1," -i "${S}"/dist/PathTools/Cwd.pm
+ eend $?
+
+ # Configure checks for /system/lib/libandroid.so to override linux into linux-android,
+ # which is not desired for Gentoo
+ ebegin "Removing Android detection"
+ sed "/libandroid.so/d" -i "${S}"/Configure
+ eend $?
+elif [[ ${CATEGORY}/${PN} == sys-devel/make && ${EBUILD_PHASE} == prepare ]]; then
+ ebegin "Prefixifying default shell"
+ sed -i -r "/default_shell/s,\"(/bin/sh),\"${EPREFIX}\1," "${S}"/job.c
+ eend $?
+elif [[ ${CATEGORY}/${PN} == sys-libs/zlib && ${EBUILD_PHASE} == prepare ]]; then
+ [[ -n "${BOOTSTRAP_RAP}" ]] || return 0
+ ebegin "Remove executable builds for bootstrap"
+ sed -i 's/ALL=.*/ALL="\\$(LIBS)"/' "${S}"/configure
+ eend $?
+elif [[ ${CATEGORY}/${PN} == dev-lang/php && ${EBUILD_PHASE} == prepare ]]; then
+ # introduced in bug 419525, subtle glibc location difference.
+ ebegin "Prefixifying ext/iconv/config.m4 paths"
+ sed -i -r "/for i in/s,(/usr(/local|)),${EPREFIX}\1,g" "${S}"/ext/iconv/config.m4
+ eend $?
+fi
diff --git a/profiles/prefix/linux-standalone/x86/eapi b/profiles/prefix/linux-standalone/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux-standalone/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux-standalone/x86/legacy/eapi b/profiles/prefix/linux-standalone/x86/legacy/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux-standalone/x86/legacy/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux-standalone/x86/legacy/parent b/profiles/prefix/linux-standalone/x86/legacy/parent
new file mode 100644
index 000000000000..0ca4be1beb9c
--- /dev/null
+++ b/profiles/prefix/linux-standalone/x86/legacy/parent
@@ -0,0 +1,2 @@
+..
+../../../../features/prefix/standalone/legacy
diff --git a/profiles/prefix/linux-standalone/x86/make.defaults b/profiles/prefix/linux-standalone/x86/make.defaults
new file mode 100644
index 000000000000..d0228073bb37
--- /dev/null
+++ b/profiles/prefix/linux-standalone/x86/make.defaults
@@ -0,0 +1,4 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ACCEPT_KEYWORDS="~${ARCH} ~${ARCH}-linux"
diff --git a/profiles/prefix/linux-standalone/x86/parent b/profiles/prefix/linux-standalone/x86/parent
new file mode 100644
index 000000000000..0fbf3318c1e6
--- /dev/null
+++ b/profiles/prefix/linux-standalone/x86/parent
@@ -0,0 +1,2 @@
+../../../default/linux/x86/13.0
+..
diff --git a/profiles/prefix/linux/amd64/eapi b/profiles/prefix/linux/amd64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux/amd64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux/amd64/make.defaults b/profiles/prefix/linux/amd64/make.defaults
new file mode 100644
index 000000000000..01d39d236ab9
--- /dev/null
+++ b/profiles/prefix/linux/amd64/make.defaults
@@ -0,0 +1,11 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#Note: this is Gentoo Prefix specific! (13 Jul 2008, darkside)
+
+# The base profile sets ACCEPT_KEYWORDS=amd64 and we don't have that in prefix.
+ACCEPT_KEYWORDS="-amd64 ~amd64-linux"
+
+# We don't have lib64 or multilib in prefix, but single ABI, so remove it here.
+SYMLINK_LIB=""
+LIBDIR_amd64="lib"
diff --git a/profiles/prefix/linux/amd64/parent b/profiles/prefix/linux/amd64/parent
new file mode 100644
index 000000000000..16c974fd71e3
--- /dev/null
+++ b/profiles/prefix/linux/amd64/parent
@@ -0,0 +1,2 @@
+../../../default/linux/amd64/13.0/no-multilib
+..
diff --git a/profiles/prefix/linux/arm/eapi b/profiles/prefix/linux/arm/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux/arm/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux/arm/make.defaults b/profiles/prefix/linux/arm/make.defaults
new file mode 100644
index 000000000000..33360a56b8f2
--- /dev/null
+++ b/profiles/prefix/linux/arm/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="arm"
+# This is a pretty specific profile to the armv7 arch, we can change that later
+CHOST="armv7a-softfloat-linux-gnueabi"
diff --git a/profiles/prefix/linux/arm/parent b/profiles/prefix/linux/arm/parent
new file mode 100644
index 000000000000..c9cb641f50d9
--- /dev/null
+++ b/profiles/prefix/linux/arm/parent
@@ -0,0 +1,2 @@
+../../../default/linux/arm/13.0
+..
diff --git a/profiles/prefix/linux/eapi b/profiles/prefix/linux/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux/make.defaults b/profiles/prefix/linux/make.defaults
new file mode 100644
index 000000000000..4e2672bc1ceb
--- /dev/null
+++ b/profiles/prefix/linux/make.defaults
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# 'Sane' defaults
+ELIBC="glibc"
+KERNEL="linux"
+
+# Fabian Groffen <grobian@gentoo.org> (13 Sep 2017)
+# Traditional Prefix is no-multilib, and always installs in /lib so
+# don't check against this for "incompatible" objects
+FEATURES="-multilib-strict"
+
+# 2006/10/28 - Luca Barbato <lu_zero@gentoo.org>
+# on glibc system you cannot turn it off
+USE="iconv"
+
+# build gcc with parallelization support
+USE="${USE} openmp"
+
+# Turn off acl to help with bootstrapping - it isn't as helpful for prefix as it
+# can be for a non-prefix install
+USE="${USE} -acl"
+
+# 2008/07/09 - Doug Goldstein <cardoe@gentoo.org>
+# Adding LDFLAGS="-Wl,-O1 for all Linux profiles by default
+# after discussion on the gentoo-dev ML. As we bang out a clear
+# direction with how LDFLAGS will be set by default, this entry
+# may move.
+# 2010/08/12 - Fabian Groffen <grobian@gentoo.org>
+# Unlike default/linux, we do NOT have --as-needed here, as it seems to
+# break a random amount of packages, that don't break (or just not
+# enough) for non-Prefix installs.
+LDFLAGS="-Wl,-O1"
+
diff --git a/profiles/prefix/linux/package.mask b/profiles/prefix/linux/package.mask
new file mode 100644
index 000000000000..17532723914b
--- /dev/null
+++ b/profiles/prefix/linux/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/linux/packages b/profiles/prefix/linux/packages
new file mode 100644
index 000000000000..ffd4b62cff8e
--- /dev/null
+++ b/profiles/prefix/linux/packages
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Here we remove packages that default/linux/packages pulls in and have no
+# business being in Gentoo Prefix
+-*sys-apps/busybox
+-*sys-apps/util-linux
diff --git a/profiles/prefix/linux/parent b/profiles/prefix/linux/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/linux/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/linux/ppc64/eapi b/profiles/prefix/linux/ppc64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux/ppc64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux/ppc64/make.defaults b/profiles/prefix/linux/ppc64/make.defaults
new file mode 100644
index 000000000000..6be345d8d6b6
--- /dev/null
+++ b/profiles/prefix/linux/ppc64/make.defaults
@@ -0,0 +1,12 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="ppc64"
+CHOST="powerpc64-pc-linux-gnu"
+# The base profile sets ACCEPT_KEYWORDS=ppc64 and we don't have that in prefix.
+# Eventually, ~* should be removed once someone is motivated for this arch
+ACCEPT_KEYWORDS="-ppc64 ~ppc64-linux ~*"
+
+# We don't have lib64 in prefix so, remove it here.
+SYMLINK_LIB=""
+LIBDIR_ppc64="lib"
diff --git a/profiles/prefix/linux/ppc64/packages b/profiles/prefix/linux/ppc64/packages
new file mode 100644
index 000000000000..491ae59c3c83
--- /dev/null
+++ b/profiles/prefix/linux/ppc64/packages
@@ -0,0 +1,7 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Those are part of the base powerpc profile's @system set, but having them as
+# part of @system makes no sense for Gentoo Prefix.
+-*sys-fs/hfsutils
+-*sys-fs/hfsplusutils
diff --git a/profiles/prefix/linux/ppc64/parent b/profiles/prefix/linux/ppc64/parent
new file mode 100644
index 000000000000..51fedc0bc3e6
--- /dev/null
+++ b/profiles/prefix/linux/ppc64/parent
@@ -0,0 +1,2 @@
+../../../default/linux/powerpc/ppc64/13.0/64bit-userland
+..
diff --git a/profiles/prefix/linux/profile.bashrc b/profiles/prefix/linux/profile.bashrc
new file mode 100644
index 000000000000..9a4890117525
--- /dev/null
+++ b/profiles/prefix/linux/profile.bashrc
@@ -0,0 +1,44 @@
+# This is a ugly issue, see bug 289757 for origins
+# This mimics the check in gcc ebuilds, bug 362315
+#
+# # Remember, bash treats floats like strings..
+
+get_libc_vers_min() {
+ if [[ -x /usr/bin/ldd ]] ; then
+ /usr/bin/ldd --version \
+ | head -n1 \
+ | grep -o ") 2\.[0-9]\+" \
+ | cut -d. -f2
+ return
+ elif [[ -x /lib/libc.so.6 || -x /lib64/libc.so.6 ]] ; then
+ {
+ /lib/libc.so.6 || /lib64/libc.so.6
+ } 2>/dev/null \
+ | head -n1 \
+ | grep -o 'version 2\.[0-9]\+' \
+ | cut -d. -f2
+ return
+ fi
+ echo "0"
+}
+
+if [[ ${CATEGORY}/${PN} == sys-devel/gcc && ${EBUILD_PHASE} == unpack ]]; then
+ # Since 2.3 > 2.12 in numerical terms, just compare 2.X to 2.Y, will break
+ # if >=3.0 is ever released
+ VERS=$(get_libc_vers_min)
+ if [[ $VERS -lt 12 ]]; then # compare host glibc 2.x to 2.12
+ ewarn "Your host glibc is too old; disabling automatic fortify. bug 289757"
+ EPATCH_EXCLUDE+=" 10_all_gcc-default-fortify-source.patch" # <=gcc-4.5*
+ EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch" # >=gcc-4.6*
+ fi
+fi
+
+if [[ ${EBUILD_PHASE} == setup ]]; then
+ VERS=$(get_libc_vers_min)
+ if [[ $VERS -lt 6 && "${CFLAGS} " != *'gnu89-inline '* ]]; then # compare host glibc 2.x to 2.6
+ einfo "Your host glibc is too old; enabling -fgnu89-inline compiler flag. bug 473524"
+ CFLAGS="${CFLAGS} -fgnu89-inline" # for C only
+ fi
+fi
+
+# vim: set syn=sh:
diff --git a/profiles/prefix/linux/use.mask b/profiles/prefix/linux/use.mask
new file mode 100644
index 000000000000..03831a79a58d
--- /dev/null
+++ b/profiles/prefix/linux/use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (19 Apr 2016)
+# Unmask the linux-glibc combo, or we get bug#574822.
+-elibc_glibc
+-kernel_linux
diff --git a/profiles/prefix/linux/x86/eapi b/profiles/prefix/linux/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/linux/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/linux/x86/make.defaults b/profiles/prefix/linux/x86/make.defaults
new file mode 100644
index 000000000000..8a679deb0752
--- /dev/null
+++ b/profiles/prefix/linux/x86/make.defaults
@@ -0,0 +1,9 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# The base profile sets ACCEPT_KEYWORDS=x86 and we don't have that in prefix.
+ACCEPT_KEYWORDS="-x86 ~x86-linux"
+
+# in case we are bootstrapping with the host compiler on an amd64 linux host:
+CFLAGS="${CFLAGS} -m32"
+CXXFLAGS="${CXXFLAGS} -m32"
diff --git a/profiles/prefix/linux/x86/parent b/profiles/prefix/linux/x86/parent
new file mode 100644
index 000000000000..0fbf3318c1e6
--- /dev/null
+++ b/profiles/prefix/linux/x86/parent
@@ -0,0 +1,2 @@
+../../../default/linux/x86/13.0
+..
diff --git a/profiles/prefix/linux/x86/profile.bashrc b/profiles/prefix/linux/x86/profile.bashrc
new file mode 100644
index 000000000000..5e3242d8ff41
--- /dev/null
+++ b/profiles/prefix/linux/x86/profile.bashrc
@@ -0,0 +1,12 @@
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+
+# When x86-linux runs on an amd64 host having /lib32,
+# we need to have binutils to search there too (#360197).
+# The patches to do so are applied upon SYMLINK_LIB=yes,
+# needed when /lib32 is (a symlink to) an existing directory.
+if [[ ${CATEGORY}/${PN} = sys-devel/binutils ]] \
+&& [[ ${EBUILD_PHASE} == setup ]] \
+&& [[ -d ${ROOT}lib32/. ]] \
+; then
+ export SYMLINK_LIB=yes
+fi
diff --git a/profiles/prefix/make.defaults b/profiles/prefix/make.defaults
new file mode 100644
index 000000000000..9cd0b2c7bb8f
--- /dev/null
+++ b/profiles/prefix/make.defaults
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Some USE-flags that only die-hards don't want:
+# readline: to have some sane command line editing, e.g. in python
+# zlib: for many things you just want gzip support
+# ncurses: a nice working console drawing library
+# ssl: encrypted connections are a nice feature
+USE="readline zlib ncurses ssl"
+
+FEATURES="collision-protect"
+
+# Python 3.5 is unmasked for us, build stuff by default, in particular
+# for bug #572502 where the default python is set to 3.5 for it was
+# built first. Drop Python 3.4 to avoid unnecessary builds.
+PYTHON_TARGETS="python2_7 python3_5"
+PYTHON_SINGLE_TARGET="python3_5"
+
+# Move away from ruby21, fast forward to ruby24, we don't have ruby23
+RUBY_TARGETS="ruby22 ruby24"
diff --git a/profiles/prefix/mint/eapi b/profiles/prefix/mint/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/mint/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/mint/m68k/eapi b/profiles/prefix/mint/m68k/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/mint/m68k/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/mint/m68k/make.defaults b/profiles/prefix/mint/m68k/make.defaults
new file mode 100644
index 000000000000..326a928552ce
--- /dev/null
+++ b/profiles/prefix/mint/m68k/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="m68k-mint"
+CHOST="m68k-atari-mint"
+ACCEPT_KEYWORDS="~m68k-mint"
diff --git a/profiles/prefix/mint/m68k/parent b/profiles/prefix/mint/m68k/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/mint/m68k/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/mint/m68k/use.mask b/profiles/prefix/mint/m68k/use.mask
new file mode 100644
index 000000000000..ef162720aed2
--- /dev/null
+++ b/profiles/prefix/mint/m68k/use.mask
@@ -0,0 +1,5 @@
+# Copyright 1999-2009 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+# dlopen() doesn't work in MiNT
+dso
diff --git a/profiles/prefix/mint/make.defaults b/profiles/prefix/mint/make.defaults
new file mode 100644
index 000000000000..89ce23bd9145
--- /dev/null
+++ b/profiles/prefix/mint/make.defaults
@@ -0,0 +1,12 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# System-wide defaults for all MiNT profiles
+# This file should rarely need to be changed
+
+# 'Sane' defaults
+ELIBC="mintlib"
+KERNEL="freemint"
+
+# openmp: bug #515616
+USE="fortran static-libs -openmp"
diff --git a/profiles/prefix/mint/package.use.force b/profiles/prefix/mint/package.use.force
new file mode 100644
index 000000000000..b4313ba599ca
--- /dev/null
+++ b/profiles/prefix/mint/package.use.force
@@ -0,0 +1,9 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (18 Apr 2016)
+# adjust MiNT specifics via USE flags
+sys-apps/coreutils hostname kill
+
+#364789
+app-arch/libarchive static-libs
diff --git a/profiles/prefix/mint/package.use.mask b/profiles/prefix/mint/package.use.mask
new file mode 100644
index 000000000000..d0abe37cb88f
--- /dev/null
+++ b/profiles/prefix/mint/package.use.mask
@@ -0,0 +1,14 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Alan Hourihane <alanh@fairlite.co.uk> (11 Mar 2014)
+# plays havoc with GNU pth bug #503764
+dev-lang/tcl threads
+
+# Alan Hourihane <alanh@fairlite.co.uk> (30 Dec 2011)
+# xz-utils plays havoc with GNU pth
+app-arch/xz-utils threads
+
+# Alan Hourihane <alanh@fairlite.co.uk> (15 Dec 2011)
+# MiNT doesn't have mmap, and jit requires it.
+dev-libs/libpcre jit
diff --git a/profiles/prefix/mint/packages b/profiles/prefix/mint/packages
new file mode 100644
index 000000000000..1654df5ca8b0
--- /dev/null
+++ b/profiles/prefix/mint/packages
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation.
+# Distributed under the terms of the GNU General Public License v2
+
+*sys-devel/binutils
diff --git a/profiles/prefix/mint/parent b/profiles/prefix/mint/parent
new file mode 100644
index 000000000000..8f6bb2022d1e
--- /dev/null
+++ b/profiles/prefix/mint/parent
@@ -0,0 +1,3 @@
+../../base
+../../arch/base
+..
diff --git a/profiles/prefix/mint/use.mask b/profiles/prefix/mint/use.mask
new file mode 100644
index 000000000000..672a528372d9
--- /dev/null
+++ b/profiles/prefix/mint/use.mask
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add MiNT libc
+-elibc_mintlib
+-kernel_freemint
+
+# these will more than likely never work on MiNT
+3dfx
+acpi
+alsa
+apm
+caps
+cman
+clvm
+directfb
+djbfft
+fbcon
+fmod
+ggi
+gpm
+hardened
+ipv6
+oss
+svga
+sybase
+sybase-ct
+rtc
+uclibc
+v4l
+
+# git doesn't work at this time, bug #339031\
+git
diff --git a/profiles/prefix/package.mask b/profiles/prefix/package.mask
new file mode 100644
index 000000000000..e7ab873478fd
--- /dev/null
+++ b/profiles/prefix/package.mask
@@ -0,0 +1,22 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# When you add an entry to the top of this file, add your name, the date, and
+# an explanation of why something is getting masked. This file is for
+# Prefix profiles only!
+#
+# NOTE: Please add your entry at the top!
+#
+
+# Fabian Groffen <grobian@gentoo.org> (15 Apr 2017)
+# reentrant patch breaks prefix option, bug #615560
+=sys-devel/flex-2.6.3-r1
+
+# Elias Pipping <pipping@gentoo.org> (09 Oct 2007)
+# darwin-miscutils are only available on darwin
+sys-apps/darwin-miscutils
+
+# Fabian Groffen <grobian@gentoo.org> (04 Apr 2007)
+# Don't use this, it is only provided for experimentation and as tool to
+# recover from broken linker situations.
+sys-devel/native-cctools
diff --git a/profiles/prefix/package.use.mask b/profiles/prefix/package.use.mask
new file mode 100644
index 000000000000..18eaf346e1d7
--- /dev/null
+++ b/profiles/prefix/package.use.mask
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (27 Jun 2016)
+# sys-libs/libseccomp is a linux interface, not sure if it will work
+# in prefix for Linux either, bug #585756
+app-misc/pax-utils seccomp
+
+# Mikle Kolyada <zlogene@gentoo.org> (29 Nov 2014)
+# Masked because of lack of manpower/time (bug #497068)
+dev-vcs/git mediawiki mediawiki-experimental
+
+# Fabian Groffen <grobian@gentoo.org> (23 Oct 2010)
+# IPC relies on pipes, selects, polls, and more stuff that Python is
+# very bad with, that really causes way more issues than it is worth to
+# have some boundary bugs solved and more robust subshell die support
+sys-apps/portage ipc
+
+# Michael Haubenwallner <haubi@gentoo.org> (17 Sep 2010)
+# sys-apps/keyutils is a linux only package
+app-crypt/mit-krb5 keyutils
+
+# Michael Haubenwallner <haubi@gentoo.org> (30 Sep 2009)
+# Most prefix platforms do/can not have a uuid implementation (#230981).
+x11-libs/libSM uuid
diff --git a/profiles/prefix/packages b/profiles/prefix/packages
new file mode 100644
index 000000000000..5bf242d44567
--- /dev/null
+++ b/profiles/prefix/packages
@@ -0,0 +1,9 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# we don't want binutils everywhere, only in linux and solaris
+-*sys-devel/binutils
+
+# linux only
+-*sys-process/procps
+-*sys-process/psmisc
diff --git a/profiles/prefix/parent b/profiles/prefix/parent
new file mode 100644
index 000000000000..8f0e9fd7471d
--- /dev/null
+++ b/profiles/prefix/parent
@@ -0,0 +1 @@
+../features/prefix/rpath
diff --git a/profiles/prefix/sunos/eapi b/profiles/prefix/sunos/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/make.defaults b/profiles/prefix/sunos/make.defaults
new file mode 100644
index 000000000000..3d5076651913
--- /dev/null
+++ b/profiles/prefix/sunos/make.defaults
@@ -0,0 +1,13 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# System-wide defaults for all SunOS profiles
+# This file should rarely need to be changed
+
+# 'Sane' defaults
+ELIBC="SunOS"
+KERNEL="SunOS"
+
+# stripping stuff works but makes
+# i.e. ldd output completely empty, which is sort of annoying
+FEATURES="nostrip"
diff --git a/profiles/prefix/sunos/packages b/profiles/prefix/sunos/packages
new file mode 100644
index 000000000000..869d80c4ff0f
--- /dev/null
+++ b/profiles/prefix/sunos/packages
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+*sys-devel/binutils
diff --git a/profiles/prefix/sunos/parent b/profiles/prefix/sunos/parent
new file mode 100644
index 000000000000..8f6bb2022d1e
--- /dev/null
+++ b/profiles/prefix/sunos/parent
@@ -0,0 +1,3 @@
+../../base
+../../arch/base
+..
diff --git a/profiles/prefix/sunos/solaris/5.10/eapi b/profiles/prefix/sunos/solaris/5.10/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.10/package.mask b/profiles/prefix/sunos/solaris/5.10/package.mask
new file mode 100644
index 000000000000..3e3cc3434f46
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/package.mask
@@ -0,0 +1,3 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/sunos/solaris/5.10/parent b/profiles/prefix/sunos/solaris/5.10/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/sunos/solaris/5.10/profile.bashrc b/profiles/prefix/sunos/solaris/5.10/profile.bashrc
new file mode 100644
index 000000000000..199976276664
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/profile.bashrc
@@ -0,0 +1,10 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [[ ${EBUILD_PHASE} == setup ]] ; then
+ if [[ ${CATEGORY}/${PN} == sys-devel/flex ]] ; then
+ # Solaris 10's <stdbool.h> requires the C99 standard
+ [[ " ${CFLAGS} " == *" -std=c99 "* ]] || CFLAGS="-std=c99 ${CFLAGS}"
+ [[ " ${CXXFLAGS} " == *" -std=c99 "* ]] || CXXFLAGS="-std=c99 ${CXXFLAGS}"
+ fi
+fi
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc/eapi b/profiles/prefix/sunos/solaris/5.10/sparc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc/make.defaults b/profiles/prefix/sunos/solaris/5.10/sparc/make.defaults
new file mode 100644
index 000000000000..9557d14f8d44
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc/make.defaults
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="sparc-solaris"
+CHOST="sparc-sun-solaris2.10"
+ACCEPT_KEYWORDS="~sparc-solaris"
+
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc/package.mask b/profiles/prefix/sunos/solaris/5.10/sparc/package.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc/package.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc/package.use.mask b/profiles/prefix/sunos/solaris/5.10/sparc/package.use.mask
new file mode 100644
index 000000000000..f7ac4607b395
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc/package.use.mask
@@ -0,0 +1,3 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc/parent b/profiles/prefix/sunos/solaris/5.10/sparc/parent
new file mode 100644
index 000000000000..356d2b757b15
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc/parent
@@ -0,0 +1,2 @@
+..
+../../arch/sparc
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc64/eapi b/profiles/prefix/sunos/solaris/5.10/sparc64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc64/make.defaults b/profiles/prefix/sunos/solaris/5.10/sparc64/make.defaults
new file mode 100644
index 000000000000..cf284c55f436
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc64/make.defaults
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="sparc64-solaris"
+CHOST="sparcv9-sun-solaris2.10"
+ACCEPT_KEYWORDS="~sparc64-solaris"
+
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc64/package.mask b/profiles/prefix/sunos/solaris/5.10/sparc64/package.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc64/package.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc64/package.use.mask b/profiles/prefix/sunos/solaris/5.10/sparc64/package.use.mask
new file mode 100644
index 000000000000..f7ac4607b395
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc64/package.use.mask
@@ -0,0 +1,3 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/sunos/solaris/5.10/sparc64/parent b/profiles/prefix/sunos/solaris/5.10/sparc64/parent
new file mode 100644
index 000000000000..6321d7e3ecda
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/sparc64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/sparc64
diff --git a/profiles/prefix/sunos/solaris/5.10/use.mask b/profiles/prefix/sunos/solaris/5.10/use.mask
new file mode 100644
index 000000000000..5fcc8b468e5a
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (22 Aug 2017)
+# PIE is basically not supported on non-Linux
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57409
+pie
diff --git a/profiles/prefix/sunos/solaris/5.10/x64/eapi b/profiles/prefix/sunos/solaris/5.10/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.10/x64/make.defaults b/profiles/prefix/sunos/solaris/5.10/x64/make.defaults
new file mode 100644
index 000000000000..78dfad702e41
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/x64/make.defaults
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x64-solaris"
+CHOST="x86_64-pc-solaris2.10"
+ACCEPT_KEYWORDS="~x64-solaris"
+
diff --git a/profiles/prefix/sunos/solaris/5.10/x64/package.mask b/profiles/prefix/sunos/solaris/5.10/x64/package.mask
new file mode 100644
index 000000000000..0cc0ba14627f
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/x64/package.mask
@@ -0,0 +1,2 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
diff --git a/profiles/prefix/sunos/solaris/5.10/x64/package.use.mask b/profiles/prefix/sunos/solaris/5.10/x64/package.use.mask
new file mode 100644
index 000000000000..bddf5edb63e4
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/sunos/solaris/5.10/x64/parent b/profiles/prefix/sunos/solaris/5.10/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/sunos/solaris/5.10/x86/eapi b/profiles/prefix/sunos/solaris/5.10/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.10/x86/make.defaults b/profiles/prefix/sunos/solaris/5.10/x86/make.defaults
new file mode 100644
index 000000000000..43ada07c78a7
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/x86/make.defaults
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x86-solaris"
+CHOST="i386-pc-solaris2.10"
+ACCEPT_KEYWORDS="~x86-solaris"
+
diff --git a/profiles/prefix/sunos/solaris/5.10/x86/parent b/profiles/prefix/sunos/solaris/5.10/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.10/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/sunos/solaris/5.11/eapi b/profiles/prefix/sunos/solaris/5.11/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.11/package.use.mask b/profiles/prefix/sunos/solaris/5.11/package.use.mask
new file mode 100644
index 000000000000..475bf85e8d67
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Fabian Groffen <grobian@gentoo.org> (30 Mar 2011)
+# git is broken with some repack failure (OpenSolaris only)
+sys-devel/gettext git
diff --git a/profiles/prefix/sunos/solaris/5.11/packages b/profiles/prefix/sunos/solaris/5.11/packages
new file mode 100644
index 000000000000..6745479f9f8e
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/packages
@@ -0,0 +1,11 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Host provided libuuid.so links against libpool.so, which in turn links
+# against libxml2.so. In the latter it looks for SUNW@ symbols which
+# our Prefix-provided libxml2.so doesn't have and cause problems, hence
+# we need to provide libuuid.so ourselves for packages that use it.
+# It's added here, because in previous releases we relied on the
+# system-provided libuuid, but now no longer can, and ebuilds can't
+# easily make the difference.
+*sys-libs/libuuid
diff --git a/profiles/prefix/sunos/solaris/5.11/parent b/profiles/prefix/sunos/solaris/5.11/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc/eapi b/profiles/prefix/sunos/solaris/5.11/sparc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc/make.defaults b/profiles/prefix/sunos/solaris/5.11/sparc/make.defaults
new file mode 100644
index 000000000000..3812f55e1242
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc/make.defaults
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="sparc-solaris"
+CHOST="sparc-sun-solaris2.11"
+ACCEPT_KEYWORDS="~sparc-solaris"
+
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc/package.mask b/profiles/prefix/sunos/solaris/5.11/sparc/package.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc/package.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc/package.use.mask b/profiles/prefix/sunos/solaris/5.11/sparc/package.use.mask
new file mode 100644
index 000000000000..f7ac4607b395
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc/package.use.mask
@@ -0,0 +1,3 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc/parent b/profiles/prefix/sunos/solaris/5.11/sparc/parent
new file mode 100644
index 000000000000..356d2b757b15
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc/parent
@@ -0,0 +1,2 @@
+..
+../../arch/sparc
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc64/eapi b/profiles/prefix/sunos/solaris/5.11/sparc64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc64/make.defaults b/profiles/prefix/sunos/solaris/5.11/sparc64/make.defaults
new file mode 100644
index 000000000000..8b0a6c090f15
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc64/make.defaults
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="sparc64-solaris"
+CHOST="sparcv9-sun-solaris2.11"
+ACCEPT_KEYWORDS="~sparc64-solaris"
+
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc64/package.mask b/profiles/prefix/sunos/solaris/5.11/sparc64/package.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc64/package.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc64/package.use.mask b/profiles/prefix/sunos/solaris/5.11/sparc64/package.use.mask
new file mode 100644
index 000000000000..f7ac4607b395
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc64/package.use.mask
@@ -0,0 +1,3 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/sunos/solaris/5.11/sparc64/parent b/profiles/prefix/sunos/solaris/5.11/sparc64/parent
new file mode 100644
index 000000000000..6321d7e3ecda
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/sparc64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/sparc64
diff --git a/profiles/prefix/sunos/solaris/5.11/x64/eapi b/profiles/prefix/sunos/solaris/5.11/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.11/x64/make.defaults b/profiles/prefix/sunos/solaris/5.11/x64/make.defaults
new file mode 100644
index 000000000000..01ec27d83eae
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/x64/make.defaults
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x64-solaris"
+CHOST="x86_64-pc-solaris2.11"
+ACCEPT_KEYWORDS="~x64-solaris"
+
diff --git a/profiles/prefix/sunos/solaris/5.11/x64/package.use.mask b/profiles/prefix/sunos/solaris/5.11/x64/package.use.mask
new file mode 100644
index 000000000000..bddf5edb63e4
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/x64/package.use.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/sunos/solaris/5.11/x64/parent b/profiles/prefix/sunos/solaris/5.11/x64/parent
new file mode 100644
index 000000000000..269f6f48bb15
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/x64/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x64
diff --git a/profiles/prefix/sunos/solaris/5.11/x86/eapi b/profiles/prefix/sunos/solaris/5.11/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.11/x86/make.defaults b/profiles/prefix/sunos/solaris/5.11/x86/make.defaults
new file mode 100644
index 000000000000..e9071fa2391d
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/x86/make.defaults
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x86-solaris"
+CHOST="i386-pc-solaris2.11"
+ACCEPT_KEYWORDS="~x86-solaris"
+
diff --git a/profiles/prefix/sunos/solaris/5.11/x86/package.use.mask b/profiles/prefix/sunos/solaris/5.11/x86/package.use.mask
new file mode 100644
index 000000000000..f7ac4607b395
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/x86/package.use.mask
@@ -0,0 +1,3 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
diff --git a/profiles/prefix/sunos/solaris/5.11/x86/parent b/profiles/prefix/sunos/solaris/5.11/x86/parent
new file mode 100644
index 000000000000..93220d096824
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.11/x86/parent
@@ -0,0 +1,2 @@
+..
+../../arch/x86
diff --git a/profiles/prefix/sunos/solaris/5.9/eapi b/profiles/prefix/sunos/solaris/5.9/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.9/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.9/package.mask b/profiles/prefix/sunos/solaris/5.9/package.mask
new file mode 100644
index 000000000000..ef497cea65e1
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.9/package.mask
@@ -0,0 +1,14 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Jeremy Olexa <darkside@gentoo.org> (26 Aug 2008)
+# Requires that pthread.h defines pthread_atfork() but it doesn't on Solaris 9
+# SPARC.
+dev-libs/nss
+
+# Jeremy Olexa <darkside@gentoo.org> (26 Aug 2008)
+# Massive header errors. SIZE_MAX is defined in limits.h, getopt_long.c requires
+# getopt.h and err.h which don't seem to be present. Might be salvageable with
+# gnulib but I don't know much about that yet. Old versions still work.
+>=sys-apps/file-4.25
diff --git a/profiles/prefix/sunos/solaris/5.9/package.use.mask b/profiles/prefix/sunos/solaris/5.9/package.use.mask
new file mode 100644
index 000000000000..149d54951df3
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.9/package.use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (16 Nov 2011)
+# jit not supported on sparc
+dev-libs/libpcre jit
+
diff --git a/profiles/prefix/sunos/solaris/5.9/parent b/profiles/prefix/sunos/solaris/5.9/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.9/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/sunos/solaris/5.9/sparc/eapi b/profiles/prefix/sunos/solaris/5.9/sparc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.9/sparc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/5.9/sparc/make.defaults b/profiles/prefix/sunos/solaris/5.9/sparc/make.defaults
new file mode 100644
index 000000000000..670f50b71e18
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.9/sparc/make.defaults
@@ -0,0 +1,7 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="sparc-solaris"
+CHOST="sparc-sun-solaris2.9"
+ACCEPT_KEYWORDS="~sparc-solaris"
+
diff --git a/profiles/prefix/sunos/solaris/5.9/sparc/package.mask b/profiles/prefix/sunos/solaris/5.9/sparc/package.mask
new file mode 100644
index 000000000000..1a1871bef0cb
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.9/sparc/package.mask
@@ -0,0 +1,4 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
diff --git a/profiles/prefix/sunos/solaris/5.9/sparc/parent b/profiles/prefix/sunos/solaris/5.9/sparc/parent
new file mode 100644
index 000000000000..356d2b757b15
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.9/sparc/parent
@@ -0,0 +1,2 @@
+..
+../../arch/sparc
diff --git a/profiles/prefix/sunos/solaris/5.9/use.mask b/profiles/prefix/sunos/solaris/5.9/use.mask
new file mode 100644
index 000000000000..5fcc8b468e5a
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/5.9/use.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (22 Aug 2017)
+# PIE is basically not supported on non-Linux
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57409
+pie
diff --git a/profiles/prefix/sunos/solaris/arch/eapi b/profiles/prefix/sunos/solaris/arch/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/arch/sparc/eapi b/profiles/prefix/sunos/solaris/arch/sparc/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/sparc/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/arch/sparc/make.defaults b/profiles/prefix/sunos/solaris/arch/sparc/make.defaults
new file mode 100644
index 000000000000..552a0bfb3103
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/sparc/make.defaults
@@ -0,0 +1,11 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+USE_EXPAND="ABI_SPARC"
+
+# multilib build stuff, single ABI (no multilib)
+MULTILIB_ABIS="sparc32"
+DEFAULT_ABI="sparc32"
+ABI="sparc32"
+IUSE_IMPLICIT="abi_sparc_32"
+LIBDIR_sparc32="lib"
diff --git a/profiles/prefix/sunos/solaris/arch/sparc/package.mask b/profiles/prefix/sunos/solaris/arch/sparc/package.mask
new file mode 100644
index 000000000000..677bc3ba12eb
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/sparc/package.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Solaris profiles inherit from their matching arch profile here.
+
+
+# Fabian Groffen <grobian@gentoo.org> (30 Dec 2011)
+# Does not support Solaris/SPARC, http://mj.ucw.cz/pciutils.html
+sys-apps/pciutils
diff --git a/profiles/prefix/sunos/solaris/arch/sparc/package.use.mask b/profiles/prefix/sunos/solaris/arch/sparc/package.use.mask
new file mode 100644
index 000000000000..64d9694254be
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/sparc/package.use.mask
@@ -0,0 +1,10 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Solaris profiles inherit from their matching arch profile here.
+
+
+# Fabian Groffen <grobian@gentoo.org> (16 Nov 2011)
+# jit not supported on sparc
+dev-libs/libpcre jit
+
diff --git a/profiles/prefix/sunos/solaris/arch/sparc/use.force b/profiles/prefix/sunos/solaris/arch/sparc/use.force
new file mode 100644
index 000000000000..50cdf1705691
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/sparc/use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag corresponding to the default ABI
+sparc-solaris
+abi_sparc_32
diff --git a/profiles/prefix/sunos/solaris/arch/sparc64/eapi b/profiles/prefix/sunos/solaris/arch/sparc64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/sparc64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/arch/sparc64/package.mask b/profiles/prefix/sunos/solaris/arch/sparc64/package.mask
new file mode 100644
index 000000000000..677bc3ba12eb
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/sparc64/package.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Solaris profiles inherit from their matching arch profile here.
+
+
+# Fabian Groffen <grobian@gentoo.org> (30 Dec 2011)
+# Does not support Solaris/SPARC, http://mj.ucw.cz/pciutils.html
+sys-apps/pciutils
diff --git a/profiles/prefix/sunos/solaris/arch/sparc64/package.use.mask b/profiles/prefix/sunos/solaris/arch/sparc64/package.use.mask
new file mode 100644
index 000000000000..3772a96cb28d
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/sparc64/package.use.mask
@@ -0,0 +1,9 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Solaris profiles inherit from their matching arch profile here.
+
+
+# Fabian Groffen <grobian@gentoo.org> (16 Nov 2011)
+# jit not supported on sparc
+dev-libs/libpcre jit
diff --git a/profiles/prefix/sunos/solaris/arch/x64/eapi b/profiles/prefix/sunos/solaris/arch/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/arch/x64/make.defaults b/profiles/prefix/sunos/solaris/arch/x64/make.defaults
new file mode 100644
index 000000000000..498848f27c8b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x64/make.defaults
@@ -0,0 +1,9 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# multilib build stuff, single ABI (no multilib)
+MULTILIB_ABIS="amd64"
+DEFAULT_ABI="amd64"
+ABI="amd64"
+IUSE_IMPLICIT="abi_x86_64"
+LIBDIR_amd64="lib"
diff --git a/profiles/prefix/sunos/solaris/arch/x64/package.mask b/profiles/prefix/sunos/solaris/arch/x64/package.mask
new file mode 100644
index 000000000000..2e6559ed0a84
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x64/package.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Solaris profiles inherit from their matching arch profile here.
+
+
diff --git a/profiles/prefix/sunos/solaris/arch/x64/package.use.mask b/profiles/prefix/sunos/solaris/arch/x64/package.use.mask
new file mode 100644
index 000000000000..2e6559ed0a84
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x64/package.use.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Solaris profiles inherit from their matching arch profile here.
+
+
diff --git a/profiles/prefix/sunos/solaris/arch/x64/use.force b/profiles/prefix/sunos/solaris/arch/x64/use.force
new file mode 100644
index 000000000000..49c67c88a3c5
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x64/use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag corresponding to the default ABI
+x64-solaris
+abi_x86_64
diff --git a/profiles/prefix/sunos/solaris/arch/x64/use.mask b/profiles/prefix/sunos/solaris/arch/x64/use.mask
new file mode 100644
index 000000000000..67ec5433a5bf
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x64/use.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Unmask the flag corresponding to the default ABI
+-x64-solaris
+-abi_x86_64
diff --git a/profiles/prefix/sunos/solaris/arch/x86/eapi b/profiles/prefix/sunos/solaris/arch/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/arch/x86/make.defaults b/profiles/prefix/sunos/solaris/arch/x86/make.defaults
new file mode 100644
index 000000000000..c1bc34823d71
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x86/make.defaults
@@ -0,0 +1,9 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# multilib build stuff, single ABI (no multilib)
+MULTILIB_ABIS="x86"
+DEFAULT_ABI="x86"
+ABI="x86"
+IUSE_IMPLICIT="abi_x86_32"
+LIBDIR_x86="lib"
diff --git a/profiles/prefix/sunos/solaris/arch/x86/package.mask b/profiles/prefix/sunos/solaris/arch/x86/package.mask
new file mode 100644
index 000000000000..2e6559ed0a84
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x86/package.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Solaris profiles inherit from their matching arch profile here.
+
+
diff --git a/profiles/prefix/sunos/solaris/arch/x86/package.use.mask b/profiles/prefix/sunos/solaris/arch/x86/package.use.mask
new file mode 100644
index 000000000000..2e6559ed0a84
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x86/package.use.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# All the Solaris profiles inherit from their matching arch profile here.
+
+
diff --git a/profiles/prefix/sunos/solaris/arch/x86/use.force b/profiles/prefix/sunos/solaris/arch/x86/use.force
new file mode 100644
index 000000000000..969a2583d914
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x86/use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Force the flag corresponding to the default ABI
+x86-solaris
+abi_x86_32
diff --git a/profiles/prefix/sunos/solaris/arch/x86/use.mask b/profiles/prefix/sunos/solaris/arch/x86/use.mask
new file mode 100644
index 000000000000..3e3c06d9db15
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/arch/x86/use.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Unmask the flag corresponding to the default ABI
+-x86-solaris
+-abi_x86_32
diff --git a/profiles/prefix/sunos/solaris/eapi b/profiles/prefix/sunos/solaris/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/sunos/solaris/make.defaults b/profiles/prefix/sunos/solaris/make.defaults
new file mode 100644
index 000000000000..f1fcb723dd25
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Solaris comes with ipv6 support since Solaris 7, full ipv6 integration
+# since Solaris 8. Let's enjoy that we have it.
+USE="ipv6"
diff --git a/profiles/prefix/sunos/solaris/package.mask b/profiles/prefix/sunos/solaris/package.mask
new file mode 100644
index 000000000000..24de66646f72
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/package.mask
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Fabian Groffen <grobian@gentoo.org> (18 Dec 2016)
+# has multiple compilation issue, resolved for 1.1.8, bug #602990
+=app-misc/pax-utils-1.1.7
+
+# Fabian Groffen <grobian@gentoo.org> (13 Jun 2015)
+# Needs patching to compile (d_type and DT_REG), bug #551696
+=app-portage/portage-utils-0.56
+
+# Fabian Groffen <grobian@gentoo.org> (14 Jan 2014)
+# util-linux has no business on Solaris systems
+sys-apps/util-linux
+
+# Fabian Groffen <grobian@gentoo.org> (09 May 2012)
+# Installing libelf will hurt your system. In particular libkvm needs
+# the system libelf to function properly.
+dev-libs/libelf
+
+# Fabian Groffen <grobian@gentoo.org> (25 Aug 2011)
+# Fails to compile, and not worth fixing, bug #379723
+=sys-devel/gcc-4.3.6*
+
+# Fabian Groffen <grobian@gentoo.org> (29 Nov 2009)
+# segfaults during compilation, bug #294479
+=virtual/emacs-23
+
+# Fabian Groffen <grobian@gentoo.org> (21 Jan 2007)
+# doesn't understand arguments on Solaris
+=dev-vcs/cvs-1.12.12*
diff --git a/profiles/prefix/sunos/solaris/package.use.force b/profiles/prefix/sunos/solaris/package.use.force
new file mode 100644
index 000000000000..ae3b08d0d6aa
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/package.use.force
@@ -0,0 +1,9 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Fabian Groffen <grobian@gentoo.org> (08 Dec 2011)
+# Force libssp, Solaris' libc doesn't have stack protection symbols,
+# hence without this, -fstack-protector fails with linker unresolved
+# symbol errors.
+sys-devel/gcc libssp
+
diff --git a/profiles/prefix/sunos/solaris/package.use.mask b/profiles/prefix/sunos/solaris/package.use.mask
new file mode 100644
index 000000000000..711d0c37502e
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/package.use.mask
@@ -0,0 +1,32 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Fabian Groffen <grobian@gentoo.org> (06 Apr 2016)
+# dev-libs/re2 needs love, bug #563932
+app-misc/sphinx re2
+
+# Fabian Groffen <grobian@gentoo.org> (23 Feb 2016)
+# luajit doesn't compile due to relocation problems
+~app-text/texlive-core-2015 luajittex
+~dev-texlive/texlive-basic-2015 luajittex
+
+# Fabian Groffen <grobian@gentoo.org> (26 May 2015)
+# Avoid pulling in broken and unnecessary ossp-uuid, bug #324527
+dev-db/postgresql uuid
+
+# Fabian Groffen <grobian@gentoo.org> (08 Dec 2011)
+# Unmask libssp, Solaris' libc doesn't have stack protection symbols
+sys-devel/gcc -libssp
+
+# Fabian Groffen <grobian@gentoo.org> (05 Sep 2011)
+# gir tries to link c++ code using gcc and obviously fails
+app-text/poppler introspection
+
+# Fabian Groffen <grobian@gentoo.org> (24 Apr 2011)
+# kms seems linux only, bug #319285
+x11-libs/libdrm libkms
+
+# Jeremy Olexa <darkside@gentoo.org> (03 Dec 2008)
+# Fails to compile on Solaris, bug #245659
+media-gfx/inkscape lcms
diff --git a/profiles/prefix/sunos/solaris/parent b/profiles/prefix/sunos/solaris/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/sunos/solaris/profile.bashrc b/profiles/prefix/sunos/solaris/profile.bashrc
new file mode 100644
index 000000000000..b6e65dcde052
--- /dev/null
+++ b/profiles/prefix/sunos/solaris/profile.bashrc
@@ -0,0 +1,11 @@
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+
+# Automatically determine whether or not gen_usr_ldscript should be
+# doing something or not. This is necessary due to previous screwups,
+# which may have lead to people bootstrapping already without
+# gen_usr_ldscript being active, while existing installs should remain
+# untouched for now.
+if [[ -z ${PREFIX_DISABLE_GEN_USR_LDSCRIPT} ]] ; then
+ [[ ! -e ${EPREFIX}/lib/libz.so.1 ]] \
+ && PREFIX_DISABLE_GEN_USR_LDSCRIPT=yes
+fi
diff --git a/profiles/prefix/sunos/use.force b/profiles/prefix/sunos/use.force
new file mode 100644
index 000000000000..822c25ac5f7a
--- /dev/null
+++ b/profiles/prefix/sunos/use.force
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add Solaris OS
+kernel_SunOS
+elibc_SunOS
diff --git a/profiles/prefix/sunos/use.mask b/profiles/prefix/sunos/use.mask
new file mode 100644
index 000000000000..9d6ae2553211
--- /dev/null
+++ b/profiles/prefix/sunos/use.mask
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add SunOS libc
+-elibc_SunOS
+-kernel_SunOS
+
+# these will more than likely never work on solaris
+3dfx
+acpi
+alsa
+apm
+caps
+cman
+clvm
+directfb
+djbfft
+fbcon
+fmod
+ggi
+gpm
+hardened
+oss
+svga
+sybase
+sybase-ct
+rtc
+uclibc
+v4l
diff --git a/profiles/prefix/use.force b/profiles/prefix/use.force
new file mode 100644
index 000000000000..b772df154580
--- /dev/null
+++ b/profiles/prefix/use.force
@@ -0,0 +1,7 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# unforce the GNU/Linux ELIBC, KERNEL, and USERLAND
+# flags that come from the base profile
+-elibc_glibc
+-kernel_linux
diff --git a/profiles/prefix/use.mask b/profiles/prefix/use.mask
new file mode 100644
index 000000000000..47e9b1a2a497
--- /dev/null
+++ b/profiles/prefix/use.mask
@@ -0,0 +1,18 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Mask all glibc/linux combination, unmasked in the appropriate profiles
+elibc_glibc
+kernel_linux
+
+# USE=acl will probably never work because of how it is related to the kernel
+# and Gentoo Prefix does not have access to that. Also, definately problems with
+# coreutils on darwin.
+acl
+
+# Prefix removed python3_4 from PYTHON_TARGETS and PYTHON_SINGLE_TARGET
+python_targets_python3_4
+python_single_target_python3_4
+
+# Similar for Ruby 2.1
+ruby_targets_ruby21
diff --git a/profiles/prefix/use.stable.mask b/profiles/prefix/use.stable.mask
new file mode 100644
index 000000000000..6a2768f662a2
--- /dev/null
+++ b/profiles/prefix/use.stable.mask
@@ -0,0 +1,7 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-enable python-3.5, we are fully ~arch, so avoid problems with
+# Portage like bug #572502
+-python_targets_python3_5
+-python_single_target_python3_5
diff --git a/profiles/prefix/windows/cygwin/eapi b/profiles/prefix/windows/cygwin/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/cygwin/make.defaults b/profiles/prefix/windows/cygwin/make.defaults
new file mode 100644
index 000000000000..d7ba076a8812
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/make.defaults
@@ -0,0 +1,11 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# System-wide defaults for all Cygwin profiles
+# This file should rarely need to be changed
+
+# 'Sane' defaults
+ELIBC="Cygwin"
+
+# no scanelf
+FEATURES="nostrip"
diff --git a/profiles/prefix/windows/cygwin/package.mask b/profiles/prefix/windows/cygwin/package.mask
new file mode 100644
index 000000000000..92beb403eb7f
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/package.mask
@@ -0,0 +1,10 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (15 Mar 2017)
+# Cygwin breakage in 0.16 should be fixed in 0.17
+~net-dns/libidn2-0.16
+
+# Michael Haubenwallner <haubi@gentoo.org> (20 May 2016)
+# Does not work with Cygwin.
+sys-apps/man-db
diff --git a/profiles/prefix/windows/cygwin/package.use b/profiles/prefix/windows/cygwin/package.use
new file mode 100644
index 000000000000..9439b6ac23c0
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/package.use
@@ -0,0 +1,10 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (23 Mar 2017)
+# Using nettle hides a conflict between wincrypt and openssl.
+app-arch/libarchive nettle
+
+# Michael Haubenwallner <haubi@gentoo.org> (18 Apr 2016)
+# Cygwin coreutils provide kill as gkill
+sys-apps/coreutils kill
diff --git a/profiles/prefix/windows/cygwin/packages b/profiles/prefix/windows/cygwin/packages
new file mode 100644
index 000000000000..48b7c0bfe442
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/packages
@@ -0,0 +1,5 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+*sys-devel/binutils
+*sys-libs/cygwin-crypt
diff --git a/profiles/prefix/windows/cygwin/parent b/profiles/prefix/windows/cygwin/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/cygwin/use.force b/profiles/prefix/windows/cygwin/use.force
new file mode 100644
index 000000000000..e5b3845e4e0f
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/use.force
@@ -0,0 +1,5 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add Cygwin's libc
+elibc_Cygwin
diff --git a/profiles/prefix/windows/cygwin/use.mask b/profiles/prefix/windows/cygwin/use.mask
new file mode 100644
index 000000000000..a953069a8059
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/use.mask
@@ -0,0 +1,10 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add Cygwin's libc
+-elibc_Cygwin
+
+# we do not have python-3 cygwin ready yet
+python_targets_python3_4
+python_targets_python3_5
+python_targets_python3_6
diff --git a/profiles/prefix/windows/cygwin/x64/eapi b/profiles/prefix/windows/cygwin/x64/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/x64/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/cygwin/x64/make.defaults b/profiles/prefix/windows/cygwin/x64/make.defaults
new file mode 100644
index 000000000000..118f797c4e3f
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/x64/make.defaults
@@ -0,0 +1,17 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x64-cygwin"
+CHOST="x86_64-pc-cygwin"
+ACCEPT_KEYWORDS="~x64-cygwin"
+
+# We don't have lib64 in prefix so, remove it here.
+SYMLINK_LIB=""
+LIBDIR_amd64="lib"
+
+# multilib build stuff, single ABI (no multilib)
+MULTILIB_ABIS="amd64"
+DEFAULT_ABI="amd64"
+ABI="amd64"
+IUSE_IMPLICIT="abi_x86_64"
+LIBDIR_amd64="lib"
diff --git a/profiles/prefix/windows/cygwin/x64/parent b/profiles/prefix/windows/cygwin/x64/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/x64/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/cygwin/x86/eapi b/profiles/prefix/windows/cygwin/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/cygwin/x86/make.defaults b/profiles/prefix/windows/cygwin/x86/make.defaults
new file mode 100644
index 000000000000..1b849ae1b953
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/x86/make.defaults
@@ -0,0 +1,13 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x86-cygwin"
+CHOST="i686-pc-cygwin"
+ACCEPT_KEYWORDS="~x86-cygwin ~x86-linux"
+
+# multilib build stuff, single ABI (no multilib)
+MULTILIB_ABIS="x86"
+DEFAULT_ABI="x86"
+ABI="x86"
+IUSE_IMPLICIT="abi_x86_32"
+LIBDIR_x86="lib"
diff --git a/profiles/prefix/windows/cygwin/x86/parent b/profiles/prefix/windows/cygwin/x86/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/cygwin/x86/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/eapi b/profiles/prefix/windows/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/package.mask b/profiles/prefix/windows/package.mask
new file mode 100644
index 000000000000..d83ee31002e4
--- /dev/null
+++ b/profiles/prefix/windows/package.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (19 May 2016)
+# No point for util-linux on Windows
+sys-apps/util-linux
diff --git a/profiles/prefix/windows/parent b/profiles/prefix/windows/parent
new file mode 100644
index 000000000000..8f6bb2022d1e
--- /dev/null
+++ b/profiles/prefix/windows/parent
@@ -0,0 +1,3 @@
+../../base
+../../arch/base
+..
diff --git a/profiles/prefix/windows/use.force b/profiles/prefix/windows/use.force
new file mode 100644
index 000000000000..6dfa2704237a
--- /dev/null
+++ b/profiles/prefix/windows/use.force
@@ -0,0 +1,5 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add Windows kernel
+kernel_Winnt
diff --git a/profiles/prefix/windows/use.mask b/profiles/prefix/windows/use.mask
new file mode 100644
index 000000000000..2d725b48a334
--- /dev/null
+++ b/profiles/prefix/windows/use.mask
@@ -0,0 +1,8 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add Windows kernel
+-kernel_Winnt
+
+# linux-exclusive feature
+inotify
diff --git a/profiles/prefix/windows/winnt/3.5/eapi b/profiles/prefix/windows/winnt/3.5/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/3.5/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/winnt/3.5/parent b/profiles/prefix/windows/winnt/3.5/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/winnt/3.5/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/winnt/3.5/x86/eapi b/profiles/prefix/windows/winnt/3.5/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/3.5/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/winnt/3.5/x86/make.defaults b/profiles/prefix/windows/winnt/3.5/x86/make.defaults
new file mode 100644
index 000000000000..21cc6becd407
--- /dev/null
+++ b/profiles/prefix/windows/winnt/3.5/x86/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x86-winnt"
+CHOST="i586-pc-winnt3.5"
+ACCEPT_KEYWORDS="~x86-winnt"
diff --git a/profiles/prefix/windows/winnt/3.5/x86/parent b/profiles/prefix/windows/winnt/3.5/x86/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/winnt/3.5/x86/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/winnt/5.2/eapi b/profiles/prefix/windows/winnt/5.2/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/5.2/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/winnt/5.2/parent b/profiles/prefix/windows/winnt/5.2/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/winnt/5.2/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/winnt/5.2/x86/eapi b/profiles/prefix/windows/winnt/5.2/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/5.2/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/winnt/5.2/x86/make.defaults b/profiles/prefix/windows/winnt/5.2/x86/make.defaults
new file mode 100644
index 000000000000..6196da2d7a5c
--- /dev/null
+++ b/profiles/prefix/windows/winnt/5.2/x86/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x86-winnt"
+CHOST="i586-pc-winnt5.2"
+ACCEPT_KEYWORDS="~x86-winnt"
diff --git a/profiles/prefix/windows/winnt/5.2/x86/parent b/profiles/prefix/windows/winnt/5.2/x86/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/winnt/5.2/x86/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/winnt/6.0/eapi b/profiles/prefix/windows/winnt/6.0/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.0/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/winnt/6.0/parent b/profiles/prefix/windows/winnt/6.0/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.0/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/winnt/6.0/x86/eapi b/profiles/prefix/windows/winnt/6.0/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.0/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/winnt/6.0/x86/make.defaults b/profiles/prefix/windows/winnt/6.0/x86/make.defaults
new file mode 100644
index 000000000000..c28e21320203
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.0/x86/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x86-winnt"
+CHOST="i586-pc-winnt6.0"
+ACCEPT_KEYWORDS="~x86-winnt"
diff --git a/profiles/prefix/windows/winnt/6.0/x86/parent b/profiles/prefix/windows/winnt/6.0/x86/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.0/x86/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/winnt/6.1/eapi b/profiles/prefix/windows/winnt/6.1/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.1/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/winnt/6.1/parent b/profiles/prefix/windows/winnt/6.1/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.1/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/winnt/6.1/x86/eapi b/profiles/prefix/windows/winnt/6.1/x86/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.1/x86/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/winnt/6.1/x86/make.defaults b/profiles/prefix/windows/winnt/6.1/x86/make.defaults
new file mode 100644
index 000000000000..9dcc06845d96
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.1/x86/make.defaults
@@ -0,0 +1,6 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ARCH="x86-winnt"
+CHOST="i586-pc-winnt6.1"
+ACCEPT_KEYWORDS="~x86-winnt"
diff --git a/profiles/prefix/windows/winnt/6.1/x86/parent b/profiles/prefix/windows/winnt/6.1/x86/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/winnt/6.1/x86/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/winnt/eapi b/profiles/prefix/windows/winnt/eapi
new file mode 100644
index 000000000000..7ed6ff82de6b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/prefix/windows/winnt/make.defaults b/profiles/prefix/windows/winnt/make.defaults
new file mode 100644
index 000000000000..bd1924d2c0ef
--- /dev/null
+++ b/profiles/prefix/windows/winnt/make.defaults
@@ -0,0 +1,10 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# System-wide defaults for all Windows profiles
+# This file should rarely need to be changed
+
+# 'Sane' defaults
+ELIBC="Winnt"
+
+FEATURES="nostrip"
diff --git a/profiles/prefix/windows/winnt/package.mask b/profiles/prefix/windows/winnt/package.mask
new file mode 100644
index 000000000000..0af713753d95
--- /dev/null
+++ b/profiles/prefix/windows/winnt/package.mask
@@ -0,0 +1,8 @@
+
+# Distributed under the terms of the GNU General Public License v2
+
+
+# Markus Duft <mduft@gentoo.org> (30 Sep 2009)
+# the patch does not currently apply, and needs some work.
+>=x11-proto/xproto-7.0.16
+
diff --git a/profiles/prefix/windows/winnt/package.use.mask b/profiles/prefix/windows/winnt/package.use.mask
new file mode 100644
index 000000000000..51b019b65f26
--- /dev/null
+++ b/profiles/prefix/windows/winnt/package.use.mask
@@ -0,0 +1,6 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Michael Haubenwallner <haubi@gentoo.org> (02 Oct 2017)
+# requires nasm, which is hard to use via parity atm
+dev-libs/openssl asm
diff --git a/profiles/prefix/windows/winnt/packages b/profiles/prefix/windows/winnt/packages
new file mode 100644
index 000000000000..7ffc61e1574f
--- /dev/null
+++ b/profiles/prefix/windows/winnt/packages
@@ -0,0 +1,37 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# those are packages not available/required on winnt, since
+# winnt can be a child EPREFIX only, which tears it's DEPENDS
+# from a parent (e.g. x86-cygwin) prefix.
+
+-*sys-apps/grep
+-*app-arch/gzip
+-*sys-devel/libtool
+-*virtual/man
+-*sys-devel/patch
+-*sys-devel/flex
+-*sys-apps/gawk
+-*app-arch/tar
+-*sys-apps/sed
+-*sys-devel/bison
+-*sys-apps/file
+-*app-arch/bzip2
+-*net-misc/rsync
+-*sys-devel/automake
+-*virtual/editor
+-*sys-apps/coreutils
+-*sys-devel/make
+-*sys-apps/findutils
+-*sys-devel/m4
+-*net-misc/wget
+-*sys-apps/which
+-*virtual/pager
+-*sys-apps/diffutils
+-*sys-apps/baselayout-prefix
+-*app-shells/bash:0
+-*virtual/package-manager
+-*virtual/ssh
+-*sys-devel/autoconf
+-*sys-devel/gnuconfig
+-*sys-devel/gcc
diff --git a/profiles/prefix/windows/winnt/parent b/profiles/prefix/windows/winnt/parent
new file mode 100644
index 000000000000..f3229c5b9876
--- /dev/null
+++ b/profiles/prefix/windows/winnt/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/prefix/windows/winnt/profile.bashrc b/profiles/prefix/windows/winnt/profile.bashrc
new file mode 100644
index 000000000000..f1c5c365338b
--- /dev/null
+++ b/profiles/prefix/windows/winnt/profile.bashrc
@@ -0,0 +1,151 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# On windows, binary files (executables, shared libraries) in use
+# cannot be replaced during merge.
+# But it is possible to rename them and remove lateron when they are
+# not used any more by any running program.
+#
+# This is a workaround for portage bug#199868,
+# and should be dropped once portage does sth. like this itself.
+#
+
+# Need to explicitly set PKG_CONFIG_PATH for cross EPREFIX.
+export PKG_CONFIG_PATH="${EPREFIX}/lib/pkgconfig:${EPREFIX}/usr/lib/pkgconfig"
+
+windows_cleanup_removed_files() {
+ local removedlist=$1
+ rm -f "${removedlist}".new
+
+ if [[ -r ${removedlist} ]]; then
+ rm -f "${removedlist}".old
+ fi
+ # restore in case of system fault
+ if [[ -r ${removedlist}.old ]]; then
+ mv "${removedlist}"{.old,}
+ fi
+
+ touch "${removedlist}"{,.new} # ensure they exist
+
+ while read rmstem; do
+ # try to remove previously recorded files
+ for f in "${ROOT}${rmstem}"*; do
+ ebegin "trying to remove ${f}"
+ rm -f "${f}" > /dev/null 2>&1
+ eend $?
+ done
+ # but keep it in list if still exists
+ for f in "${ROOT}${rmstem}"*; do
+ [[ -f ${f} ]] && echo "${rmstem}" >> "${removedlist}".new
+ break
+ done
+ done < "${removedlist}"
+
+ # update the list
+ mv "${removedlist}"{,.old}
+ mv "${removedlist}"{.new,}
+ rm "${removedlist}".old
+}
+
+windows_find_removed_slot() {
+ local f=$1
+ local n=0
+ while [[ ${n} -lt 100 && -f "${f}${n}" ]]; do
+ n=$((n=n+1))
+ done
+
+ if [[ ${n} -ge 100 ]]; then
+ echo "too many (>=100) old text files busy of '${f}'" >&2
+ exit 1
+ fi
+
+ echo $n
+}
+
+windows_prepare_file() {
+ local failed=0
+ my_mv=mv
+
+ [[ "${1}" == */mv ]] && my_mv="${1}.new"
+ [[ -f "${1}.new" ]] && rm -f "${1}.new"
+
+ cp -p "${1}" "${1}.new" || failed=1
+ ${my_mv} "${1}" "${2}" || failed=1
+ ${my_mv} "${1}.new" "${1}" || failed=1
+
+ echo $failed
+}
+
+post_src_install() {
+ cd "${ED}"
+ find . -name '*.exe' | while read f; do
+ if file "${f}" | grep "GUI" > /dev/null 2>&1; then
+ if test ! -f "${f%.exe}"; then
+ einfo "Windows GUI Executable $f will have no symlink."
+ fi
+ else
+ if test ! -f "${f%.exe}"; then
+ ebegin "creating ${f%.exe} -> ${f} for console accessibility."
+ eend $(ln -sf "$(basename "${f}")" "${f%.exe}" && echo 0 || echo 1)
+ fi
+ fi
+ done
+}
+
+post_pkg_preinst() {
+ local removedlist="${EROOT}var/lib/portage/files2bremoved"
+ windows_cleanup_removed_files $removedlist
+
+ # now go for current package
+ cd "${D}"
+ find ".${EROOT}" -type f | xargs -r /usr/bin/file | grep ' PE ' | while read f t
+ do
+ f=${f#./} # find prints: "./path/to/file"
+ f=${f%:} # file prints: "file-argument: type-of-file"
+ test -r "${ROOT}${f}" || continue
+ rmstem="${f}.removedbyportage"
+ # keep list of old busy text files unique
+ grep "^${rmstem}$" "${removedlist}" >/dev/null \
+ || echo "${rmstem}" >> "${removedlist}"
+
+ local n=$(windows_find_removed_slot ${ROOT}${rmstem})
+ ebegin "backing up text file ${ROOT}${f} (${n})"
+ eend $(windows_prepare_file "${ROOT}${f}" "${ROOT}${rmstem}${n}")
+ done
+}
+
+post_pkg_prerm() {
+ local removedlist="${EROOT}var/lib/portage/files2bremoved"
+ save_IFS=$IFS
+ IFS='
+';
+ local MY_PR=${PR}
+ [[ ${MY_PR} == r0 ]] && MY_PR=
+ local -a contents=($(<"${EROOT}var/db/pkg/${CATEGORY}/${P}${MY_PR:+-}${MY_PR}/CONTENTS"));
+ IFS=$save_IFS
+ local -a cont
+ for content in "${contents[@]}"; do
+ cont=($content)
+ f=${cont[1]}
+ f=${f#/}
+
+ test -r "${ROOT}${f}" || continue
+
+ if /usr/bin/file "${ROOT}${f}" | grep ' PE ' > /dev/null; then
+ # $f should be an absolute path to the installed file
+ rmstem="${f}.removedbyportage"
+
+ grep "^${rmstem}$" "${removedlist}" > /dev/null \
+ || echo "${rmstem}" >> "${removedlist}"
+
+ local n=$(windows_find_removed_slot ${ROOT}${rmstem})
+ ebegin "preparing ${ROOT}${f} for unmerge ($n)"
+ eend $(windows_prepare_file "${ROOT}${f}" "${ROOT}${rmstem}${n}")
+ fi
+ done
+}
+
+pre_pkg_postrm() {
+ local removedlist="${EROOT}var/lib/portage/files2bremoved"
+ windows_cleanup_removed_files $removedlist
+}
diff --git a/profiles/prefix/windows/winnt/use.force b/profiles/prefix/windows/winnt/use.force
new file mode 100644
index 000000000000..4dbfdde651d7
--- /dev/null
+++ b/profiles/prefix/windows/winnt/use.force
@@ -0,0 +1,5 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add Winnt libc
+elibc_Winnt
diff --git a/profiles/prefix/windows/winnt/use.mask b/profiles/prefix/windows/winnt/use.mask
new file mode 100644
index 000000000000..eb0c49f36f14
--- /dev/null
+++ b/profiles/prefix/windows/winnt/use.mask
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Re-add Winnt libc
+-elibc_Winnt
+
+# CURL_SSL=winssl is allowd on Winnt libc
+-curl_ssl_winssl
+
+# these need a review, since they are just copied from interix
+# these will more than likely never work on Windows
+3dfx
+acpi
+alsa
+altivec
+apm
+bluetooth
+caps
+cdr
+coreaudio
+dga
+directfb
+djbfft
+dri
+dvdr
+# emacs USE flag is masked because of missing implementation for unexec()
+emacs
+fbcon
+fmod
+ggi
+glut
+gpm
+gps
+hardened
+hddtemp
+ibm
+ieee1394
+ifc
+ipod
+ipv6
+lm_sensors
+ncurses
+netboot
+opengl
+oss
+pcmcia
+pda
+rtc
+selinux
+scanner
+smartcard
+svga
+uclibc
+# unicode is totally b0rked on interix
+unicode
+usb
+v4l
+wifi
+
+# these are USE flags that don't _currently_ work, but may will in the future.
+ffmpeg
+fftw
+flac
+jack
+joystick
+ladspa
+# opennmp is not working yet on interix
+openmp
+portaudio
+pulseaudio
+qt4
+readline
+# libtiff only static, so avoid the tiff USE flag!
+tiff
+timidity