1 |
commit: 9de2814211ceca4a2b501584b815defa6cea11fe |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 16 22:04:15 2021 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 16 22:11:37 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9de28142 |
7 |
|
8 |
dev-haskell/wxc: switch to WX_GTK_VER="3.0-gtk3" |
9 |
|
10 |
Reported-by: David Seifert |
11 |
Closes: https://bugs.gentoo.org/781038 |
12 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.2.patch | 27 +++++++++ |
16 |
dev-haskell/wxc/wxc-0.92.3.0-r1.ebuild | 68 ++++++++++++++++++++++ |
17 |
2 files changed, 95 insertions(+) |
18 |
|
19 |
diff --git a/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.2.patch b/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.2.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..096e971de4b |
22 |
--- /dev/null |
23 |
+++ b/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.2.patch |
24 |
@@ -0,0 +1,27 @@ |
25 |
+--- a/Setup.hs |
26 |
++++ b/Setup.hs |
27 |
+@@ -81,7 +81,12 @@ rawShellSystemStdInOut :: Verbosity -- Verbosity level |
28 |
+ -> FilePath -- Path to command |
29 |
+ -> [String] -- Command arguments |
30 |
+ -> IO (String, String, ExitCode) -- (Command result, Errors, Command exit status) |
31 |
+-#if MIN_VERSION_Cabal(2,2,0) |
32 |
++ |
33 |
++#if MIN_VERSION_Cabal(3,2,0) |
34 |
++rawShellSystemStdInOut v f as = do |
35 |
++ (so, se, c) <- rawSystemStdInOut v "sh" (f:as) Nothing Nothing Nothing DSU.IODataModeText |
36 |
++ return (so, se, c) |
37 |
++#elif MIN_VERSION_Cabal(2,2,0) |
38 |
+ rawShellSystemStdInOut v f as = do |
39 |
+ (~(DSU.IODataText so), se, c) <- rawSystemStdInOut v "sh" (f:as) Nothing Nothing Nothing DSU.IODataModeText |
40 |
+ return (so, se, c) |
41 |
+@@ -444,7 +449,9 @@ deMsysPaths bi = do |
42 |
+ if b |
43 |
+ then do |
44 |
+ let cor ph = do |
45 |
+-#if MIN_VERSION_Cabal(2,2,0) |
46 |
++#if MIN_VERSION_Cabal(3,2,0) |
47 |
++ (r, e, c) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing DSU.IODataModeText |
48 |
++#elif MIN_VERSION_Cabal(2,2,0) |
49 |
+ (~(DSU.IODataText r), e, c) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing DSU.IODataModeText |
50 |
+ #else |
51 |
+ (r, e, c ) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing False |
52 |
|
53 |
diff --git a/dev-haskell/wxc/wxc-0.92.3.0-r1.ebuild b/dev-haskell/wxc/wxc-0.92.3.0-r1.ebuild |
54 |
new file mode 100644 |
55 |
index 00000000000..d9c666dfcca |
56 |
--- /dev/null |
57 |
+++ b/dev-haskell/wxc/wxc-0.92.3.0-r1.ebuild |
58 |
@@ -0,0 +1,68 @@ |
59 |
+# Copyright 1999-2021 Gentoo Authors |
60 |
+# Distributed under the terms of the GNU General Public License v2 |
61 |
+ |
62 |
+EAPI=7 |
63 |
+ |
64 |
+# ebuild generated by hackport 0.5.3.9999 |
65 |
+ |
66 |
+WX_GTK_VER="3.0-gtk3" |
67 |
+ |
68 |
+CABAL_FEATURES="lib profile" # ho docs as it has no haskell files |
69 |
+inherit haskell-cabal multilib wxwidgets |
70 |
+ |
71 |
+DESCRIPTION="wxHaskell C++ wrapper" |
72 |
+HOMEPAGE="https://wiki.haskell.org/WxHaskell" |
73 |
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz" |
74 |
+ |
75 |
+LICENSE="wxWinLL-3.1" |
76 |
+SLOT="${WX_GTK_VER}/${PV}" |
77 |
+KEYWORDS="~amd64 ~x86" |
78 |
+IUSE="gstreamer" |
79 |
+ |
80 |
+RDEPEND=">dev-haskell/split-0:=[profile?] |
81 |
+ >=dev-haskell/wxdirect-0.90.1.1:${WX_GTK_VER}=[profile?] |
82 |
+ x11-libs/wxGTK:${WX_GTK_VER}=[X,gstreamer?,opengl] |
83 |
+ >=dev-lang/ghc-7.6.1:= |
84 |
+ !!dev-haskell/wxc:3.0 |
85 |
+" |
86 |
+DEPEND="${RDEPEND} |
87 |
+ >=dev-haskell/cabal-1.23 |
88 |
+" |
89 |
+ |
90 |
+PATCHES=( |
91 |
+ "${FILESDIR}"/${PN}-0.92.3.0-cabal-2.2.patch |
92 |
+ "${FILESDIR}"/${PN}-0.92.3.0-cabal-3.patch |
93 |
+ "${FILESDIR}"/${PN}-0.92.3.0-cabal-3.2.patch |
94 |
+) |
95 |
+ |
96 |
+src_prepare() { |
97 |
+ default |
98 |
+ |
99 |
+ setup-wxwidgets |
100 |
+ |
101 |
+ sed -e "s@\"wx-config\"@\"${WX_CONFIG}\"@g" \ |
102 |
+ -i "${S}/Setup.hs" || die "Could not specify wx-config in Setup.hs" |
103 |
+} |
104 |
+ |
105 |
+src_configure() { |
106 |
+ local cgcc=() |
107 |
+ for i in ${CXXFLAGS} |
108 |
+ do |
109 |
+ cgcc+=( --gcc-option="${i}" ) |
110 |
+ done |
111 |
+ # Trying to specify the LDFLAGS in --ld-option does not work, as ld does |
112 |
+ # not understand ld options prefixed with -Wl, |
113 |
+ # The linker that is used to link the libwxc.so shared library is hard coded |
114 |
+ # in Setup.hs. So the --with-ld would not change the linker used when |
115 |
+ # linking libwxc.so. --with-ld="gcc" does not help, as then cabal passes |
116 |
+ # ld options like -x to gcc which then returns a non-zero exit status, then |
117 |
+ # cabal ignores all the --ld-option parameters. |
118 |
+ # So I place all the LDFLAGS in --gcc-option parameters. They are ignored |
119 |
+ # when building .o files. |
120 |
+ local cld=() |
121 |
+ for i in ${LDFLAGS} |
122 |
+ do |
123 |
+ cld+=( --gcc-option="${i}" ) |
124 |
+ done |
125 |
+ cabal_src_configure ${cgcc[*]} ${cld[*]} --verbose=3 |
126 |
+} |