Hello community,
here is the log from the commit of package ghc-X11 for openSUSE:Factory checked in at 2017-03-02 19:43:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-X11 (Old)
and /work/SRC/openSUSE:Factory/.ghc-X11.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-X11"
Thu Mar 2 19:43:09 2017 rev:3 rq:461531 version:1.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-X11/ghc-X11.changes 2016-07-27 16:11:27.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-X11.new/ghc-X11.changes 2017-03-02 19:43:10.386074375 +0100
@@ -1,0 +2,5 @@
+Sun Feb 12 14:17:11 UTC 2017 - psimons@suse.com
+
+- Update to version 1.8 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
X11-1.6.1.2.tar.gz
New:
----
X11-1.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-X11.spec ++++++
--- /var/tmp/diff_new_pack.gkyIbg/_old 2017-03-02 19:43:11.461922146 +0100
+++ /var/tmp/diff_new_pack.gkyIbg/_new 2017-03-02 19:43:11.461922146 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-X11
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,28 +18,26 @@
%global pkg_name X11
Name: ghc-%{pkg_name}
-Version: 1.6.1.2
+Version: 1.8
Release: 0
Summary: A binding to the X11 graphics library
License: BSD-3-Clause
-Group: System/Libraries
+Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
BuildRequires: ghc-Cabal-devel
-# Begin cabal-rpm deps:
BuildRequires: ghc-data-default-devel
BuildRequires: ghc-rpm-macros
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libXrandr-devel
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
BuildRequires: pkgconfig
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(x11-xcb)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xrandr)
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A Haskell binding to the X11 graphics library. The binding is a direct
@@ -51,14 +49,12 @@
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
Requires: ghc-compiler = %{ghc_version}
-# Begin cabal-rpm deps:
Requires: libX11-devel
Requires: libXext-devel
+Requires: libXinerama-devel
Requires: libXrandr-devel
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}
-# End cabal-rpm deps
-Requires: libXinerama-devel
%description devel
This package provides the Haskell %{pkg_name} library development files.
@@ -66,15 +62,12 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
%post devel
%ghc_pkg_recache
++++++ X11-1.6.1.2.tar.gz -> X11-1.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/ExtraTypes/XF86.hsc new/X11-1.8/Graphics/X11/ExtraTypes/XF86.hsc
--- old/X11-1.6.1.2/Graphics/X11/ExtraTypes/XF86.hsc 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/ExtraTypes/XF86.hsc 2017-02-09 23:56:14.000000000 +0100
@@ -688,6 +688,146 @@
#else
-- Skipping xF86XK_Music because your X doesn't define it
#endif
+#ifdef XF86XK_Battery
+ xF86XK_Battery, -- Display battery information
+#else
+ -- Skipping XF86XK_Battery because your X doesn't define it
+#endif
+#ifdef XF86XK_Bluetooth
+ xF86XK_Bluetooth, -- Enable/disable Bluetooth
+#else
+ -- Skipping XF86XK_Bluetooth because your X doesn't define it
+#endif
+#ifdef XF86XK_WLAN
+ xF86XK_WLAN, -- Enable/disable WLAN
+#else
+ -- Skipping XF86XK_WLAN because your X doesn't define it
+#endif
+#ifdef XF86XK_UWB
+ xF86XK_UWB, -- Enable/disable UWB
+#else
+ -- Skipping XF86XK_UWB because your X doesn't define it
+#endif
+#ifdef XF86XK_AudioForward,
+ xF86XK_AudioForward, -- Fast-forward audio track
+#else
+ -- Skipping XF86XK_AudioForward because your X doesn't define it
+#endif
+#ifdef XF86XK_AudioRepeat
+ xF86XK_AudioRepeat, -- Toggle repeat mode
+#else
+ -- Skipping XF86XK_AudioRepeat because your X doesn't define it
+#endif
+#ifdef XF86XK_AudioRandomPlay
+ xF86XK_AudioRandomPlay, -- Toggle shuffle mode
+#else
+ -- Skipping XF86XK_AudioRandomPlay because your X doesn't define it
+#endif
+#ifdef XF86XK_Subtitle
+ xF86XK_Subtitle, -- Cycle through subtitle
+#else
+ -- Skipping XF86XK_Subtitle because your X doesn't define it
+#endif
+#ifdef XF86XK_AudioCycleTrack
+ xF86XK_AudioCycleTrack, -- Cycle through audio tracks
+#else
+ -- Skipping XF86XK_AudioCycleTrack because your X doesn't define it
+#endif
+#ifdef XF86XK_CycleAngle
+ xF86XK_CycleAngle, -- Cycle through angles
+#else
+ -- Skipping XF86XK_CycleAngle because your X doesn't define it
+#endif
+#ifdef XF86XK_FrameBack
+ xF86XK_FrameBack, -- Video: go one frame back
+#else
+ -- Skipping XF86XK_FrameBack because your X doesn't define it
+#endif
+#ifdef XF86XK_FrameForward
+ xF86XK_FrameForward, -- Video: go one frame forward
+#else
+ -- Skipping XF86XK_FrameForward because your X doesn't define it
+#endif
+#ifdef XF86XK_Time
+ xF86XK_Time, -- Display, or shows an entry for time seeking
+#else
+ -- Skipping XF86XK_Time because your X doesn't define it
+#endif
+#ifdef XF86XK_Select
+ xF86XK_Select, -- Select button on joypads and remotes
+#else
+ -- Skipping XF86XK_Select because your X doesn't define it
+#endif
+#ifdef XF86XK_View
+ xF86XK_View, -- Show a view options/properties
+#else
+ -- Skipping XF86XK_View because your X doesn't define it
+#endif
+#ifdef XF86XK_TopMenu
+ xF86XK_TopMenu, -- Go to a top-level menu in a video
+#else
+ -- Skipping XF86XK_TopMenu because your X doesn't define it
+#endif
+#ifdef XF86XK_Red
+ xF86XK_Red, -- Red button
+#else
+ -- Skipping XF86XK_Red because your X doesn't define it
+#endif
+#ifdef XF86XK_Green
+ xF86XK_Green, -- Green button
+#else
+ -- Skipping XF86XK_Green because your X doesn't define it
+#endif
+#ifdef XF86XK_Yellow
+ xF86XK_Yellow, -- Yellow button
+#else
+ -- Skipping XF86XK_Yellow because your X doesn't define it
+#endif
+#ifdef XF86XK_Blue
+ xF86XK_Blue, -- Blue button
+#else
+ -- Skipping XF86XK_Blue because your X doesn't define it
+#endif
+#ifdef XF86XK_Suspend
+ xF86XK_Suspend, -- Sleep to RAM
+#else
+ -- Skipping XF86XK_Suspend because your X doesn't define it
+#endif
+#ifdef XF86XK_Hibernate
+ xF86XK_Hibernate, -- Sleep to disk
+#else
+ -- Skipping XF86XK_Hibernate because your X doesn't define it
+#endif
+#ifdef XF86XK_TouchpadToggle
+ xF86XK_TouchpadToggle, -- Toggle between touchpad/trackstick
+#else
+ -- Skipping XF86XK_TouchpadToggle because your X doesn't define it
+#endif
+#ifdef XF86XK_TouchpadOn
+ xF86XK_TouchpadOn, -- The touchpad got switched on
+#else
+ -- Skipping XF86XK_TouchpadOn because your X doesn't define it
+#endif
+#ifdef XF86XK_TouchpadOff
+ xF86XK_TouchpadOff, -- The touchpad got switched off
+#else
+ -- Skipping XF86XK_TouchpadOff because your X doesn't define it
+#endif
+#ifdef XF86XK_AudioMicMute
+ xF86XK_AudioMicMute, -- Mute the Mic from the system
+#else
+ -- Skipping XF86XK_AudioMicMute because your X doesn't define it
+#endif
+#ifdef XF86XK_LogWindowTree
+ xF86XK_LogWindowTree, -- Print window tree to log
+#else
+ -- Skipping XF86XK_LogWindowTree because your X doesn't define it
+#endif
+#ifdef XF86XK_LogGrabInfo
+ xF86XK_LogGrabInfo, -- Print all active grabs to log
+#else
+ -- Skipping XF86XK_LogGrabInfo because your X doesn't define it
+#endif
#ifdef XF86XK_Switch_VT_1
xF86XK_Switch_VT_1,
#else
@@ -1306,6 +1446,118 @@
xF86XK_Music :: KeySym
xF86XK_Music = #const XF86XK_Music
#endif
+#ifdef XF86XK_Battery
+xF86XK_Battery :: KeySym
+xF86XK_Battery = #const XF86XK_Battery
+#endif
+#ifdef XF86XK_Bluetooth
+xF86XK_Bluetooth :: KeySym
+xF86XK_Bluetooth = #const XF86XK_Bluetooth
+#endif
+#ifdef XF86XK_WLAN
+xF86XK_WLAN :: KeySym
+xF86XK_WLAN = #const XF86XK_WLAN
+#endif
+#ifdef XF86XK_UWB
+xF86XK_UWB :: KeySym
+xF86XK_UWB = #const XF86XK_UWB
+#endif
+#ifdef XF86XK_AudioForward
+xF86XK_AudioForward :: KeySym
+xF86XK_AudioForward = #const XF86XK_AudioForward
+#endif
+#ifdef XF86XK_AudioRepeat
+xF86XK_AudioRepeat :: KeySym
+xF86XK_AudioRepeat = #const XF86XK_AudioRepeat
+#endif
+#ifdef XF86XK_AudioRandomPlay
+xF86XK_AudioRandomPlay :: KeySym
+xF86XK_AudioRandomPlay = #const XF86XK_AudioRandomPlay
+#endif
+#ifdef XF86XK_Subtitle
+xF86XK_Subtitle :: KeySym
+xF86XK_Subtitle = #const XF86XK_Subtitle
+#endif
+#ifdef XF86XK_AudioCycleTrack
+xF86XK_AudioCycleTrack :: KeySym
+xF86XK_AudioCycleTrack = #const XF86XK_AudioCycleTrack
+#endif
+#ifdef XF86XK_CycleAngle
+xF86XK_CycleAngle :: KeySym
+xF86XK_CycleAngle = #const XF86XK_CycleAngle
+#endif
+#ifdef XF86XK_FrameBack
+xF86XK_FrameBack :: KeySym
+xF86XK_FrameBack = #const XF86XK_FrameBack
+#endif
+#ifdef XF86XK_FrameForward
+xF86XK_FrameForward :: KeySym
+xF86XK_FrameForward = #const XF86XK_FrameForward
+#endif
+#ifdef XF86XK_Time
+xF86XK_Time :: KeySym
+xF86XK_Time = #const XF86XK_Time
+#endif
+#ifdef XF86XK_Select
+xF86XK_Select :: KeySym
+xF86XK_Select = #const XF86XK_Select
+#endif
+#ifdef XF86XK_View
+xF86XK_View :: KeySym
+xF86XK_View = #const XF86XK_View
+#endif
+#ifdef XF86XK_TopMenu
+xF86XK_TopMenu :: KeySym
+xF86XK_TopMenu = #const XF86XK_TopMenu
+#endif
+#ifdef XF86XK_Red
+xF86XK_Red :: KeySym
+xF86XK_Red = #const XF86XK_Red
+#endif
+#ifdef XF86XK_Green
+xF86XK_Green :: KeySym
+xF86XK_Green = #const XF86XK_Green
+#endif
+#ifdef XF86XK_Yellow
+xF86XK_Yellow :: KeySym
+xF86XK_Yellow = #const XF86XK_Yellow
+#endif
+#ifdef XF86XK_Blue
+xF86XK_Blue :: KeySym
+xF86XK_Blue = #const XF86XK_Blue
+#endif
+#ifdef XF86XK_Suspend
+xF86XK_Suspend :: KeySym
+xF86XK_Suspend = #const XF86XK_Suspend
+#endif
+#ifdef XF86XK_Hibernate
+xF86XK_Hibernate :: KeySym
+xF86XK_Hibernate = #const XF86XK_Hibernate
+#endif
+#ifdef XF86XK_TouchpadToggle
+xF86XK_TouchpadToggle :: KeySym
+xF86XK_TouchpadToggle = #const XF86XK_TouchpadToggle
+#endif
+#ifdef XF86XK_TouchpadOn
+xF86XK_TouchpadOn :: KeySym
+xF86XK_TouchpadOn = #const XF86XK_TouchpadOn
+#endif
+#ifdef XF86XK_TouchpadOff
+xF86XK_TouchpadOff :: KeySym
+xF86XK_TouchpadOff = #const XF86XK_TouchpadOff
+#endif
+#ifdef XF86XK_AudioMicMute
+xF86XK_AudioMicMute :: KeySym
+xF86XK_AudioMicMute = #const XF86XK_AudioMicMute
+#endif
+#ifdef XF86XK_LogWindowTree
+xF86XK_LogWindowTree :: KeySym
+xF86XK_LogWindowTree = #const XF86XK_LogWindowTree
+#endif
+#ifdef XF86XK_LogGrabInfo
+xF86XK_LogGrabInfo :: KeySym
+xF86XK_LogGrabInfo = #const XF86XK_LogGrabInfo
+#endif
#ifdef XF86XK_Switch_VT_1
xF86XK_Switch_VT_1 :: KeySym
xF86XK_Switch_VT_1 = #const XF86XK_Switch_VT_1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/XScreenSaver.hsc new/X11-1.8/Graphics/X11/XScreenSaver.hsc
--- old/X11-1.6.1.2/Graphics/X11/XScreenSaver.hsc 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/XScreenSaver.hsc 2017-02-09 23:56:14.000000000 +0100
@@ -4,9 +4,9 @@
-- Module : Graphics.X11.XScreenSaver
-- Copyright : (c) Joachim Breitner
-- (c) Jochen Keil
--- License : GPL2
+-- License : BSD3
--
--- Maintainer: Jochen Keil <jochen dot keil at gmail dot com>
+-- Maintainer: Joachim Breitner
-- Stability : provisional
-- Portability: portable
--
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/Xlib/Color.hs new/X11-1.8/Graphics/X11/Xlib/Color.hs
--- old/X11-1.6.1.2/Graphics/X11/Xlib/Color.hs 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/Xlib/Color.hs 2017-02-09 23:56:14.000000000 +0100
@@ -35,7 +35,6 @@
import Foreign
import Foreign.C
-import Foreign.C.Types
----------------------------------------------------------------
-- Color and Colormaps
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/Xlib/Context.hs new/X11-1.8/Graphics/X11/Xlib/Context.hs
--- old/X11-1.6.1.2/Graphics/X11/Xlib/Context.hs 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/Xlib/Context.hs 2017-02-09 23:56:14.000000000 +0100
@@ -46,7 +46,6 @@
import Foreign
import Foreign.C
-import Foreign.C.Types
----------------------------------------------------------------
-- Graphics contexts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/Xlib/Extras.hsc new/X11-1.8/Graphics/X11/Xlib/Extras.hsc
--- old/X11-1.6.1.2/Graphics/X11/Xlib/Extras.hsc 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/Xlib/Extras.hsc 2017-02-09 23:56:14.000000000 +0100
@@ -191,6 +191,15 @@
, ev_property :: !Atom
, ev_time :: !Time
}
+ | SelectionClear
+ { ev_event_type :: !EventType
+ , ev_serial :: !CULong
+ , ev_send_event :: !Bool
+ , ev_event_display :: Display
+ , ev_window :: !Window
+ , ev_selection :: !Atom
+ , ev_time :: !Time
+ }
| PropertyEvent
{ ev_event_type :: !EventType
, ev_serial :: !CULong
@@ -641,6 +650,22 @@
}
-------------------------
+ -- SelectionClearEvent:
+ -------------------------
+ | type_ == selectionClear -> do
+ window <- #{peek XSelectionClearEvent, window } p
+ atom <- #{peek XSelectionClearEvent, selection } p
+ time <- #{peek XSelectionClearEvent, time } p
+ return $ SelectionClear
+ { ev_event_type = type_
+ , ev_serial = serial
+ , ev_send_event = send_event
+ , ev_event_display = display
+ , ev_window = window
+ , ev_selection = atom
+ , ev_time = time
+ }
+ -------------------------
-- PropertyEvent
-------------------------
| type_ == propertyNotify -> do
@@ -877,7 +902,7 @@
#{poke XWindowChanges, border_width} p $ wc_border_width wc
#{poke XWindowChanges, sibling } p $ wc_sibling wc
#{poke XWindowChanges, stack_mode } p $ wc_stack_mode wc
-
+
peek p = return WindowChanges
`ap` (#{peek XWindowChanges, x} p)
`ap` (#{peek XWindowChanges, y} p)
@@ -937,11 +962,13 @@
-- TODO: this data type is incomplete wrt. the C struct
data WindowAttributes = WindowAttributes
{ wa_x, wa_y, wa_width, wa_height, wa_border_width :: CInt
+ , wa_colormap :: Colormap
+ , wa_map_installed :: Bool
, wa_map_state :: CInt
, wa_override_redirect :: Bool
}
---
+--
-- possible map_states'
--
waIsUnmapped, waIsUnviewable, waIsViewable :: CInt
@@ -959,6 +986,8 @@
`ap` (#{peek XWindowAttributes, width } p)
`ap` (#{peek XWindowAttributes, height } p)
`ap` (#{peek XWindowAttributes, border_width } p)
+ `ap` (#{peek XWindowAttributes, colormap } p)
+ `ap` (#{peek XWindowAttributes, map_installed } p)
`ap` (#{peek XWindowAttributes, map_state } p)
`ap` (#{peek XWindowAttributes, override_redirect} p)
poke p wa = do
@@ -967,6 +996,8 @@
#{poke XWindowAttributes, width } p $ wa_width wa
#{poke XWindowAttributes, height } p $ wa_height wa
#{poke XWindowAttributes, border_width } p $ wa_border_width wa
+ #{poke XWindowAttributes, colormap } p $ wa_colormap wa
+ #{poke XWindowAttributes, map_installed } p $ wa_map_installed wa
#{poke XWindowAttributes, map_state } p $ wa_map_state wa
#{poke XWindowAttributes, override_redirect} p $ wa_override_redirect wa
@@ -975,7 +1006,7 @@
getWindowAttributes :: Display -> Window -> IO WindowAttributes
getWindowAttributes d w = alloca $ \p -> do
- _ <- xGetWindowAttributes d w p
+ _ <- throwIfZero "getWindowAttributes" $ xGetWindowAttributes d w p
peek p
-- | interface to the X11 library function @XChangeWindowAttributes()@.
@@ -1256,7 +1287,7 @@
------------------------------------------------------------------------
-- XErrorEvents
---
+--
-- I'm too lazy to write the binding
--
@@ -1291,6 +1322,9 @@
foreign import ccall unsafe "XlibExtras.h XChangeProperty"
xChangeProperty :: Display -> Window -> Atom -> Atom -> CInt -> CInt -> Ptr CUChar -> CInt -> IO Status
+foreign import ccall unsafe "XlibExtras.h XDeleteProperty"
+ xDeleteProperty :: Display -> Window -> Atom -> IO Status
+
foreign import ccall unsafe "XlibExtras.h XGetWindowProperty"
xGetWindowProperty :: Display -> Window -> Atom -> CLong -> CLong -> Bool -> Atom -> Ptr Atom -> Ptr CInt -> Ptr CULong -> Ptr CULong -> Ptr (Ptr CUChar) -> IO Status
@@ -1358,6 +1392,11 @@
propModePrepend = #{const PropModePrepend}
propModeAppend = #{const PropModeAppend}
+deleteProperty :: Display -> Window -> Atom -> IO ()
+deleteProperty dpy w prop = do
+ _ <- xDeleteProperty dpy w prop
+ return ()
+
-- Windows
foreign import ccall unsafe "XlibExtras.h XUnmapWindow"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/Xlib/Image.hs new/X11-1.8/Graphics/X11/Xlib/Image.hs
--- old/X11-1.6.1.2/Graphics/X11/Xlib/Image.hs 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/Xlib/Image.hs 2017-02-09 23:56:14.000000000 +0100
@@ -17,15 +17,19 @@
createImage,
putImage,
destroyImage,
+ getImage,
+ xGetPixel,
+ getPixel
) where
import Graphics.X11.Types
import Graphics.X11.Xlib.Types
-import Foreign
--- import Foreign.C
+import Foreign (Ptr, throwIfNull)
import Foreign.C.Types
+import System.IO.Unsafe (unsafePerformIO)
+
----------------------------------------------------------------
-- Image
----------------------------------------------------------------
@@ -36,7 +40,7 @@
image <- throwIfNull "createImage" (xCreateImage display vis depth format offset dat width height bitmap_pad bytes_per_line)
return (Image image)
foreign import ccall unsafe "HsXlib.h XCreateImage"
- xCreateImage :: Display -> Visual -> CInt -> ImageFormat -> CInt ->
+ xCreateImage :: Display -> Visual -> CInt -> ImageFormat -> CInt ->
Ptr CChar -> Dimension -> Dimension -> CInt -> CInt -> IO (Ptr Image)
-- | interface to the X11 library function @XPutImage()@.
@@ -48,13 +52,25 @@
foreign import ccall unsafe "HsXlib.h XDestroyImage"
destroyImage :: Image -> IO ()
+-- | interface to the X11 library function @XGetImage()@.
+getImage :: Display -> Drawable -> CInt -> CInt -> CUInt -> CUInt -> CULong -> ImageFormat -> IO Image
+getImage display d x y width height plane_mask format = do
+ image <- throwIfNull "getImage" (xGetImage display d x y width height plane_mask format)
+ return (Image image)
+
+foreign import ccall unsafe "HsXlib.h XGetImage"
+ xGetImage :: Display -> Drawable -> CInt -> CInt -> CUInt -> CUInt -> CULong -> ImageFormat -> IO (Ptr Image)
+
+foreign import ccall unsafe "HsXlib.h XGetPixel"
+ xGetPixel :: Image -> CInt -> CInt -> IO CULong
+
+-- | interface to the X11 library function @XGetPixel()@.
+getPixel :: Image -> CInt -> CInt -> CULong
+getPixel i x y = unsafePerformIO (xGetPixel i x y)
+
{- don't need XInitImage since Haskell users probably won't be setting
members of the XImage structure themselves -}
-- XInitImage omitted
-{- these two functions are for fetching image data from a drawable
-back into an image struct. i'm not exactly sure when they would be
-used -}
--- XGetImage omitted
-- XGetSubImage omitted
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/Xlib/Misc.hsc new/X11-1.8/Graphics/X11/Xlib/Misc.hsc
--- old/X11-1.6.1.2/Graphics/X11/Xlib/Misc.hsc 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/Xlib/Misc.hsc 2017-02-09 23:56:14.000000000 +0100
@@ -189,7 +189,6 @@
import Foreign (Storable, Ptr, alloca, peek, throwIfNull, with, withArrayLen, allocaBytes, pokeByteOff, withArray, FunPtr, nullPtr, Word32, peekArray)
import Foreign.C
-import Data.Default
import System.IO.Unsafe
#if __GLASGOW_HASKELL__
@@ -269,11 +268,11 @@
-- | interface to the X11 library function @XGrabKey()@.
foreign import ccall unsafe "HsXlib.h XGrabKey"
- grabKey :: Display -> KeyCode -> ButtonMask -> Window -> Bool -> GrabMode -> GrabMode -> IO ()
+ grabKey :: Display -> KeyCode -> KeyMask -> Window -> Bool -> GrabMode -> GrabMode -> IO ()
-- | interface to the X11 library function @XUngrabKey()@.
foreign import ccall unsafe "HsXlib.h XUngrabKey"
- ungrabKey :: Display -> KeyCode -> ButtonMask -> Window -> IO ()
+ ungrabKey :: Display -> KeyCode -> KeyMask -> Window -> IO ()
-- | interface to the X11 library function @XGrabKeyboard()@.
foreign import ccall unsafe "HsXlib.h XGrabKeyboard"
@@ -695,20 +694,6 @@
foreign import ccall unsafe "HsXlib.h XVisualIDFromVisual"
visualIDFromVisual :: Visual -> IO VisualID
-instance Default VisualInfo where
- def = VisualInfo {
- visualInfo_visual = Visual nullPtr,
- visualInfo_visualID = 0,
- visualInfo_screen = 0,
- visualInfo_depth = 0,
- visualInfo_class = 0,
- visualInfo_redMask = 0,
- visualInfo_greenMask = 0,
- visualInfo_blueMask = 0,
- visualInfo_colormapSize = 0,
- visualInfo_bitsPerRGB = 0
- }
-
type VisualInfoMask = CLong
#{enum VisualInfoMask,
, visualNoMask = VisualNoMask
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/Xlib/Types.hsc new/X11-1.8/Graphics/X11/Xlib/Types.hsc
--- old/X11-1.6.1.2/Graphics/X11/Xlib/Types.hsc 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/Xlib/Types.hsc 2017-02-09 23:56:14.000000000 +0100
@@ -35,6 +35,8 @@
import Data.Data
#endif
+import Data.Default
+
#include "HsXlib.h"
----------------------------------------------------------------
@@ -108,6 +110,20 @@
deriving (Eq, Show)
#endif
+instance Default VisualInfo where
+ def = VisualInfo {
+ visualInfo_visual = Visual nullPtr,
+ visualInfo_visualID = 0,
+ visualInfo_screen = 0,
+ visualInfo_depth = 0,
+ visualInfo_class = 0,
+ visualInfo_redMask = 0,
+ visualInfo_greenMask = 0,
+ visualInfo_blueMask = 0,
+ visualInfo_colormapSize = 0,
+ visualInfo_bitsPerRGB = 0
+ }
+
instance Storable VisualInfo where
sizeOf _ = #size XVisualInfo
alignment _ = alignment (undefined::CInt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/Xlib/Window.hs new/X11-1.8/Graphics/X11/Xlib/Window.hs
--- old/X11-1.6.1.2/Graphics/X11/Xlib/Window.hs 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/Xlib/Window.hs 2017-02-09 23:56:14.000000000 +0100
@@ -53,7 +53,6 @@
import Foreign
import Foreign.C
-import Foreign.C.Types
----------------------------------------------------------------
-- Windows
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/Graphics/X11/Xrandr.hsc new/X11-1.8/Graphics/X11/Xrandr.hsc
--- old/X11-1.6.1.2/Graphics/X11/Xrandr.hsc 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/Graphics/X11/Xrandr.hsc 2017-02-09 23:56:14.000000000 +0100
@@ -23,6 +23,7 @@
XRRScreenResources(..),
XRROutputInfo(..),
XRRCrtcInfo(..),
+ XRRPropertyInfo(..),
compiledWithXrandr,
Rotation,
Reflection,
@@ -53,7 +54,12 @@
xrrGetScreenResourcesCurrent,
xrrSetOutputPrimary,
xrrGetOutputPrimary,
- xrrListOutputProperties
+ xrrListOutputProperties,
+ xrrQueryOutputProperty,
+ xrrConfigureOutputProperty,
+ xrrChangeOutputProperty,
+ xrrGetOutputProperty,
+ xrrDeleteOutputProperty
) where
import Foreign
@@ -133,6 +139,14 @@
, xrr_ci_possible :: [RROutput]
} deriving (Eq, Show)
+-- | Representation of the XRRPropertyInfo struct
+data XRRPropertyInfo = XRRPropertyInfo
+ { xrr_pi_pending :: !Bool
+ , xrr_pi_range :: !Bool
+ , xrr_pi_immutable :: !Bool
+ , xrr_pi_values :: [CLong]
+ } deriving (Eq, Show)
+
-- We have Xrandr, so the library will actually work
compiledWithXrandr :: Bool
compiledWithXrandr = True
@@ -317,6 +331,27 @@
(#{peek XRRCrtcInfo, possible } p)
+instance Storable XRRPropertyInfo where
+ sizeOf _ = #{size XRRPropertyInfo}
+ -- FIXME: Is this right?
+ alignment _ = alignment (undefined :: CInt)
+
+ poke p xrr_pi = do
+ #{poke XRRPropertyInfo, pending } p $ xrr_pi_pending xrr_pi
+ #{poke XRRPropertyInfo, range } p $ xrr_pi_range xrr_pi
+ #{poke XRRPropertyInfo, immutable } p $ xrr_pi_immutable xrr_pi
+ -- see comment in Storable XRRScreenResources about dynamic resource allocation
+ #{poke XRRPropertyInfo, num_values } p ( 0 :: CInt )
+ #{poke XRRPropertyInfo, values } p ( nullPtr :: Ptr CLong )
+
+ peek p = return XRRPropertyInfo
+ `ap` ( #{peek XRRPropertyInfo, pending } p )
+ `ap` ( #{peek XRRPropertyInfo, range } p )
+ `ap` ( #{peek XRRPropertyInfo, immutable } p )
+ `ap` peekCArrayIO ( #{peek XRRPropertyInfo, num_values} p)
+ ( #{peek XRRPropertyInfo, values} p)
+
+
xrrQueryExtension :: Display -> IO (Maybe (CInt, CInt))
xrrQueryExtension dpy = wrapPtr2 (cXRRQueryExtension dpy) go
where go False _ _ = Nothing
@@ -383,7 +418,6 @@
sizes <- if nsizes == 0
then return Nothing
else peekArray (fromIntegral nsizes) p >>= return . Just
- _ <- xFree p
return sizes
foreign import ccall "XRRConfigSizes"
cXRRConfigSizes :: XRRScreenConfiguration -> Ptr CInt -> IO (Ptr XRRScreenSize)
@@ -398,7 +432,6 @@
rates <- if nrates == 0
then return Nothing
else peekArray (fromIntegral nrates) p >>= return . Just
- _ <- xFree p
return rates
foreign import ccall "XRRConfigRates"
cXRRConfigRates :: XRRScreenConfiguration -> CInt -> Ptr CInt -> IO (Ptr CShort)
@@ -451,7 +484,6 @@
sizes <- if nsizes == 0
then return Nothing
else peekArray (fromIntegral nsizes) p >>= return . Just
- _ <- xFree p
return sizes
foreign import ccall "XRRSizes"
cXRRSizes :: Display -> CInt -> Ptr CInt -> IO (Ptr XRRScreenSize)
@@ -466,7 +498,6 @@
rates <- if nrates == 0
then return Nothing
else peekArray (fromIntegral nrates) p >>= return . Just
- _ <- xFree p
return rates
foreign import ccall "XRRRates"
cXRRRates :: Display -> CInt -> CInt -> Ptr CInt -> IO (Ptr CShort)
@@ -583,6 +614,85 @@
foreign import ccall "XRRListOutputProperties"
cXRRListOutputProperties :: Display -> RROutput -> Ptr CInt -> IO (Ptr Atom)
+xrrQueryOutputProperty :: Display -> RROutput -> Atom -> IO (Maybe XRRPropertyInfo)
+xrrQueryOutputProperty dpy rro prop = do
+ p <- cXRRQueryOutputProperty dpy rro prop
+ if p == nullPtr
+ then return Nothing
+ else do
+ res <- peek p
+ _ <- xFree p
+ return $ Just res
+
+foreign import ccall "XRRQueryOutputProperty"
+ cXRRQueryOutputProperty :: Display -> RROutput -> Atom -> IO (Ptr XRRPropertyInfo)
+
+xrrConfigureOutputProperty :: Display -> RROutput -> Atom -> Bool -> Bool -> [CLong] -> IO ()
+xrrConfigureOutputProperty dpy rro prop pend range xs = withArrayLen xs $
+ cXRRConfigureOutputProperty dpy rro prop pend range . fromIntegral
+
+foreign import ccall "XRRConfigureOutputProperty"
+ cXRRConfigureOutputProperty :: Display -> RROutput -> Atom -> Bool -> Bool -> CInt -> Ptr CLong -> IO ()
+
+xrrChangeOutputProperty :: Display -> RROutput -> Atom -> Atom -> CInt -> CInt -> [Word32] -> IO ()
+xrrChangeOutputProperty dpy rro prop typ format mode xs = withPool $ \pool -> do
+ ptr <- case format of
+ 8 -> pooledNewArray pool (map fromIntegral xs :: [Word8])
+ 16 -> castPtr `fmap` pooledNewArray pool (map fromIntegral xs :: [Word16])
+ 32 -> castPtr `fmap` pooledNewArray pool xs
+ _ -> error "invalid format"
+
+ cXRRChangeOutputProperty dpy rro prop typ format mode ptr (fromIntegral $ length xs)
+
+foreign import ccall "XRRChangeOutputProperty"
+ cXRRChangeOutputProperty :: Display -> RROutput -> Atom -> Atom -> CInt -> CInt -> Ptr Word8 -> CInt -> IO ()
+
+-- | @xrrGetOutputProperty display output property offset length delete pending propertyType@
+-- | returns @Maybe (actualType, format, bytesAfter, data)@.
+xrrGetOutputProperty ::
+ Display -> RROutput -> Atom -> CLong -> CLong -> Bool -> Bool -> Atom ->
+ IO (Maybe (Atom, Int, CULong, [Word32]))
+xrrGetOutputProperty dpy rro prop offset len delete preferPending reqType = withPool $ \pool -> do
+ actualTypep <- pooledMalloc pool
+ actualFormatp <- pooledMalloc pool
+ nItemsp <- pooledMalloc pool
+ bytesAfterp <- pooledMalloc pool
+ datapp <- pooledMalloc pool
+ status <- cXRRGetOutputProperty dpy rro prop offset len
+ delete preferPending reqType
+ actualTypep actualFormatp nItemsp bytesAfterp datapp
+
+ if status /= 0
+ then return Nothing
+ else do
+ format <- fmap fromIntegral (peek actualFormatp)
+ nitems <- fmap fromIntegral (peek nItemsp)
+ ptr <- peek datapp
+
+ dat <- case format of
+ 0 -> return []
+ 8 -> fmap (map fromIntegral) $ peekArray nitems ptr
+ 16 -> fmap (map fromIntegral) $ peekArray nitems (castPtr ptr :: Ptr Word16)
+ 32 -> peekArray nitems (castPtr ptr :: Ptr Word32)
+ _ -> error $ "impossible happened: prop format is not in 0,8,16,32 (" ++ show format ++ ")"
+
+ _ <- if format /= 0
+ then xFree ptr
+ else return 0
+
+ typ <- peek actualTypep
+ bytesAfter <- peek bytesAfterp
+ return $ Just (typ, format, bytesAfter, dat)
+
+foreign import ccall "XRRGetOutputProperty"
+ cXRRGetOutputProperty :: Display -> RROutput -> Atom -> CLong -> CLong -> Bool -> Bool
+ -> Atom -> Ptr Atom -> Ptr CInt -> Ptr CULong -> Ptr CULong -> Ptr (Ptr Word8) -> IO CInt
+
+xrrDeleteOutputProperty :: Display -> RROutput -> Atom -> IO ()
+xrrDeleteOutputProperty = cXRRDeleteOutputProperty
+foreign import ccall "XRRDeleteOutputProperty"
+ cXRRDeleteOutputProperty :: Display -> RROutput -> Atom -> IO ()
+
wrapPtr2 :: (Storable a, Storable b) => (Ptr a -> Ptr b -> IO c) -> (c -> a -> b -> d) -> IO d
wrapPtr2 cfun f =
withPool $ \pool -> do aptr <- pooledMalloc pool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/X11.cabal new/X11-1.8/X11.cabal
--- old/X11-1.6.1.2/X11.cabal 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/X11.cabal 2017-02-09 23:56:14.000000000 +0100
@@ -1,10 +1,11 @@
name: X11
-version: 1.6.1.2
+version: 1.8
license: BSD3
license-file: LICENSE
copyright: Alastair Reid, 1999-2003, libraries@haskell.org 2003-2007, Don Stewart 2007-2009, Spencer Janssen 2007-2009, Daniel Wagner 2009-2011.
maintainer: Daniel Wagner
-homepage: https://github.com/haskell-pkg-janitors/X11
+homepage: https://github.com/xmonad/X11
+bug-reports: https://github.com/xmonad/X11/issues
category: Graphics
synopsis: A binding to the X11 graphics library
description: A Haskell binding to the X11 graphics library.
@@ -20,8 +21,13 @@
config.log config.status autom4te.cache
config.mk X11.buildinfo include/HsX11Config.h
include/X11_extras_config.h
-Cabal-Version: >= 1.2
+Cabal-Version: >= 1.6
build-type: Configure
+tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1
+
+source-repository head
+ type: git
+ location: https://github.com/xmonad/X11
library
exposed-modules:
@@ -63,6 +69,7 @@
include-dirs: include
includes: HsXlib.h, HsAllKeysyms.h
install-includes: HsXlib.h, XlibExtras.h, HsAllKeysyms.h
- build-depends: base >= 3 && < 5, data-default
+ build-depends: base >= 4 && < 5, data-default
ghc-options: -funbox-strict-fields -Wall -fno-warn-unused-binds
- ghc-prof-options: -prof -auto-all
+ if impl(ghc >= 7.10)
+ ghc-options: -fno-warn-tabs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/X11-1.6.1.2/configure new/X11-1.8/configure
--- old/X11-1.6.1.2/configure 2014-05-10 01:16:23.000000000 +0200
+++ new/X11-1.8/configure 2017-02-09 23:56:14.000000000 +0100
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for Haskell X11 package 1.4.6.
+# Generated by GNU Autoconf 2.69 for Haskell X11 package 1.4.6.
#
# Report bugs to .
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,7 +192,8 @@
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -214,21 +238,25 @@
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -331,6 +359,14 @@
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -452,6 +488,10 @@
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -486,16 +526,16 @@
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -507,28 +547,8 @@
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -1134,8 +1154,6 @@
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1383,9 +1401,9 @@
if $ac_init_version; then
cat <<\_ACEOF
Haskell X11 package configure 1.4.6
-generated by GNU Autoconf 2.68
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1498,7 +1516,7 @@
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1752,7 +1770,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by Haskell X11 package $as_me 1.4.6, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2142,7 +2160,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2182,7 +2200,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2235,7 +2253,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2276,7 +2294,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2334,7 +2352,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2378,7 +2396,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2824,8 +2842,7 @@
/* end confdefs.h. */
#include
#include
-#include
-#include
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3818,7 +3835,7 @@
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -3884,7 +3901,7 @@
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4689,16 +4706,16 @@
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -4758,28 +4775,16 @@
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4801,7 +4806,7 @@
# values after options handling.
ac_log="
This file was extended by Haskell X11 package $as_me 1.4.6, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -4863,10 +4868,10 @@
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
Haskell X11 package config.status 1.4.6
-configured by $0, generated by GNU Autoconf 2.68,
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -4954,7 +4959,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'