From 80ffd8979949788f951b32ebf67d401f1cd26a25 Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Tue, 5 Aug 2025 11:01:59 +0200 Subject: ch23: Add info about compiling and running the application --- ch23/support/patches/gtk-0.14.5.patch | 24 +++++++++++ .../patches/gtk2hs-buildtools-0.13.5.0.patch | 12 ++++++ ch23/support/patches/old-locale-1.0.0.7.patch | 49 ++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 ch23/support/patches/gtk-0.14.5.patch create mode 100644 ch23/support/patches/gtk2hs-buildtools-0.13.5.0.patch create mode 100644 ch23/support/patches/old-locale-1.0.0.7.patch (limited to 'ch23/support/patches') diff --git a/ch23/support/patches/gtk-0.14.5.patch b/ch23/support/patches/gtk-0.14.5.patch new file mode 100644 index 0000000..baf753a --- /dev/null +++ b/ch23/support/patches/gtk-0.14.5.patch @@ -0,0 +1,24 @@ +diff -rupN gtk-0.14.3/Graphics/UI/Gtk/Embedding/Types.chs new-gtk-0.14.3/Graphics/UI/Gtk/Embedding/Types.chs +--- gtk-0.14.3/Graphics/UI/Gtk/Embedding/Types.chs 2016-05-22 03:45:58.000000000 +0200 ++++ new-gtk-0.14.3/Graphics/UI/Gtk/Embedding/Types.chs 2025-08-01 21:34:55.810556987 +0200 +@@ -45,7 +45,7 @@ import Foreign.ForeignPtr (ForeignPtr, c + #if __GLASGOW_HASKELL__ >= 707 + import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr) + #else +-import Foreign.ForeignPtr (unsafeForeignPtrToPtr) ++import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr) + #endif + import Foreign.C.Types (CULong(..), CUInt(..), CULLong(..)) + import System.Glib.GType (GType, typeInstanceIsA) +diff -rupN gtk-0.14.3/Graphics/UI/Gtk/Types.chs new-gtk-0.14.3/Graphics/UI/Gtk/Types.chs +--- gtk-0.14.3/Graphics/UI/Gtk/Types.chs 2016-05-22 03:45:58.000000000 +0200 ++++ new-gtk-0.14.3/Graphics/UI/Gtk/Types.chs 2025-08-01 21:35:08.841037917 +0200 +@@ -772,7 +772,7 @@ import Foreign.ForeignPtr (ForeignPtr, c + #if __GLASGOW_HASKELL__ >= 707 + import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr) + #else +-import Foreign.ForeignPtr (unsafeForeignPtrToPtr) ++import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr) + #endif + import Foreign.C.Types (CULong(..), CUInt(..), CULLong(..)) + import System.Glib.GType (GType, typeInstanceIsA) diff --git a/ch23/support/patches/gtk2hs-buildtools-0.13.5.0.patch b/ch23/support/patches/gtk2hs-buildtools-0.13.5.0.patch new file mode 100644 index 0000000..9052c9d --- /dev/null +++ b/ch23/support/patches/gtk2hs-buildtools-0.13.5.0.patch @@ -0,0 +1,12 @@ +diff -rupN gtk2hs-buildtools-0.13.5.0/c2hs/c/CLexer.x new-gtk2hs-buildtools-0.13.5.0/c2hs/c/CLexer.x +--- gtk2hs-buildtools-0.13.5.0/c2hs/c/CLexer.x 1970-01-01 01:00:00.000000000 +0100 ++++ new-gtk2hs-buildtools-0.13.5.0/c2hs/c/CLexer.x 2025-08-01 14:51:49.676123965 +0200 +@@ -130,7 +130,7 @@ $white+ ; + -- * allows further ints after the file name a la GCC; as the GCC CPP docu + -- doesn't say how many ints there can be, we allow an unbound number + -- +-\#$space*@int$space*(\"($infname|@charesc)*\"$space*)?(@int$space*)*$eol ++\#$space*@digits$space*(\"($infname|@charesc)*\"$space*)?(@int$space*)*$eol + { \pos len str -> setPos (adjustPos (take len str) pos) >> lexToken } + + -- #pragma directive (K&R A12.8) diff --git a/ch23/support/patches/old-locale-1.0.0.7.patch b/ch23/support/patches/old-locale-1.0.0.7.patch new file mode 100644 index 0000000..e0e418b --- /dev/null +++ b/ch23/support/patches/old-locale-1.0.0.7.patch @@ -0,0 +1,49 @@ +diff -rupN old-locale-1.0.0.7/old-locale.cabal new-old-locale-1.0.0.7/old-locale.cabal +--- old-locale-1.0.0.7/old-locale.cabal 2014-11-21 11:45:10.000000000 +0100 ++++ new-old-locale-1.0.0.7/old-locale.cabal 2025-08-01 17:44:38.946864154 +0200 +@@ -31,5 +31,5 @@ Library + exposed-modules: + System.Locale + +- build-depends: base >= 4.2 && < 4.9 ++ build-depends: base >= 4.2 && < 5 + ghc-options: -Wall +diff -rupN old-locale-1.0.0.7/old-locale.cabal~ new-old-locale-1.0.0.7/old-locale.cabal~ +--- old-locale-1.0.0.7/old-locale.cabal~ 1970-01-01 01:00:00.000000000 +0100 ++++ new-old-locale-1.0.0.7/old-locale.cabal~ 2025-08-01 17:44:27.052920678 +0200 +@@ -0,0 +1,35 @@ ++name: old-locale ++version: 1.0.0.7 ++-- NOTE: Don't forget to update ./changelog.md ++license: BSD3 ++license-file: LICENSE ++maintainer: libraries@haskell.org ++bug-reports: https://github.com/haskell/old-locale/issues ++synopsis: locale library ++category: System ++build-type: Simple ++Cabal-Version:>=1.10 ++tested-with: GHC==7.8.3, GHC==7.8.2, GHC==7.8.1, GHC==7.6.3, GHC==7.6.2, GHC==7.6.1, GHC==7.4.2, GHC==7.4.1, GHC==7.2.2, GHC==7.2.1, GHC==7.0.4, GHC==7.0.3, GHC==7.0.2, GHC==7.0.1, GHC==6.12.3 ++description: ++ This package provides the ability to adapt to ++ locale conventions such as date and time formats. ++ ++extra-source-files: ++ changelog.md ++ ++source-repository head ++ type: git ++ location: https://github.com/haskell/old-locale.git ++ ++Library ++ default-language: Haskell98 ++ other-extensions: CPP ++ if impl(ghc>=7.2) ++ -- && base>=4.4.1 ++ other-extensions: Safe ++ ++ exposed-modules: ++ System.Locale ++ ++ build-depends: base >= 4.2 && < 4.9 ++ ghc-options: -Wall -- cgit v1.2.3