1 |
commit: 0fc053670eaa8bbfd0660a36e1cf83b6dcf4df36 |
2 |
Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 3 14:35:22 2018 +0000 |
4 |
Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 3 14:36:24 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fc05367 |
7 |
|
8 |
sys-devel/parity-9999: follow upstream development |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
sys-devel/parity/metadata.xml | 13 +++++++- |
13 |
sys-devel/parity/parity-9999.ebuild | 66 +++++++++++++++++++++++-------------- |
14 |
2 files changed, 53 insertions(+), 26 deletions(-) |
15 |
|
16 |
diff --git a/sys-devel/parity/metadata.xml b/sys-devel/parity/metadata.xml |
17 |
index c0714eac500..2d8ffbadd13 100644 |
18 |
--- a/sys-devel/parity/metadata.xml |
19 |
+++ b/sys-devel/parity/metadata.xml |
20 |
@@ -6,7 +6,18 @@ |
21 |
<name>Michael Haubenwallner</name> |
22 |
</maintainer> |
23 |
<upstream> |
24 |
- <remote-id type="sourceforge">parity</remote-id> |
25 |
<remote-id type="github">haubi/parity</remote-id> |
26 |
</upstream> |
27 |
+ <use> |
28 |
+ <flag name="vc7_0">Enable support for Visual Studio 2002</flag> |
29 |
+ <flag name="vc7_1">Enable support for Visual Studio 2003</flag> |
30 |
+ <flag name="vc8_0">Enable support for Visual Studio 2005</flag> |
31 |
+ <flag name="vc9_0">Enable support for Visual Studio 2008</flag> |
32 |
+ <flag name="vc10_0">Enable support for Visual Studio 2010</flag> |
33 |
+ <flag name="vc11_0">Enable support for Visual Studio 2012</flag> |
34 |
+ <flag name="vc12_0">Enable support for Visual Studio 2013</flag> |
35 |
+ <flag name="vc14_0">Enable support for Visual Studio 2015</flag> |
36 |
+ <flag name="vc15_0">Enable support for Visual Studio 2017</flag> |
37 |
+ <flag name="vc_x86">Enable support for 32bit Visual Studio compilers</flag> |
38 |
+ </use> |
39 |
</pkgmetadata> |
40 |
|
41 |
diff --git a/sys-devel/parity/parity-9999.ebuild b/sys-devel/parity/parity-9999.ebuild |
42 |
index 381b4c75382..24a6582d4ea 100644 |
43 |
--- a/sys-devel/parity/parity-9999.ebuild |
44 |
+++ b/sys-devel/parity/parity-9999.ebuild |
45 |
@@ -14,9 +14,15 @@ fi |
46 |
DESCRIPTION="A POSIX to native Win32 Cross-Compiler Tool (requires Visual Studio)" |
47 |
HOMEPAGE="https://github.com/haubi/parity" |
48 |
|
49 |
+parity-vcarchs() { echo x86 ; } |
50 |
+parity-vcvers() { echo 7_0 7_1 8_0 9_0 10_0 11_0 12_0 14_0 15_0 ; } |
51 |
+ |
52 |
LICENSE="LGPL-3" |
53 |
SLOT="0" |
54 |
-IUSE="" |
55 |
+IUSE="$( |
56 |
+ for a in $(parity-vcarchs); do echo "+vc_${a}"; done |
57 |
+ for v in $(parity-vcvers); do echo "+vc${v}"; done |
58 |
+)" |
59 |
|
60 |
if [[ ${PV} == 9999 ]]; then |
61 |
src_prepare() { |
62 |
@@ -25,30 +31,40 @@ if [[ ${PV} == 9999 ]]; then |
63 |
} |
64 |
fi |
65 |
|
66 |
-src_install() { |
67 |
- emake DESTDIR="${D}" install || die "emake install failed" |
68 |
- |
69 |
- # create i586-pc-winnt-g[++|cc|..] links.. |
70 |
- local exeext= |
71 |
- |
72 |
- [[ -f ${ED}usr/bin/parity.gnu.gcc.exe ]] && exeext=.exe |
73 |
- |
74 |
- # create cross compiler syms, also for former versioned winnt profiles |
75 |
- local v t |
76 |
- for v in "" 5.2 6.1; do |
77 |
- dosym /usr/bin/parity.gnu.gcc${exeext} /usr/bin/i586-pc-winnt${v}-c++ |
78 |
- dosym /usr/bin/parity.gnu.gcc${exeext} /usr/bin/i586-pc-winnt${v}-g++ |
79 |
- for t in gcc ld windres ar nm ranlib strip; do |
80 |
- if [[ -e "${ED}"usr/bin/parity.gnu.${t}${exeext} ]]; then |
81 |
- dosym /usr/bin/parity.gnu.${t}${exeext} /usr/bin/i586-pc-winnt${v}-${t} |
82 |
- else |
83 |
- dosym /usr/bin/parity.gnu.${t} /usr/bin/i586-pc-winnt${v}-${t} |
84 |
- fi |
85 |
- done |
86 |
+parity-enabled-vcarchs() { |
87 |
+ local enabled= a |
88 |
+ for a in $(parity-vcarchs) ; do |
89 |
+ if use vc_${a} ; then |
90 |
+ enabled+=",${a}" |
91 |
+ fi |
92 |
+ done |
93 |
+ echo ${enabled#,} |
94 |
+} |
95 |
+ |
96 |
+parity-enabled-vcvers() { |
97 |
+ local enabled= v |
98 |
+ for v in $(parity-vcvers) ; do |
99 |
+ if use vc${v} ; then |
100 |
+ enabled+=",${v/_/.}" |
101 |
+ fi |
102 |
done |
103 |
+ echo ${enabled#,} |
104 |
+} |
105 |
+ |
106 |
+src_configure() { |
107 |
+ local myconf=( |
108 |
+ --enable-msvc-archs="$(parity-enabled-vcarchs)" |
109 |
+ --enable-msvc-versions="$(parity-enabled-vcvers)" |
110 |
+ --disable-default-msvc-version |
111 |
+ ) |
112 |
+ econf "${myconf[@]}" |
113 |
+} |
114 |
|
115 |
- # we don't need the header files installed by parity... private |
116 |
- # header files are supported with a patch from 2.1.0-r1 onwards, |
117 |
- # so they won't be there anymore, but -f does the job in any case. |
118 |
- rm -f "${ED}"/usr/include/*.h |
119 |
+pkg_postinst() { |
120 |
+ if [[ -n ${ROOT%/} ]] ; then |
121 |
+ einfo "To enable all available MSVC versions, on the target machine please run:" |
122 |
+ einfo " '${EPREFIX}/usr/bin/parity-setup' --enable-all" |
123 |
+ else |
124 |
+ "${EPREFIX}"/usr/bin/parity-setup --enable-all |
125 |
+ fi |
126 |
} |