summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-08-19 22:26:12 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-08-19 22:26:12 +0100
commit546cb495723c209dd4c8364aef53b1e6dfe14b98 (patch)
tree863d6ca067f295807740cbf4b11a18471c0fc6e9 /dev-haskell/wxc
parentdev-lang/elixir: drop old (diff)
downloadgentoo-546cb495723c209dd4c8364aef53b1e6dfe14b98.tar.gz
gentoo-546cb495723c209dd4c8364aef53b1e6dfe14b98.tar.bz2
gentoo-546cb495723c209dd4c8364aef53b1e6dfe14b98.zip
dev-haskell/wxc: bump up to 0.92.3.0
Reported-by: Agostino Sarubbo Closes: https://bugs.gentoo.org/736444 Package-Manager: Portage-3.0.3, Repoman-3.0.0 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-haskell/wxc')
-rw-r--r--dev-haskell/wxc/Manifest1
-rw-r--r--dev-haskell/wxc/files/wxc-0.92.3.0-cabal-2.2.patch32
-rw-r--r--dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.patch12
-rw-r--r--dev-haskell/wxc/wxc-0.92.3.0.ebuild66
4 files changed, 111 insertions, 0 deletions
diff --git a/dev-haskell/wxc/Manifest b/dev-haskell/wxc/Manifest
index 9626844845e1..c24115f16451 100644
--- a/dev-haskell/wxc/Manifest
+++ b/dev-haskell/wxc/Manifest
@@ -1 +1,2 @@
DIST wxc-0.92.2.0.tar.gz 203065 BLAKE2B 3f873b3bbc50e5fa7690f2f05a25ab360260d90523dd0b9c016f5dfeea99e9a59fe4848de520d642d2cea52dbadfd69aa31671f521243240488d643d4554e880 SHA512 e6fba1be94978603965b8902fad9326772b5483d5df621d5245f1fae97d85bcb1aff4565f1e8396de23c854050151c5e009e34a1ea29c3037057599ac0412bcd
+DIST wxc-0.92.3.0.tar.gz 203597 BLAKE2B e73745fe17747c1abb79cdb2e7ecadee1f286abd34d1ccfbc2bb53d729fbab4dc60ab054af07f75cae9aa67e83ae794ea23f3f00decd39f69b93a5a56726d9d2 SHA512 60f34e316a4dfa4951e18d99d24508d36806f8a9d0bf05485904b03622ebda138b7a93a7477a2a107007d40e8cadbe51200322507054f65bd0b720545b414b37
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
new file mode 100644
index 000000000000..86d523b362f1
--- /dev/null
+++ b/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-2.2.patch
@@ -0,0 +1,32 @@
+--- a/Setup.hs
++++ b/Setup.hs
+@@ -22,2 +22,3 @@ import Distribution.Simple.Setup ( BuildFlags, ConfigFlags
+ import Distribution.Simple.Utils (installOrdinaryFile, rawSystemExitWithEnv, rawSystemStdInOut, die)
++import qualified Distribution.Simple.Utils as DSU
+ import Distribution.System (OS (..), Arch (..), buildOS, buildArch)
+@@ -81,3 +82,9 @@ rawShellSystemStdInOut :: Verbosity -- Verbosity level
+ -> IO (String, String, ExitCode) -- (Command result, Errors, Command exit status)
++#if MIN_VERSION_Cabal(2,2,0)
++rawShellSystemStdInOut v f as = do
++ (~(DSU.IODataText so), se, c) <- rawSystemStdInOut v "sh" (f:as) Nothing Nothing Nothing DSU.IODataModeText
++ return (so, se, c)
++#else
+ rawShellSystemStdInOut v f as = rawSystemStdInOut v "sh" (f:as) Nothing Nothing Nothing False
++#endif
+
+@@ -438,3 +445,7 @@ deMsysPaths bi = do
+ let cor ph = do
++#if MIN_VERSION_Cabal(2,2,0)
++ (~(DSU.IODataText r), e, c) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing DSU.IODataModeText
++#else
+ (r, e, c ) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing False
++#endif
+ unless (c == ExitSuccess) (putStrLn ("Error: failed to convert MSYS path to native path \n" ++ e) >> exitFailure)
+@@ -504,3 +515,7 @@ sharedLibName ver basename =
+ where
++#if MIN_VERSION_Cabal(2,2,0)
++ full_ver = (concat . intersperse "." . map show . versionNumbers) ver
++#else
+ full_ver = (concat . intersperse "." . map show . versionBranch) ver
++#endif
+
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
new file mode 100644
index 000000000000..5d474098987d
--- /dev/null
+++ b/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.patch
@@ -0,0 +1,12 @@
+--- a/Setup.hs
++++ b/Setup.hs
+@@ -19,7 +19,8 @@ import Distribution.Simple.Setup ( BuildFlags, ConfigFlags
+ , InstallFlags, installVerbosity
+ , fromFlag, fromFlagOrDefault, copyDest
+ )
+-import Distribution.Simple.Utils (installOrdinaryFile, rawSystemExitWithEnv, rawSystemStdInOut, die)
++import Distribution.Simple.Utils (installOrdinaryFile, rawSystemExitWithEnv, rawSystemStdInOut)
++import System.Exit (die)
+ import qualified Distribution.Simple.Utils as DSU
+ import Distribution.System (OS (..), Arch (..), buildOS, buildArch)
+ import Distribution.Verbosity (Verbosity, normal, verbose)
diff --git a/dev-haskell/wxc/wxc-0.92.3.0.ebuild b/dev-haskell/wxc/wxc-0.92.3.0.ebuild
new file mode 100644
index 000000000000..a704fc0cd19e
--- /dev/null
+++ b/dev-haskell/wxc/wxc-0.92.3.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# ebuild generated by hackport 0.5.3.9999
+
+WX_GTK_VER="3.0"
+
+CABAL_FEATURES="lib profile" # ho docs as it has no haskell files
+inherit haskell-cabal multilib versionator wxwidgets
+
+DESCRIPTION="wxHaskell C++ wrapper"
+HOMEPAGE="https://wiki.haskell.org/WxHaskell"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
+
+LICENSE="wxWinLL-3.1"
+SLOT="${WX_GTK_VER}/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="gstreamer"
+
+RDEPEND=">dev-haskell/split-0:=[profile?]
+ >=dev-haskell/wxdirect-0.90.1.1:${WX_GTK_VER}=[profile?]
+ x11-libs/wxGTK:${WX_GTK_VER}=[X,gstreamer?,opengl]
+ >=dev-lang/ghc-7.6.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.23
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.92.3.0-cabal-2.2.patch
+ "${FILESDIR}"/${PN}-0.92.3.0-cabal-3.patch
+)
+
+src_prepare() {
+ default
+
+ setup-wxwidgets
+
+ sed -e "s@\"wx-config\"@\"${WX_CONFIG}\"@g" \
+ -i "${S}/Setup.hs" || die "Could not specify wx-config in Setup.hs"
+}
+
+src_configure() {
+ local cgcc=()
+ for i in ${CXXFLAGS}
+ do
+ cgcc+=( --gcc-option="${i}" )
+ done
+ # Trying to specify the LDFLAGS in --ld-option does not work, as ld does
+ # not understand ld options prefixed with -Wl,
+ # The linker that is used to link the libwxc.so shared library is hard coded
+ # in Setup.hs. So the --with-ld would not change the linker used when
+ # linking libwxc.so. --with-ld="gcc" does not help, as then cabal passes
+ # ld options like -x to gcc which then returns a non-zero exit status, then
+ # cabal ignores all the --ld-option parameters.
+ # So I place all the LDFLAGS in --gcc-option parameters. They are ignored
+ # when building .o files.
+ local cld=()
+ for i in ${LDFLAGS}
+ do
+ cld+=( --gcc-option="${i}" )
+ done
+ cabal_src_configure ${cgcc[*]} ${cld[*]} --verbose=3
+}