public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-haskell/wxc/, dev-haskell/wxc/files/
@ 2020-08-19 21:26 Sergei Trofimovich
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2020-08-19 21:26 UTC (permalink / raw
  To: gentoo-commits

commit:     546cb495723c209dd4c8364aef53b1e6dfe14b98
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 19 21:26:12 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Aug 19 21:26:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=546cb495

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 <AT> gentoo.org>

 dev-haskell/wxc/Manifest                           |  1 +
 dev-haskell/wxc/files/wxc-0.92.3.0-cabal-2.2.patch | 32 +++++++++++
 dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.patch   | 12 ++++
 dev-haskell/wxc/wxc-0.92.3.0.ebuild                | 66 ++++++++++++++++++++++
 4 files changed, 111 insertions(+)

diff --git a/dev-haskell/wxc/Manifest b/dev-haskell/wxc/Manifest
index 9626844845e..c24115f1645 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 00000000000..86d523b362f
--- /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 00000000000..5d474098987
--- /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 00000000000..a704fc0cd19
--- /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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-haskell/wxc/, dev-haskell/wxc/files/
@ 2021-04-16 22:11 Sergei Trofimovich
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2021-04-16 22:11 UTC (permalink / raw
  To: gentoo-commits

commit:     9de2814211ceca4a2b501584b815defa6cea11fe
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 16 22:04:15 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Apr 16 22:11:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9de28142

dev-haskell/wxc: switch to WX_GTK_VER="3.0-gtk3"

Reported-by: David Seifert
Closes: https://bugs.gentoo.org/781038
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.2.patch | 27 +++++++++
 dev-haskell/wxc/wxc-0.92.3.0-r1.ebuild             | 68 ++++++++++++++++++++++
 2 files changed, 95 insertions(+)

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
new file mode 100644
index 00000000000..096e971de4b
--- /dev/null
+++ b/dev-haskell/wxc/files/wxc-0.92.3.0-cabal-3.2.patch
@@ -0,0 +1,27 @@
+--- a/Setup.hs
++++ b/Setup.hs
+@@ -81,7 +81,12 @@ rawShellSystemStdInOut :: Verbosity                     -- Verbosity level
+                        -> FilePath                      -- Path to command
+                        -> [String]                      -- Command arguments
+                        -> IO (String, String, ExitCode) -- (Command result, Errors, Command exit status)
+-#if MIN_VERSION_Cabal(2,2,0)
++
++#if MIN_VERSION_Cabal(3,2,0)
++rawShellSystemStdInOut v f as = do
++  (so, se, c) <- rawSystemStdInOut v "sh" (f:as) Nothing Nothing Nothing DSU.IODataModeText
++  return (so, se, c)
++#elif 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)
+@@ -444,7 +449,9 @@ deMsysPaths bi = do
+     if b
+     then do
+         let cor ph = do
+-#if MIN_VERSION_Cabal(2,2,0)
++#if MIN_VERSION_Cabal(3,2,0)
++            (r, e, c) <- rawSystemStdInOut normal "sh" ["-c", "cd " ++ ph ++ "; pwd -W"] Nothing Nothing Nothing DSU.IODataModeText
++#elif 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

diff --git a/dev-haskell/wxc/wxc-0.92.3.0-r1.ebuild b/dev-haskell/wxc/wxc-0.92.3.0-r1.ebuild
new file mode 100644
index 00000000000..d9c666dfcca
--- /dev/null
+++ b/dev-haskell/wxc/wxc-0.92.3.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# ebuild generated by hackport 0.5.3.9999
+
+WX_GTK_VER="3.0-gtk3"
+
+CABAL_FEATURES="lib profile" # ho docs as it has no haskell files
+inherit haskell-cabal multilib 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:=
+	!!dev-haskell/wxc:3.0
+"
+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
+	"${FILESDIR}"/${PN}-0.92.3.0-cabal-3.2.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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-16 22:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-19 21:26 [gentoo-commits] repo/gentoo:master commit in: dev-haskell/wxc/, dev-haskell/wxc/files/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2021-04-16 22:11 Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox