1 |
commit: 546cb495723c209dd4c8364aef53b1e6dfe14b98 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 19 21:26:12 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 19 21:26:12 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=546cb495 |
7 |
|
8 |
dev-haskell/wxc: bump up to 0.92.3.0 |
9 |
|
10 |
Reported-by: Agostino Sarubbo |
11 |
Closes: https://bugs.gentoo.org/736444 |
12 |
Package-Manager: Portage-3.0.3, Repoman-3.0.0 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
dev-haskell/wxc/Manifest | 1 + |
16 |
dev-haskell/wxc/files/wxc-0.92.3.0-cabal-2.2.patch | 32 +++++++++++ |
17 |
dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.patch | 12 ++++ |
18 |
dev-haskell/wxc/wxc-0.92.3.0.ebuild | 66 ++++++++++++++++++++++ |
19 |
4 files changed, 111 insertions(+) |
20 |
|
21 |
diff --git a/dev-haskell/wxc/Manifest b/dev-haskell/wxc/Manifest |
22 |
index 9626844845e..c24115f1645 100644 |
23 |
--- a/dev-haskell/wxc/Manifest |
24 |
+++ b/dev-haskell/wxc/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST wxc-0.92.2.0.tar.gz 203065 BLAKE2B 3f873b3bbc50e5fa7690f2f05a25ab360260d90523dd0b9c016f5dfeea99e9a59fe4848de520d642d2cea52dbadfd69aa31671f521243240488d643d4554e880 SHA512 e6fba1be94978603965b8902fad9326772b5483d5df621d5245f1fae97d85bcb1aff4565f1e8396de23c854050151c5e009e34a1ea29c3037057599ac0412bcd |
27 |
+DIST wxc-0.92.3.0.tar.gz 203597 BLAKE2B e73745fe17747c1abb79cdb2e7ecadee1f286abd34d1ccfbc2bb53d729fbab4dc60ab054af07f75cae9aa67e83ae794ea23f3f00decd39f69b93a5a56726d9d2 SHA512 60f34e316a4dfa4951e18d99d24508d36806f8a9d0bf05485904b03622ebda138b7a93a7477a2a107007d40e8cadbe51200322507054f65bd0b720545b414b37 |
28 |
|
29 |
diff --git a/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-2.2.patch b/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-2.2.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..86d523b362f |
32 |
--- /dev/null |
33 |
+++ b/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-2.2.patch |
34 |
@@ -0,0 +1,32 @@ |
35 |
+--- a/Setup.hs |
36 |
++++ b/Setup.hs |
37 |
+@@ -22,2 +22,3 @@ import Distribution.Simple.Setup ( BuildFlags, ConfigFlags |
38 |
+ import Distribution.Simple.Utils (installOrdinaryFile, rawSystemExitWithEnv, rawSystemStdInOut, die) |
39 |
++import qualified Distribution.Simple.Utils as DSU |
40 |
+ import Distribution.System (OS (..), Arch (..), buildOS, buildArch) |
41 |
+@@ -81,3 +82,9 @@ rawShellSystemStdInOut :: Verbosity -- Verbosity level |
42 |
+ -> IO (String, String, ExitCode) -- (Command result, Errors, Command exit status) |
43 |
++#if MIN_VERSION_Cabal(2,2,0) |
44 |
++rawShellSystemStdInOut v f as = do |
45 |
++ (~(DSU.IODataText so), se, c) <- rawSystemStdInOut v "sh" (f:as) Nothing Nothing Nothing DSU.IODataModeText |
46 |
++ return (so, se, c) |
47 |
++#else |
48 |
+ rawShellSystemStdInOut v f as = rawSystemStdInOut v "sh" (f:as) Nothing Nothing Nothing False |
49 |
++#endif |
50 |
+ |
51 |
+@@ -438,3 +445,7 @@ deMsysPaths bi = do |
52 |
+ let cor ph = do |
53 |
++#if MIN_VERSION_Cabal(2,2,0) |
54 |
++ (~(DSU.IODataText r), e, c) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing DSU.IODataModeText |
55 |
++#else |
56 |
+ (r, e, c ) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing False |
57 |
++#endif |
58 |
+ unless (c == ExitSuccess) (putStrLn ("Error: failed to convert MSYS path to native path \n" ++ e) >> exitFailure) |
59 |
+@@ -504,3 +515,7 @@ sharedLibName ver basename = |
60 |
+ where |
61 |
++#if MIN_VERSION_Cabal(2,2,0) |
62 |
++ full_ver = (concat . intersperse "." . map show . versionNumbers) ver |
63 |
++#else |
64 |
+ full_ver = (concat . intersperse "." . map show . versionBranch) ver |
65 |
++#endif |
66 |
+ |
67 |
|
68 |
diff --git a/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.patch b/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.patch |
69 |
new file mode 100644 |
70 |
index 00000000000..5d474098987 |
71 |
--- /dev/null |
72 |
+++ b/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.patch |
73 |
@@ -0,0 +1,12 @@ |
74 |
+--- a/Setup.hs |
75 |
++++ b/Setup.hs |
76 |
+@@ -19,7 +19,8 @@ import Distribution.Simple.Setup ( BuildFlags, ConfigFlags |
77 |
+ , InstallFlags, installVerbosity |
78 |
+ , fromFlag, fromFlagOrDefault, copyDest |
79 |
+ ) |
80 |
+-import Distribution.Simple.Utils (installOrdinaryFile, rawSystemExitWithEnv, rawSystemStdInOut, die) |
81 |
++import Distribution.Simple.Utils (installOrdinaryFile, rawSystemExitWithEnv, rawSystemStdInOut) |
82 |
++import System.Exit (die) |
83 |
+ import qualified Distribution.Simple.Utils as DSU |
84 |
+ import Distribution.System (OS (..), Arch (..), buildOS, buildArch) |
85 |
+ import Distribution.Verbosity (Verbosity, normal, verbose) |
86 |
|
87 |
diff --git a/dev-haskell/wxc/wxc-0.92.3.0.ebuild b/dev-haskell/wxc/wxc-0.92.3.0.ebuild |
88 |
new file mode 100644 |
89 |
index 00000000000..a704fc0cd19 |
90 |
--- /dev/null |
91 |
+++ b/dev-haskell/wxc/wxc-0.92.3.0.ebuild |
92 |
@@ -0,0 +1,66 @@ |
93 |
+# Copyright 1999-2020 Gentoo Authors |
94 |
+# Distributed under the terms of the GNU General Public License v2 |
95 |
+ |
96 |
+EAPI=6 |
97 |
+ |
98 |
+# ebuild generated by hackport 0.5.3.9999 |
99 |
+ |
100 |
+WX_GTK_VER="3.0" |
101 |
+ |
102 |
+CABAL_FEATURES="lib profile" # ho docs as it has no haskell files |
103 |
+inherit haskell-cabal multilib versionator wxwidgets |
104 |
+ |
105 |
+DESCRIPTION="wxHaskell C++ wrapper" |
106 |
+HOMEPAGE="https://wiki.haskell.org/WxHaskell" |
107 |
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz" |
108 |
+ |
109 |
+LICENSE="wxWinLL-3.1" |
110 |
+SLOT="${WX_GTK_VER}/${PV}" |
111 |
+KEYWORDS="~amd64 ~x86" |
112 |
+IUSE="gstreamer" |
113 |
+ |
114 |
+RDEPEND=">dev-haskell/split-0:=[profile?] |
115 |
+ >=dev-haskell/wxdirect-0.90.1.1:${WX_GTK_VER}=[profile?] |
116 |
+ x11-libs/wxGTK:${WX_GTK_VER}=[X,gstreamer?,opengl] |
117 |
+ >=dev-lang/ghc-7.6.1:= |
118 |
+" |
119 |
+DEPEND="${RDEPEND} |
120 |
+ >=dev-haskell/cabal-1.23 |
121 |
+" |
122 |
+ |
123 |
+PATCHES=( |
124 |
+ "${FILESDIR}"/${PN}-0.92.3.0-cabal-2.2.patch |
125 |
+ "${FILESDIR}"/${PN}-0.92.3.0-cabal-3.patch |
126 |
+) |
127 |
+ |
128 |
+src_prepare() { |
129 |
+ default |
130 |
+ |
131 |
+ setup-wxwidgets |
132 |
+ |
133 |
+ sed -e "s@\"wx-config\"@\"${WX_CONFIG}\"@g" \ |
134 |
+ -i "${S}/Setup.hs" || die "Could not specify wx-config in Setup.hs" |
135 |
+} |
136 |
+ |
137 |
+src_configure() { |
138 |
+ local cgcc=() |
139 |
+ for i in ${CXXFLAGS} |
140 |
+ do |
141 |
+ cgcc+=( --gcc-option="${i}" ) |
142 |
+ done |
143 |
+ # Trying to specify the LDFLAGS in --ld-option does not work, as ld does |
144 |
+ # not understand ld options prefixed with -Wl, |
145 |
+ # The linker that is used to link the libwxc.so shared library is hard coded |
146 |
+ # in Setup.hs. So the --with-ld would not change the linker used when |
147 |
+ # linking libwxc.so. --with-ld="gcc" does not help, as then cabal passes |
148 |
+ # ld options like -x to gcc which then returns a non-zero exit status, then |
149 |
+ # cabal ignores all the --ld-option parameters. |
150 |
+ # So I place all the LDFLAGS in --gcc-option parameters. They are ignored |
151 |
+ # when building .o files. |
152 |
+ local cld=() |
153 |
+ for i in ${LDFLAGS} |
154 |
+ do |
155 |
+ cld+=( --gcc-option="${i}" ) |
156 |
+ done |
157 |
+ cabal_src_configure ${cgcc[*]} ${cld[*]} --verbose=3 |
158 |
+} |