summaryrefslogtreecommitdiffstats
path: root/source/x
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/x
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz
current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.xz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to '')
-rw-r--r--pasture/source/xfce4-mixer/doinst.sh (renamed from source/xfce/xfce4-mixer/doinst.sh)0
-rw-r--r--pasture/source/xfce4-mixer/slack-desc (renamed from source/xfce/xfce4-mixer/slack-desc)0
-rwxr-xr-xpasture/source/xfce4-mixer/xfce4-mixer.SlackBuild (renamed from source/xfce/xfce4-mixer/xfce4-mixer.SlackBuild)17
-rw-r--r--pasture/source/xfce4-volumed/slack-desc (renamed from source/xfce/xfce4-volumed/slack-desc)0
-rwxr-xr-xpasture/source/xfce4-volumed/xfce4-volumed.SlackBuild (renamed from source/xfce/xfce4-volumed/xfce4-volumed.SlackBuild)11
-rw-r--r--source/kde/build/analitza (renamed from source/x/x11/build/gccmakedep)0
-rw-r--r--source/kde/build/artikulate (renamed from source/x/x11/build/xcompmgr)0
-rw-r--r--source/kde/build/audiocd-kio (renamed from source/x/x11/build/xf86-video-ati)0
-rw-r--r--source/kde/build/baloo (renamed from source/x/x11/build/xf86-video-modesetting)0
-rw-r--r--source/kde/build/baloo-widgets (renamed from source/x/x11/build/xf86-video-nouveau)0
-rw-r--r--source/kde/build/blinken (renamed from source/x/x11/build/xf86-video-openchrome)0
-rw-r--r--source/kde/build/qtruby (renamed from source/x/x11/build/xf86-input-wacom)0
-rw-r--r--source/kde/build/step (renamed from source/x/x11/build/xf86-video-rendition)0
-rw-r--r--source/kde/slack-desc/kdev-python (renamed from source/xfce/libxfcegui4/slack-desc)22
-rwxr-xr-xsource/l/libjpeg-turbo/libjpeg-turbo.SlackBuild (renamed from source/xfce/xfwm4-themes/xfwm4-themes.SlackBuild)68
-rwxr-xr-xsource/l/libnih/libnih.SlackBuild (renamed from source/xfce/libxfcegui4/libxfcegui4.SlackBuild)60
-rwxr-xr-xsource/l/libusbmuxd/libusbmuxd.SlackBuild (renamed from source/xap/xchat/xchat.SlackBuild)65
-rwxr-xr-xsource/x/fontconfig/fontconfig.SlackBuild2
-rwxr-xr-xsource/x/freeglut/freeglut.SlackBuild2
-rwxr-xr-xsource/x/glew/glew.SlackBuild13
-rw-r--r--source/x/glew/glew.url2
-rwxr-xr-xsource/x/libXaw3dXft/libXaw3dXft.SlackBuild99
-rw-r--r--source/x/libXaw3dXft/slack-desc19
-rwxr-xr-xsource/x/libdrm/libdrm.SlackBuild9
-rwxr-xr-xsource/x/libepoxy/libepoxy.SlackBuild108
-rw-r--r--source/x/libepoxy/libepoxy.url1
-rw-r--r--source/x/libepoxy/slack-desc19
-rwxr-xr-xsource/x/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild2
-rwxr-xr-xsource/x/libevdev/libevdev.SlackBuild96
-rw-r--r--source/x/libevdev/slack-desc19
-rwxr-xr-xsource/x/libva-intel-driver/libva-intel-driver.SlackBuild (renamed from source/l/qca-ossl/qca-ossl.SlackBuild)81
-rw-r--r--source/x/libva-intel-driver/libva-intel-driver.url1
-rw-r--r--source/x/libva-intel-driver/slack-desc19
-rwxr-xr-xsource/x/libva/libva.SlackBuild103
-rw-r--r--source/x/libva/libva.url1
-rw-r--r--source/x/libva/slack-desc19
-rw-r--r--source/x/libvdpau/doinst.sh17
-rwxr-xr-xsource/x/libvdpau/libvdpau.SlackBuild108
-rwxr-xr-xsource/x/libvdpau/profile.d/vdpau.csh22
-rwxr-xr-xsource/x/libvdpau/profile.d/vdpau.sh22
-rw-r--r--source/x/libvdpau/slack-desc19
-rwxr-xr-xsource/x/mesa/get-mesa.sh10
-rwxr-xr-xsource/x/mesa/mesa.SlackBuild82
-rw-r--r--source/x/mesa/mesa.no.mako.diff34
-rw-r--r--source/x/motif/motif-2.3.4-bindings.patch36
-rw-r--r--source/x/motif/motif-2.3.4-mwmrc_dir.patch93
-rw-r--r--source/x/motif/motif-2.3.4-no_demos.patch13
-rwxr-xr-xsource/x/motif/motif.SlackBuild180
-rw-r--r--source/x/motif/motif.rgbtxt.patch22
-rw-r--r--source/x/motif/slack-desc (renamed from source/xap/xchat/slack-desc)22
-rwxr-xr-xsource/x/mtdev/mtdev.SlackBuild2
-rwxr-xr-xsource/x/scim-anthy/scim-anthy.SlackBuild14
-rw-r--r--source/x/scim-hangul/scim-hangul-0.3.2+gcc-4.3.patch23
-rw-r--r--source/x/scim-hangul/scim-hangul-0.3.2+gcc-4.7.patch12
-rw-r--r--source/x/scim-hangul/scim-hangul-0.4.0+gtk.patch11
-rwxr-xr-xsource/x/scim-hangul/scim-hangul.SlackBuild19
-rw-r--r--source/x/scim-hangul/scim-hangul.gcc43.diff22
-rw-r--r--source/x/scim-hangul/scim-hangul.gcc47.diff11
-rwxr-xr-xsource/x/scim-input-pad/scim-input-pad.SlackBuild10
-rwxr-xr-xsource/x/scim-m17n/scim-m17n.SlackBuild8
-rwxr-xr-xsource/x/scim-pinyin/scim-pinyin.SlackBuild33
-rw-r--r--source/x/scim-pinyin/scim-pinyin.gcc43.diff44
-rwxr-xr-xsource/x/scim-tables/scim-tables.SlackBuild17
-rw-r--r--source/x/scim/scim-disable-subdir-objects.patch22
-rwxr-xr-xsource/x/scim/scim.SlackBuild19
-rw-r--r--source/x/x11/arch.use.flags2
-rw-r--r--source/x/x11/build/appres1
-rw-r--r--source/x/x11/build/bdftopcf1
-rw-r--r--source/x/x11/build/beforelight1
-rw-r--r--source/x/x11/build/bitmap1
-rw-r--r--source/x/x11/build/compiz1
-rw-r--r--source/x/x11/build/dri2proto1
-rw-r--r--source/x/x11/build/dri3proto1
-rw-r--r--source/x/x11/build/editres1
-rw-r--r--source/x/x11/build/fixesproto1
-rw-r--r--source/x/x11/build/font-util1
-rw-r--r--source/x/x11/build/fonttosfnt1
-rw-r--r--source/x/x11/build/fslsfonts1
-rw-r--r--source/x/x11/build/fstobdf1
-rw-r--r--source/x/x11/build/iceauth1
-rw-r--r--source/x/x11/build/ico1
-rw-r--r--source/x/x11/build/imake1
-rwxr-xr-xsource/x/x11/build/increment-all-drivers.sh13
-rw-r--r--source/x/x11/build/intel-gpu-tools1
-rw-r--r--source/x/x11/build/libICE1
-rw-r--r--source/x/x11/build/libSM1
-rw-r--r--source/x/x11/build/libX111
-rw-r--r--source/x/x11/build/libXScrnSaver1
-rw-r--r--source/x/x11/build/libXau1
-rw-r--r--source/x/x11/build/libXaw3d2
-rw-r--r--source/x/x11/build/libXcm1
-rw-r--r--source/x/x11/build/libXcomposite1
-rw-r--r--source/x/x11/build/libXcursor1
-rw-r--r--source/x/x11/build/libXdamage1
-rw-r--r--source/x/x11/build/libXdmcp1
-rw-r--r--source/x/x11/build/libXevie1
-rw-r--r--source/x/x11/build/libXext1
-rw-r--r--source/x/x11/build/libXfont1
-rw-r--r--source/x/x11/build/libXfontcache1
-rw-r--r--source/x/x11/build/libXft1
-rw-r--r--source/x/x11/build/libXinerama1
-rw-r--r--source/x/x11/build/libXmu1
-rw-r--r--source/x/x11/build/libXp1
-rw-r--r--source/x/x11/build/libXpm1
-rw-r--r--source/x/x11/build/libXres1
-rw-r--r--source/x/x11/build/libXtst1
-rw-r--r--source/x/x11/build/libXv1
-rw-r--r--source/x/x11/build/libXvMC1
-rw-r--r--source/x/x11/build/libXxf86dga1
-rw-r--r--source/x/x11/build/libXxf86misc1
-rw-r--r--source/x/x11/build/libXxf86vm1
-rw-r--r--source/x/x11/build/libdmx1
-rw-r--r--source/x/x11/build/libxshmfence1
-rw-r--r--source/x/x11/build/listres1
-rw-r--r--source/x/x11/build/lndir1
-rw-r--r--source/x/x11/build/luit1
-rw-r--r--source/x/x11/build/makedepend1
-rw-r--r--source/x/x11/build/mkcomposecache1
-rw-r--r--source/x/x11/build/mkfontscale1
-rw-r--r--source/x/x11/build/oclock1
-rw-r--r--source/x/x11/build/presentproto1
-rw-r--r--source/x/x11/build/rgb1
-rw-r--r--source/x/x11/build/sessreg1
-rw-r--r--source/x/x11/build/showfont1
-rw-r--r--source/x/x11/build/transset1
-rw-r--r--source/x/x11/build/viewres1
-rw-r--r--source/x/x11/build/xauth1
-rw-r--r--source/x/x11/build/xbacklight1
-rw-r--r--source/x/x11/build/xbiff1
-rw-r--r--source/x/x11/build/xbitmaps1
-rw-r--r--source/x/x11/build/xcalc1
-rw-r--r--source/x/x11/build/xcb-proto1
-rw-r--r--source/x/x11/build/xcb-util1
-rw-r--r--source/x/x11/build/xcb-util-cursor1
-rw-r--r--source/x/x11/build/xcb-util-keysyms1
-rw-r--r--source/x/x11/build/xcb-util-renderutil1
-rw-r--r--source/x/x11/build/xcb-util-wm1
-rw-r--r--source/x/x11/build/xclipboard1
-rw-r--r--source/x/x11/build/xclock1
-rw-r--r--source/x/x11/build/xcm1
-rw-r--r--source/x/x11/build/xconsole1
-rw-r--r--source/x/x11/build/xcursorgen1
-rw-r--r--source/x/x11/build/xdbedizzy1
-rw-r--r--source/x/x11/build/xdm2
-rw-r--r--source/x/x11/build/xedit1
-rw-r--r--source/x/x11/build/xextproto1
-rw-r--r--source/x/x11/build/xeyes1
-rw-r--r--source/x/x11/build/xf86-input-acecad2
-rw-r--r--source/x/x11/build/xf86-input-aiptek2
-rw-r--r--source/x/x11/build/xf86-input-joystick2
-rw-r--r--source/x/x11/build/xf86-input-keyboard2
-rw-r--r--source/x/x11/build/xf86-input-mouse2
-rw-r--r--source/x/x11/build/xf86-input-penmount2
-rw-r--r--source/x/x11/build/xf86-input-void2
-rw-r--r--source/x/x11/build/xf86-video-apm2
-rw-r--r--source/x/x11/build/xf86-video-ark2
-rw-r--r--source/x/x11/build/xf86-video-chips2
-rw-r--r--source/x/x11/build/xf86-video-cirrus2
-rw-r--r--source/x/x11/build/xf86-video-dummy1
-rw-r--r--source/x/x11/build/xf86-video-glint2
-rw-r--r--source/x/x11/build/xf86-video-i1282
-rw-r--r--source/x/x11/build/xf86-video-i7402
-rw-r--r--source/x/x11/build/xf86-video-mach642
-rw-r--r--source/x/x11/build/xf86-video-mga2
-rw-r--r--source/x/x11/build/xf86-video-nv2
-rw-r--r--source/x/x11/build/xf86-video-omap2
-rw-r--r--source/x/x11/build/xf86-video-s32
-rw-r--r--source/x/x11/build/xf86-video-s3virge2
-rw-r--r--source/x/x11/build/xf86-video-savage1
-rw-r--r--source/x/x11/build/xf86-video-siliconmotion2
-rw-r--r--source/x/x11/build/xf86-video-sis2
-rw-r--r--source/x/x11/build/xf86-video-sisusb2
-rw-r--r--source/x/x11/build/xf86-video-tdfx2
-rw-r--r--source/x/x11/build/xf86-video-tga2
-rw-r--r--source/x/x11/build/xf86-video-trident2
-rw-r--r--source/x/x11/build/xf86-video-tseng2
-rw-r--r--source/x/x11/build/xf86-video-v4l2
-rw-r--r--source/x/x11/build/xf86-video-vesa1
-rw-r--r--source/x/x11/build/xf86-video-vmware2
-rw-r--r--source/x/x11/build/xf86-video-voodoo2
-rw-r--r--source/x/x11/build/xf86-video-xgi2
-rw-r--r--source/x/x11/build/xf86-video-xgixp2
-rw-r--r--source/x/x11/build/xf86dga1
-rw-r--r--source/x/x11/build/xfd1
-rw-r--r--source/x/x11/build/xfontsel1
-rw-r--r--source/x/x11/build/xfs1
-rw-r--r--source/x/x11/build/xfsinfo1
-rw-r--r--source/x/x11/build/xinit1
-rw-r--r--source/x/x11/build/xkbcomp1
-rw-r--r--source/x/x11/build/xkbutils1
-rw-r--r--source/x/x11/build/xkill1
-rw-r--r--source/x/x11/build/xload1
-rw-r--r--source/x/x11/build/xlogo1
-rw-r--r--source/x/x11/build/xlsclients1
-rw-r--r--source/x/x11/build/xman1
-rw-r--r--source/x/x11/build/xmessage1
-rw-r--r--source/x/x11/build/xmore1
-rw-r--r--source/x/x11/build/xorg-cf-files1
-rw-r--r--source/x/x11/build/xorg-sgml-doctools1
-rw-r--r--source/x/x11/build/xpr1
-rw-r--r--source/x/x11/build/xprop1
-rw-r--r--source/x/x11/build/xpyb2
-rw-r--r--source/x/x11/build/xrdb1
-rw-r--r--source/x/x11/build/xrefresh1
-rw-r--r--source/x/x11/build/xscope1
-rw-r--r--source/x/x11/build/xset1
-rw-r--r--source/x/x11/build/xsetroot1
-rw-r--r--source/x/x11/build/xsm1
-rw-r--r--source/x/x11/build/xstdcmap1
-rw-r--r--source/x/x11/build/xvidtune1
-rw-r--r--source/x/x11/build/xwd1
-rw-r--r--source/x/x11/build/xwininfo1
-rw-r--r--source/x/x11/build/xwud1
-rw-r--r--source/x/x11/configure/autogen13
-rw-r--r--source/x/x11/configure/configure1
-rw-r--r--source/x/x11/configure/intel-gpu-tools (renamed from source/x/x11/configure/xf86-input-vmmouse)5
-rw-r--r--source/x/x11/configure/libxcb14
-rw-r--r--source/x/x11/configure/libxshmfence15
-rw-r--r--source/x/x11/configure/xf86-video-intel14
-rw-r--r--source/x/x11/configure/xf86-video-nouveau12
-rw-r--r--source/x/x11/configure/xorg-server15
-rw-r--r--source/x/x11/makepkg/xorg-server5
-rw-r--r--source/x/x11/modularize7
-rw-r--r--source/x/x11/noarch1
-rw-r--r--source/x/x11/package-blacklist1
-rw-r--r--source/x/x11/patch/luit.patch3
-rw-r--r--source/x/x11/patch/luit/luit_use_system_extensions.diff38
-rw-r--r--source/x/x11/patch/xdm.patch9
-rw-r--r--source/x/x11/patch/xdm/xdm-1.1.11-arc4random-include.patch18
-rw-r--r--source/x/x11/patch/xdm/xdm-1.1.11-setproctitle-include.patch37
-rw-r--r--source/x/x11/patch/xdm/xdm-consolekit.patch230
-rw-r--r--source/x/x11/patch/xf86-video-chips.patch25
-rw-r--r--source/x/x11/patch/xf86-video-chips/iopl.h60
-rw-r--r--source/x/x11/patch/xf86-video-geode.patch7
-rw-r--r--source/x/x11/patch/xf86-video-i740.patch7
-rw-r--r--source/x/x11/patch/xf86-video-intel.patch3
-rw-r--r--source/x/x11/patch/xf86-video-intel/0001-sna-Let-modestting-glamor-handle-gen9.patch41
-rw-r--r--source/x/x11/patch/xf86-video-neomagic.patch7
-rw-r--r--source/x/x11/patch/xf86-video-r128.patch7
-rw-r--r--source/x/x11/patch/xf86-video-rendition.patch7
-rw-r--r--source/x/x11/patch/xf86-video-s3virge.patch7
-rw-r--r--source/x/x11/patch/xf86-video-savage.patch7
-rw-r--r--source/x/x11/patch/xf86-video-siliconmotion.patch7
-rw-r--r--source/x/x11/patch/xf86-video-sis.patch2
-rw-r--r--source/x/x11/patch/xf86-video-sis/sis-0.10.7-git.patch121
-rw-r--r--source/x/x11/patch/xf86-video-tdfx.patch7
-rw-r--r--source/x/x11/patch/xf86-video-trident.patch7
-rw-r--r--source/x/x11/patch/xf86-video-v4l.patch4
-rw-r--r--source/x/x11/patch/xf86-video-v4l/xf86-video-v4l-0.2.0-build-fix.patch14
-rw-r--r--source/x/x11/patch/xf86-video-v4l/xorg-x11-drv-v4l-support_v4l2_only_drivers.patch4068
-rw-r--r--source/x/x11/patch/xf86-video-vesa.patch7
-rw-r--r--source/x/x11/patch/xf86-video-voodoo.patch3
-rw-r--r--source/x/x11/patch/xf86-video-voodoo/0001-don-t-use-PCITAG-in-struct-anymore.patch26
-rw-r--r--source/x/x11/patch/xf86-video-xgixp.patch18
-rw-r--r--source/x/x11/patch/xf86-video-xgixp/0001-Remove-mibstore.h.patch37
-rw-r--r--source/x/x11/patch/xf86-video-xgixp/0002-Remove-symbol-lists-as-they-are-not-used-any-more.patch176
-rw-r--r--source/x/x11/patch/xf86-video-xgixp/0003-shadow-shadowInit-shadowAdd-Remove.patch79
-rw-r--r--source/x/x11/patch/xf86-video-xgixp/0004-Stop-using-deprecated-xf86PciInfo.h.patch27
-rw-r--r--source/x/x11/patch/xf86-video-xgixp/0005-Update-for-new-damage-API.patch26
-rw-r--r--source/x/x11/patch/xinit.patch2
-rw-r--r--source/x/x11/patch/xinit/xinit.remove.systemd.kludge.diff19
-rw-r--r--source/x/x11/patch/xorg-server.patch2
-rw-r--r--source/x/x11/patch/xorg-server/xorg-server.CVE-2013-4396.diff73
-rw-r--r--source/x/x11/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch49
-rw-r--r--source/x/x11/post-install/xf86-input-libinput.post-install4
-rw-r--r--source/x/x11/post-install/xf86-input-wacom.post-install5
-rw-r--r--source/x/x11/post-install/xf86-input-wacom/60-wacom.rules19
-rw-r--r--source/x/x11/post-install/xf86-video-intel.post-install2
-rw-r--r--source/x/x11/slack-desc/dri3proto19
-rw-r--r--source/x/x11/slack-desc/glamor-egl19
-rw-r--r--source/x/x11/slack-desc/libXpresent (renamed from source/l/phonon-xine/slack-desc)22
-rw-r--r--source/x/x11/slack-desc/libxshmfence (renamed from source/xfce/xfwm4-themes/slack-desc)22
-rw-r--r--source/x/x11/slack-desc/presentproto19
-rw-r--r--source/x/x11/slack-desc/xcb-util-errors19
-rw-r--r--source/x/x11/slack-desc/xf86-input-libinput19
-rw-r--r--source/x/x11/slack-desc/xf86-video-amdgpu19
-rwxr-xr-xsource/x/x11/src/get-xf86-video-intel.sh47
-rwxr-xr-xsource/x/x11/src/get-xf86-video-nouveau.sh51
-rwxr-xr-xsource/x/x11/src/get-xf86-video-openchrome.sh47
-rw-r--r--source/x/x11/src/xf86-input-wacom.url1
-rwxr-xr-xsource/x/x11/x11.SlackBuild13
-rwxr-xr-xsource/x/xdg-user-dirs/xdg-user-dirs.SlackBuild10
-rwxr-xr-xsource/x/xdg-utils/xdg-utils-cvs_checkout.sh17
-rwxr-xr-xsource/x/xdg-utils/xdg-utils.SlackBuild9
-rw-r--r--source/x/xdg-utils/xdg-utils.info2
-rw-r--r--source/x/xdg-utils/xdg-utils.mate.diff43
-rw-r--r--source/x/xdg-utils/xdg-utils.url2
-rwxr-xr-xsource/x/xterm/xterm.SlackBuild6
-rwxr-xr-xsource/xap/MPlayer/MPlayer.SlackBuild139
-rw-r--r--source/xap/MPlayer/MPlayer.demux_lavf.flac.diff10
-rw-r--r--source/xap/MPlayer/include-samba-4.0.patch12
-rw-r--r--source/xap/MPlayer/slack-desc4
-rw-r--r--source/xap/MPlayer/subreader-fix-srt-parsing.patch60
-rwxr-xr-xsource/xap/audacious-plugins/audacious-plugins.SlackBuild9
-rw-r--r--source/xap/audacious-plugins/slack-desc2
-rwxr-xr-xsource/xap/audacious/audacious.SlackBuild6
-rw-r--r--source/xap/audacious/slack-desc2
-rw-r--r--source/xap/blueman/0001-Notification-Also-check-if-notification-daemon-suppo.patch44
-rw-r--r--source/xap/blueman/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch27
-rw-r--r--source/xap/blueman/blueman-open114
-rw-r--r--source/xap/blueman/blueman-use_blueman-open_for_obexfs.diff12
-rwxr-xr-xsource/xap/blueman/blueman.SlackBuild75
-rw-r--r--source/xap/blueman/doinst.sh6
-rw-r--r--source/xap/blueman/slack-desc2
-rwxr-xr-xsource/xap/ddd/ddd.SlackBuild9
-rw-r--r--source/xap/ddd/machine_code_window_fix.diff13
-rwxr-xr-xsource/xap/electricsheep/electricsheep.SlackBuild7
-rw-r--r--source/xap/electricsheep/flam3-3.0.1-libpng15.patch74
-rwxr-xr-xsource/xap/fluxbox/fluxbox.SlackBuild4
-rwxr-xr-xsource/xap/fvwm/fvwm.SlackBuild15
-rw-r--r--source/xap/fvwm/slack-desc2
-rwxr-xr-xsource/xap/geeqie/geeqie.SlackBuild28
-rw-r--r--source/xap/geeqie/slack-desc2
-rwxr-xr-xsource/xap/gftp/gftp.SlackBuild4
-rwxr-xr-xsource/xap/gimp/gimp.SlackBuild9
-rwxr-xr-xsource/xap/gkrellm/gkrellm.SlackBuild12
-rw-r--r--source/xap/gnuchess/eboard.png16.diff16
-rwxr-xr-xsource/xap/gnuchess/gnuchess.SlackBuild18
-rw-r--r--source/xap/gnuchess/xboard.conf.diff (renamed from source/xap/gnuchess/xboard.conf.in.diff)8
-rwxr-xr-xsource/xap/gnuplot/gnuplot.SlackBuild17
-rw-r--r--source/xap/gparted/com.slackware.pkexec.gparted.policy20
-rw-r--r--source/xap/gparted/doinst.sh4
-rwxr-xr-xsource/xap/gparted/gparted.SlackBuild132
-rw-r--r--source/xap/gparted/gparted_polkit6
-rw-r--r--source/xap/gparted/slack-desc19
-rwxr-xr-xsource/xap/gucharmap/gucharmap.SlackBuild8
-rw-r--r--source/xap/gv/gv-xft.patch404
-rwxr-xr-xsource/xap/gv/gv.SlackBuild6
-rw-r--r--source/xap/hexchat/doinst.sh9
-rwxr-xr-xsource/xap/hexchat/hexchat.SlackBuild106
-rw-r--r--source/xap/hexchat/slack-desc19
-rw-r--r--source/xap/imagemagick/doinst.sh (renamed from source/ap/foomatic-filters/doinst.sh)6
-rwxr-xr-xsource/xap/imagemagick/imagemagick.SlackBuild52
-rw-r--r--source/xap/imagemagick/policy.xml.diff33
-rwxr-xr-xsource/xap/mozilla-firefox/gold/gold2
l---------source/xap/mozilla-firefox/gold/ld1
-rwxr-xr-xsource/xap/mozilla-firefox/mozilla-firefox.SlackBuild119
-rwxr-xr-xsource/xap/mozilla-thunderbird/gold/gold2
l---------source/xap/mozilla-thunderbird/gold/ld1
-rwxr-xr-xsource/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild222
-rwxr-xr-xsource/xap/network-manager-applet/network-manager-applet.SlackBuild13
-rwxr-xr-xsource/xap/pan/pan.SlackBuild8
-rw-r--r--source/xap/pavucontrol/doinst.sh3
-rwxr-xr-xsource/xap/pavucontrol/pavucontrol.SlackBuild97
-rw-r--r--source/xap/pavucontrol/replace-gtk-stock-lock-icon.diff21
-rw-r--r--source/xap/pavucontrol/slack-desc19
-rw-r--r--source/xap/pidgin/doinst.sh10
-rw-r--r--source/xap/pidgin/link-libirc-to-libsasl2.patch65
-rwxr-xr-xsource/xap/pidgin/pidgin.SlackBuild21
-rw-r--r--source/xap/rdesktop/rdesktop-1.8.0-fix-missing-ui.diff77
-rwxr-xr-xsource/xap/rdesktop/rdesktop.SlackBuild6
-rwxr-xr-xsource/xap/rxvt/rxvt.SlackBuild2
-rwxr-xr-xsource/xap/sane/sane.SlackBuild12
-rwxr-xr-xsource/xap/seamonkey/gold/gold2
l---------source/xap/seamonkey/gold/ld1
-rwxr-xr-xsource/xap/seamonkey/seamonkey.SlackBuild102
-rwxr-xr-xsource/xap/seyon/seyon.SlackBuild2
-rwxr-xr-xsource/xap/windowmaker/windowmaker.SlackBuild50
-rw-r--r--source/xap/windowmaker/wmmenugen.c.diff12
-rwxr-xr-xsource/xap/x3270/x3270.SlackBuild2
-rwxr-xr-xsource/xap/xaos/xaos.SlackBuild5
-rw-r--r--source/xap/xaos/xaos.x86.registers.diff22
-rw-r--r--source/xap/xchat/xchat.glib.g.diff47
-rwxr-xr-xsource/xap/xfractint/xfractint.SlackBuild4
-rwxr-xr-xsource/xap/xine-lib/xine-lib.SlackBuild95
-rw-r--r--source/xap/xine-lib/xine-lib.XvMClib.h.diff22
-rw-r--r--source/xap/xine-ui/xine-ui-0.99.7-upstream_fix-1.patch27
-rwxr-xr-xsource/xap/xine-ui/xine-ui.SlackBuild5
-rw-r--r--source/xap/xine-ui/xine.desktop14
-rwxr-xr-xsource/xap/xlockmore/xlockmore.SlackBuild10
-rwxr-xr-xsource/xap/xpaint/xpaint.SlackBuild34
-rw-r--r--source/xap/xpdf/patches/xpdf-3.03-CVE-2012-2142.diff55
-rw-r--r--source/xap/xpdf/patches/xpdf.XPDFViewer.diff11
-rwxr-xr-xsource/xap/xpdf/xpdf.SlackBuild14
-rw-r--r--source/xap/xsane/xsane-0.995-close-fds.patch101
-rw-r--r--source/xap/xsane/xsane-0.995-xdg-open.patch32
-rw-r--r--source/xap/xsane/xsane-0.996-no-eula.patch94
-rw-r--r--source/xap/xsane/xsane-0.997-ipv6.patch148
-rw-r--r--source/xap/xsane/xsane-0.997-off-root-build.patch127
-rw-r--r--source/xap/xsane/xsane-0.998-desktop-file.patch53
-rw-r--r--source/xap/xsane/xsane-0.998-libpng.patch41
-rw-r--r--source/xap/xsane/xsane-0.998-preview-selection.patch60
-rw-r--r--source/xap/xsane/xsane-0.998-wmclass.patch33
-rw-r--r--source/xap/xsane/xsane-0.999-7-autoconf.patch738
-rw-r--r--source/xap/xsane/xsane-0.999-coverity.patch2679
-rw-r--r--source/xap/xsane/xsane-0.999-lcms2.patch372
-rw-r--r--source/xap/xsane/xsane-0.999-man-page.patch109
-rw-r--r--source/xap/xsane/xsane-0.999-no-file-selected.patch91
-rw-r--r--source/xap/xsane/xsane-0.999-pdf-no-high-bpp.patch51
-rw-r--r--source/xap/xsane/xsane-0.999-signal-handling.patch242
-rw-r--r--source/xap/xsane/xsane-0.999-snprintf-update.patch1390
-rwxr-xr-xsource/xap/xsane/xsane.SlackBuild27
-rwxr-xr-xsource/xap/xscreensaver/dump.android.osx.sources.sh (renamed from source/xap/xscreensaver/dump.osx.sources.sh)1
-rwxr-xr-xsource/xap/xscreensaver/xscreensaver.SlackBuild41
-rw-r--r--source/xap/xscreensaver/xscreensaver.no.expiration.date.diff29
-rw-r--r--source/xap/xv/xv-libpng-1.5.patch543
-rwxr-xr-xsource/xap/xv/xv.SlackBuild7
-rw-r--r--source/xfce/Thunar/0001-Deactivate-SEND_MOVED-code-paths.patch48
-rwxr-xr-xsource/xfce/Thunar/Thunar.SlackBuild10
-rwxr-xr-xsource/xfce/exo/exo.SlackBuild12
-rw-r--r--source/xfce/exo/exo.magnet.uri.diff49
-rw-r--r--source/xfce/exo/exo.url1
-rwxr-xr-xsource/xfce/garcon/garcon.SlackBuild12
-rwxr-xr-xsource/xfce/gtk-xfce-engine/gtk-xfce-engine.SlackBuild8
-rwxr-xr-xsource/xfce/libxfce4ui/libxfce4ui.SlackBuild10
-rw-r--r--source/xfce/libxfce4ui/vendorinfo7
-rwxr-xr-xsource/xfce/libxfce4util/libxfce4util.SlackBuild8
-rwxr-xr-xsource/xfce/orage/orage.SlackBuild10
-rw-r--r--source/xfce/thunar-volman/0001-Fix-return-with-no-value-in-function-returning-non-v.patch26
-rwxr-xr-xsource/xfce/thunar-volman/thunar-volman.SlackBuild12
-rw-r--r--source/xfce/tumbler/set-gststate-on-error.diff23
-rwxr-xr-xsource/xfce/tumbler/tumbler.SlackBuild12
-rwxr-xr-xsource/xfce/xfce-build-all.sh7
-rwxr-xr-xsource/xfce/xfce4-appfinder/xfce4-appfinder.SlackBuild8
-rwxr-xr-xsource/xfce/xfce4-clipman-plugin/xfce4-clipman-plugin.SlackBuild8
-rwxr-xr-xsource/xfce/xfce4-dev-tools/xfce4-dev-tools.SlackBuild8
-rw-r--r--source/xfce/xfce4-notifyd/0001-Set-notifications-as-override-redirect-windows-bug-1.patch25
-rw-r--r--source/xfce/xfce4-notifyd/0002-Use-accessor-function-to-get-the-GdkWindow.patch25
-rwxr-xr-xsource/xfce/xfce4-notifyd/xfce4-notifyd.SlackBuild11
-rw-r--r--source/xfce/xfce4-panel/libxfce4panel.max_blinking_count.8.diff12
-rwxr-xr-xsource/xfce/xfce4-panel/xfce4-panel.SlackBuild14
-rwxr-xr-xsource/xfce/xfce4-power-manager/xfce4-power-manager.SlackBuild16
-rw-r--r--source/xfce/xfce4-pulseaudio-plugin/slack-desc19
-rw-r--r--source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme.patch12
-rw-r--r--source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme_clean.patch12
-rwxr-xr-xsource/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin.SlackBuild127
-rwxr-xr-xsource/xfce/xfce4-screenshooter/xfce4-screenshooter.SlackBuild8
-rwxr-xr-xsource/xfce/xfce4-session/xfce4-session.SlackBuild9
-rw-r--r--source/xfce/xfce4-settings/0001-Make-sure-icon-NULL-if-no-icon-is-found.patch24
-rw-r--r--source/xfce/xfce4-settings/xfce.xfsettingsd.display.crtc.diff51
-rwxr-xr-xsource/xfce/xfce4-settings/xfce4-settings.SlackBuild15
-rw-r--r--source/xfce/xfce4-settings/xfce4-settings.theme.diff16
-rw-r--r--source/xfce/xfce4-systemload-plugin/0001-g_free-on-a-GtkWidget-is-wrong-on-so-many-levels.-bu.patch25
-rwxr-xr-xsource/xfce/xfce4-systemload-plugin/xfce4-systemload-plugin.SlackBuild8
-rwxr-xr-xsource/xfce/xfce4-taskmanager/xfce4-taskmanager.SlackBuild8
-rwxr-xr-xsource/xfce/xfce4-terminal/xfce4-terminal.SlackBuild10
-rwxr-xr-xsource/xfce/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild8
-rwxr-xr-xsource/xfce/xfconf/xfconf.SlackBuild8
-rwxr-xr-xsource/xfce/xfdesktop/xfdesktop.SlackBuild8
-rwxr-xr-xsource/xfce/xfwm4/xfwm4.SlackBuild8
440 files changed, 16269 insertions, 2148 deletions
diff --git a/source/xfce/xfce4-mixer/doinst.sh b/pasture/source/xfce4-mixer/doinst.sh
index 9830478e8..9830478e8 100644
--- a/source/xfce/xfce4-mixer/doinst.sh
+++ b/pasture/source/xfce4-mixer/doinst.sh
diff --git a/source/xfce/xfce4-mixer/slack-desc b/pasture/source/xfce4-mixer/slack-desc
index 727418746..727418746 100644
--- a/source/xfce/xfce4-mixer/slack-desc
+++ b/pasture/source/xfce4-mixer/slack-desc
diff --git a/source/xfce/xfce4-mixer/xfce4-mixer.SlackBuild b/pasture/source/xfce4-mixer/xfce4-mixer.SlackBuild
index 4787144b4..8d383e4a1 100755
--- a/source/xfce/xfce4-mixer/xfce4-mixer.SlackBuild
+++ b/pasture/source/xfce4-mixer/xfce4-mixer.SlackBuild
@@ -24,11 +24,11 @@
PKGNAM=xfce4-mixer
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +40,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -67,6 +67,12 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+patch -p1 < $CWD/0001-Make-Unique-support-optional.patch
+patch -p1 < $CWD/0001-Use-datadir-xfce4-mixer-as-MIXER_DATADIR.patch
+patch -p1 < $CWD/0001-icons-Makefile.am-Remove-unnecessary-gtk-update-icon.patch
+
+xdt-autogen
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -77,6 +83,7 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
--disable-debug \
+ --disable-unique \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
@@ -85,6 +92,8 @@ make install DESTDIR=$PKG || exit 1
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+gzip -9 $PKG/usr/man/man?/*.?
+
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* HACKING INSTALL NEWS README* THANKS TODO \
diff --git a/source/xfce/xfce4-volumed/slack-desc b/pasture/source/xfce4-volumed/slack-desc
index e9266cbca..e9266cbca 100644
--- a/source/xfce/xfce4-volumed/slack-desc
+++ b/pasture/source/xfce4-volumed/slack-desc
diff --git a/source/xfce/xfce4-volumed/xfce4-volumed.SlackBuild b/pasture/source/xfce4-volumed/xfce4-volumed.SlackBuild
index 147716ea1..d1123f784 100755
--- a/source/xfce/xfce4-volumed/xfce4-volumed.SlackBuild
+++ b/pasture/source/xfce4-volumed/xfce4-volumed.SlackBuild
@@ -26,11 +26,11 @@
PKGNAM=xfce4-volumed
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
@@ -43,8 +43,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -70,6 +70,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+patch -p1 < $CWD/0001-Removed-deprecated-Encoding-entry-in-.desktop-file-t.patch
+patch -p1 < $CWD/0003-Removing-edge-case-memleaks.patch
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/source/x/x11/build/gccmakedep b/source/kde/build/analitza
index 0cfbf0888..0cfbf0888 100644
--- a/source/x/x11/build/gccmakedep
+++ b/source/kde/build/analitza
diff --git a/source/x/x11/build/xcompmgr b/source/kde/build/artikulate
index 0cfbf0888..0cfbf0888 100644
--- a/source/x/x11/build/xcompmgr
+++ b/source/kde/build/artikulate
diff --git a/source/x/x11/build/xf86-video-ati b/source/kde/build/audiocd-kio
index 0cfbf0888..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-ati
+++ b/source/kde/build/audiocd-kio
diff --git a/source/x/x11/build/xf86-video-modesetting b/source/kde/build/baloo
index 0cfbf0888..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-modesetting
+++ b/source/kde/build/baloo
diff --git a/source/x/x11/build/xf86-video-nouveau b/source/kde/build/baloo-widgets
index 0cfbf0888..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-nouveau
+++ b/source/kde/build/baloo-widgets
diff --git a/source/x/x11/build/xf86-video-openchrome b/source/kde/build/blinken
index 0cfbf0888..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-openchrome
+++ b/source/kde/build/blinken
diff --git a/source/x/x11/build/xf86-input-wacom b/source/kde/build/qtruby
index b8626c4cf..b8626c4cf 100644
--- a/source/x/x11/build/xf86-input-wacom
+++ b/source/kde/build/qtruby
diff --git a/source/x/x11/build/xf86-video-rendition b/source/kde/build/step
index b8626c4cf..b8626c4cf 100644
--- a/source/x/x11/build/xf86-video-rendition
+++ b/source/kde/build/step
diff --git a/source/xfce/libxfcegui4/slack-desc b/source/kde/slack-desc/kdev-python
index 8309460df..9a548358c 100644
--- a/source/xfce/libxfcegui4/slack-desc
+++ b/source/kde/slack-desc/kdev-python
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-libxfcegui4: libxfcegui4 (old Xfce widget library)
-libxfcegui4:
-libxfcegui4: This is a widget library for Xfce. It has been replaced by the use
-libxfcegui4: of the libxfce4ui library, but older programs might still need it.
-libxfcegui4:
-libxfcegui4:
-libxfcegui4:
-libxfcegui4:
-libxfcegui4:
-libxfcegui4:
-libxfcegui4:
+kdev-python: kdev-python (Python language plugin for KDevelop)
+kdev-python:
+kdev-python: This KDevelop plugin provides support for the Python language.
+kdev-python:
+kdev-python:
+kdev-python:
+kdev-python:
+kdev-python:
+kdev-python:
+kdev-python:
+kdev-python:
diff --git a/source/xfce/xfwm4-themes/xfwm4-themes.SlackBuild b/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild
index 90748d0e1..041e88544 100755
--- a/source/xfce/xfwm4-themes/xfwm4-themes.SlackBuild
+++ b/source/l/libjpeg-turbo/libjpeg-turbo.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2015, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,33 +20,45 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PKGNAM=xfwm4-themes
+
+PKGNAM=libjpeg-turbo
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-NUMJOBS=${NUMJOBS:--j6}
+NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -75,17 +87,16 @@ find . \
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --includedir=/usr/include \
--mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
--disable-static \
- --disable-debug \
- --build=$ARCH-slackware-linux || exit 1
+ --build=$ARCH-slackware-linux
# Build and install:
make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
+make install DESTDIR=$PKG docdir=/usr/doc/$PKGNAM-$VERSION || exit 1
# Strip binaries:
( cd $PKG
@@ -93,6 +104,14 @@ make install DESTDIR=$PKG || exit 1
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ BUILDING.md ChangeLog.md LICENSE.md README* \
+ example.c libjpeg.txt structure.txt usage.txt wizard.txt \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+chmod 644 $PKG/usr/doc/${PKGNAM}-$VERSION/*
+
# Compress and if needed symlink the man pages:
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
@@ -108,24 +127,12 @@ if [ -d $PKG/usr/man ]; then
)
fi
-# We don't want icon caches:
-find $PKG/usr/share/icons -type f -name "icon-theme.cache" -exec rm -f {} \;
-
-# Add a documentation directory. Not all of these files are expected to be
-# present, but listing them ensures that documentation that might appear and
-# disappear from version to version will not be missed.
-mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
-cp -a \
- AUTHORS BUGS COMPOSITOR COPYING* FAQ HACKING INSTALL \
- NEWS NOTES README* THANKS TODO example.gtkrc-2.0 \
- $PKG/usr/doc/${PKGNAM}-$VERSION
-
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
-if [ -r ChangeLog ]; then
+if [ -r ChangeLog.md ]; then
DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
- cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
- touch -r ChangeLog $DOCSDIR/ChangeLog
+ cat ChangeLog.md | head -n 1000 > $DOCSDIR/ChangeLog.md
+ touch -r ChangeLog.md $DOCSDIR/ChangeLog.md
fi
mkdir -p $PKG/install
@@ -133,3 +140,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source/xfce/libxfcegui4/libxfcegui4.SlackBuild b/source/l/libnih/libnih.SlackBuild
index 8616491d3..b30114304 100755
--- a/source/xfce/libxfcegui4/libxfcegui4.SlackBuild
+++ b/source/l/libnih/libnih.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2014, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,26 +20,26 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PKGNAM=libxfcegui4
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+# Modified by Matteo Bernardini <ponce@slackbuilds.org> (2014)
+
+PKGNAM=libnih
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | rev | cut -f 2- -d -)}
BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) export ARCH=$( uname -m ) ;;
esac
fi
-NUMJOBS=${NUMJOBS:--j6}
+NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -71,28 +71,48 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Change hardcoded lib to lib${LIBDIRSUFFIX}:
+sed -i 's,$(prefix)/lib,$(libdir),g' nih*/Makefile.am
+
+# Write .pid files in /run, not /var/run, since /var may be unavailable or
+# not yet writable early in the boot process.
+sed -i 's,/var/run,/run,g' nih/main.c
+
+autoreconf -fi
+
# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
+ --infodir=/usr/info \
--disable-static \
- --disable-debug \
+ --disable-rpath \
--build=$ARCH-slackware-linux || exit 1
# Build and install:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Remove .la files:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS CONTRIBUTING COPYING* INSTALL MAINTAINERS NEWS README* TODO tests \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
# Compress and if needed symlink the man pages:
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
@@ -108,18 +128,6 @@ if [ -d $PKG/usr/man ]; then
)
fi
-# We don't want icon caches:
-find $PKG/usr/share/icons -type f -name "icon-theme.cache" -exec rm -f {} \;
-
-# Add a documentation directory. Not all of these files are expected to be
-# present, but listing them ensures that documentation that might appear and
-# disappear from version to version will not be missed.
-mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
-cp -a \
- AUTHORS BUGS COMPOSITOR COPYING* FAQ HACKING INSTALL \
- NEWS NOTES README* THANKS TODO example.gtkrc-2.0 \
- $PKG/usr/doc/${PKGNAM}-$VERSION
-
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
diff --git a/source/xap/xchat/xchat.SlackBuild b/source/l/libusbmuxd/libusbmuxd.SlackBuild
index bef11065a..5f9afeb5f 100755
--- a/source/xap/xchat/xchat.SlackBuild
+++ b/source/l/libusbmuxd/libusbmuxd.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,8 +21,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=2.8.8
-BUILD=${BUILD:-8}
+PKGNAM=libusbmuxd
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -36,6 +37,12 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -50,24 +57,12 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-xchat
-rm -rf $PKG
-mkdir -p $TMP $PKG/usr
-
cd $TMP
-rm -rf xchat-$VERSION
-tar xvf $CWD/xchat-$VERSION.tar.xz || exit 1
-cd xchat-$VERSION || exit 1
-if [ -d $CWD/patches ]; then
- for file in $CWD/patches/*.diff.gz ; do
- zcat $file | patch -p1 --verbose || exit 1
- done
-fi
-
-zcat $CWD/xchat.glib.g.diff.gz | patch -p1 --verbose || exit 1
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
+cd ${PKGNAM}-$VERSION
+# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -76,29 +71,25 @@ find . \
-exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
--mandir=/usr/man \
- --localstatedir=/var/lib \
- --enable-tcl=/usr/lib${LIBDIRSUFFIX} \
- --enable-ipv6 \
- --build=$ARCH-slackware-linux
+ --disable-static \
+ --build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-mkdir -p $PKG/usr/doc/xchat-$VERSION
-cp -a \
- AUTHORS COPYING HACKING INSTALL README \
- $PKG/usr/doc/xchat-$VERSION
-
-# In case they ever add this stuff:
-
-# Compress and if needed symlink the man pages:
+# Compress and link manpages, if any:
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
for manpagedir in $(find . -type d -name "man*") ; do
@@ -113,7 +104,7 @@ if [ -d $PKG/usr/man ]; then
)
fi
-# Compress info pages and purge "dir" file from the package:
+# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
( cd $PKG/usr/info
rm -f dir
@@ -121,9 +112,15 @@ if [ -d $PKG/usr/info ]; then
)
fi
+# Add some docs:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cd $TMP/package-xchat
-/sbin/makepkg -l y -c n $TMP/xchat-$VERSION-$ARCH-$BUILD.txz
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/x/fontconfig/fontconfig.SlackBuild b/source/x/fontconfig/fontconfig.SlackBuild
index 2fd360ae4..c93bcc70a 100755
--- a/source/x/fontconfig/fontconfig.SlackBuild
+++ b/source/x/fontconfig/fontconfig.SlackBuild
@@ -22,7 +22,7 @@
VERSION=${VERSION:-$(echo fontconfig-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/x/freeglut/freeglut.SlackBuild b/source/x/freeglut/freeglut.SlackBuild
index e209f82e4..0d5ecac22 100755
--- a/source/x/freeglut/freeglut.SlackBuild
+++ b/source/x/freeglut/freeglut.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=freeglut
-VERSION=${VERSION:-2.8.0}
+VERSION=${VERSION:-2.8.1}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
diff --git a/source/x/glew/glew.SlackBuild b/source/x/glew/glew.SlackBuild
index 5187bb76c..3cbad2d83 100755
--- a/source/x/glew/glew.SlackBuild
+++ b/source/x/glew/glew.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -29,7 +29,7 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -42,8 +42,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -75,7 +75,10 @@ fromdos < config/config.guess > $TEMPFILE
cat $TEMPFILE > config/config.guess ; rm -f $TEMPFILE
make $NUMJOBS OPT="$SLKCFLAGS" || make OPT="$SLKCFLAGS" || exit 1
-make install GLEW_DEST=$PKG/usr || exit 1
+make install.all GLEW_DEST=$PKG/usr || exit 1
+
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/libGLEW*.so.*
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libGLEW*.a
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
diff --git a/source/x/glew/glew.url b/source/x/glew/glew.url
index 8cc435793..1917f16bd 100644
--- a/source/x/glew/glew.url
+++ b/source/x/glew/glew.url
@@ -1,2 +1,2 @@
http://glew.sourceforge.net
-http://downloads.sourceforge.net/glew/glew-1.5.5.tgz
+http://downloads.sourceforge.net/glew/glew-1.13.0.tgz
diff --git a/source/x/libXaw3dXft/libXaw3dXft.SlackBuild b/source/x/libXaw3dXft/libXaw3dXft.SlackBuild
new file mode 100755
index 000000000..6f4e54b08
--- /dev/null
+++ b/source/x/libXaw3dXft/libXaw3dXft.SlackBuild
@@ -0,0 +1,99 @@
+#!/bin/sh
+
+# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libXaw3dXft
+VERSION=${VERSION:-$(echo ${PKGNAM}*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d- | rev)}
+BUILD=${BUILD:-2}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j6}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAM}-${VERSION} \
+ --disable-static \
+ --enable-multiplane-bitmaps \
+ --enable-gray-stipples \
+ --enable-arrow-scrollbars \
+ --enable-internationalization \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a COPYING README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/x/libXaw3dXft/slack-desc b/source/x/libXaw3dXft/slack-desc
new file mode 100644
index 000000000..a6ef63450
--- /dev/null
+++ b/source/x/libXaw3dXft/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libXaw3dXft: libXaw3dXft (3D enhanced version of the MIT Athena widget set)
+libXaw3dXft:
+libXaw3dXft: Xaw3dXft is an enhanced version of the MIT Athena Widget set for
+libXaw3dXft: the X Window System. Xaw3dXft adds a three-dimensional look to
+libXaw3dXft: applications with minimal or no source code changes.
+libXaw3dXft:
+libXaw3dXft: You should install Xaw3dXft if you are using applications which
+libXaw3dXft: incorporate the MIT Athena widget set and you'd like to
+libXaw3dXft: incorporate a 3D look into those applications.
+libXaw3dXft:
+libXaw3dXft:
diff --git a/source/x/libdrm/libdrm.SlackBuild b/source/x/libdrm/libdrm.SlackBuild
index d6899ca51..bcd40699a 100755
--- a/source/x/libdrm/libdrm.SlackBuild
+++ b/source/x/libdrm/libdrm.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006-2010, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,7 +27,7 @@ BUILD=${BUILD:-1}
# Automatically determine architecture for build & packaging:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
@@ -42,6 +42,9 @@ PKG=$TMP/package-${PKGNAM}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -75,8 +78,6 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--enable-udev \
- --enable-omap-experimental-api \
- --enable-exynos-experimental-api \
--build=$ARCH-slackware-linux
# Build and install:
diff --git a/source/x/libepoxy/libepoxy.SlackBuild b/source/x/libepoxy/libepoxy.SlackBuild
new file mode 100755
index 000000000..cc2d99a6a
--- /dev/null
+++ b/source/x/libepoxy/libepoxy.SlackBuild
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+# Slackware build script for libepoxy
+
+# Copyright 2015 Robby Workman, Tuscaloosa, Alabama, USA
+# Copyright 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libepoxy
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+#./autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --build=$ARCH-slackware-linux \
+ --disable-static || exit 1
+
+make -j $NUMJOBS || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# .la files are (hopefully) obsolete... but it seems to vary case by case
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ COPYING* README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/x/libepoxy/libepoxy.url b/source/x/libepoxy/libepoxy.url
new file mode 100644
index 000000000..79b94c186
--- /dev/null
+++ b/source/x/libepoxy/libepoxy.url
@@ -0,0 +1 @@
+https://github.com/anholt/libepoxy/releases/download/v1.3.1/libepoxy-1.3.1.tar.bz2
diff --git a/source/x/libepoxy/slack-desc b/source/x/libepoxy/slack-desc
new file mode 100644
index 000000000..f1e7a001d
--- /dev/null
+++ b/source/x/libepoxy/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libepoxy: libepoxy (OpenGL function pointer management library)
+libepoxy:
+libepoxy: Epoxy is a library for handling OpenGL function pointer management.
+libepoxy:
+libepoxy: Homepage: https://github.com/anholt/libepoxy
+libepoxy:
+libepoxy:
+libepoxy:
+libepoxy:
+libepoxy:
+libepoxy:
diff --git a/source/x/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild b/source/x/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild
index 97a92cb40..6d6c4ab70 100755
--- a/source/x/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild
+++ b/source/x/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild
@@ -21,7 +21,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=1.07.2
+VERSION=1.07.4
ARCH=noarch
BUILD=1
diff --git a/source/x/libevdev/libevdev.SlackBuild b/source/x/libevdev/libevdev.SlackBuild
new file mode 100755
index 000000000..625dda201
--- /dev/null
+++ b/source/x/libevdev/libevdev.SlackBuild
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+# Slackware build script for libevdev
+
+# Copyright 2014 Robby Workman, Northport, Alabama, USA
+# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libevdev
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --build=$ARCH-slackware-linux || exit 1
+
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
+ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a COPYING* README* $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/x/libevdev/slack-desc b/source/x/libevdev/slack-desc
new file mode 100644
index 000000000..74acf5291
--- /dev/null
+++ b/source/x/libevdev/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libevdev: libevdev (wrapper library for evdev devices)
+libevdev:
+libevdev: libevdev is a wrapper library for evdev devices. It moves the common
+libevdev: tasks when dealing with evdev devices into a library and provides a
+libevdev: library interface to the callers, thus avoiding erroneous ioctls, etc.
+libevdev:
+libevdev: http://www.freedesktop.org/wiki/Software/libevdev/
+libevdev:
+libevdev:
+libevdev:
+libevdev:
diff --git a/source/l/qca-ossl/qca-ossl.SlackBuild b/source/x/libva-intel-driver/libva-intel-driver.SlackBuild
index c1fbcc95f..17d51e9a5 100755
--- a/source/l/qca-ossl/qca-ossl.SlackBuild
+++ b/source/x/libva-intel-driver/libva-intel-driver.SlackBuild
@@ -1,6 +1,9 @@
#!/bin/sh
-# Copyright 2006, 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# Slackware build script for libva-intel-driver
+
+# Copyright 2015 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,75 +23,79 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified by Robby Workman <rworkman@slackware.com> for qca-ossl-2.0.0
-# No additional license terms and no copyright claim
-
-
-PKGNAM=qca-ossl
-VERSION=2.0.0_beta3
-BUILD=${BUILD:-2}
+PKGNAM=libva-intel-driver
+VERSION=${VERSION:-$(echo libva-intel-driver-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d- | rev)}
+BUILD=${BUILD:-1}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-${PKGNAM}
+NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX=""
+ LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf $PKGNAM-$(echo $VERSION | tr _ -)
-tar xvf $CWD/$PKGNAM-$(echo $VERSION | tr _ -).tar.bz2 || exit 1
-cd $PKGNAM-$(echo $VERSION | tr _ -) || exit 1
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
-# Fix a compilation error with our new openssh:
-zcat $CWD/qca-ossl-openssl-1.0.0.patch.gz | patch -p1 --verbose || exit 1
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# These fix a mandatory check for wayland-scanner:
+mkdir -p m4
+autoreconf -fi
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --enable-shared \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
-make \
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS"
-make install INSTALL_ROOT=$PKG
+make $NUMJOBS || make || exit 1
+make install-strip DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mkdir -p $PKG/usr/doc/$PKGNAM-$(echo $VERSION | tr - _)
-cp -a COPYING README TODO $PKG/usr/doc/$PKGNAM-$(echo $VERSION | tr - _)
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a AUTHORS COPYING* NEWS README* $PKG/usr/doc/$PKGNAM-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
-
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/x/libva-intel-driver/libva-intel-driver.url b/source/x/libva-intel-driver/libva-intel-driver.url
new file mode 100644
index 000000000..57fcc6bda
--- /dev/null
+++ b/source/x/libva-intel-driver/libva-intel-driver.url
@@ -0,0 +1 @@
+http://www.freedesktop.org/software/vaapi/releases/libva-intel-driver/
diff --git a/source/x/libva-intel-driver/slack-desc b/source/x/libva-intel-driver/slack-desc
new file mode 100644
index 000000000..25a413911
--- /dev/null
+++ b/source/x/libva-intel-driver/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libva-intel-driver: libva-intel-driver (VA driver for Intel G45 & HD Graphics family)
+libva-intel-driver:
+libva-intel-driver: libva-intel-driver is the VA-API implementation for Intel G45
+libva-intel-driver: chipsets and Intel HD Graphics for Intel Core processor family.
+libva-intel-driver:
+libva-intel-driver: Website: http://www.freedesktop.org/wiki/Software/vaapi
+libva-intel-driver:
+libva-intel-driver:
+libva-intel-driver:
+libva-intel-driver:
+libva-intel-driver:
diff --git a/source/x/libva/libva.SlackBuild b/source/x/libva/libva.SlackBuild
new file mode 100755
index 000000000..60d688611
--- /dev/null
+++ b/source/x/libva/libva.SlackBuild
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# Slackware build script for libva
+
+# Copyright 2015 Robby Workman, Tuscaloosa, Alabama, USA
+# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libva
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# These fix a mandatory check for wayland-scanner:
+mkdir -p m4
+autoreconf -fi
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --enable-shared \
+ --disable-static \
+ --enable-dummy-driver \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a COPYING* NEWS README* $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source/x/libva/libva.url b/source/x/libva/libva.url
new file mode 100644
index 000000000..699f4c436
--- /dev/null
+++ b/source/x/libva/libva.url
@@ -0,0 +1 @@
+http://www.freedesktop.org/software/vaapi/releases/libva/
diff --git a/source/x/libva/slack-desc b/source/x/libva/slack-desc
new file mode 100644
index 000000000..d2e5e6a64
--- /dev/null
+++ b/source/x/libva/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libva: libva (Video Acceleration API)
+libva:
+libva: The main motivation for VAAPI (Video Acceleration API) is to enable
+libva: hardware accelerated video decode/encode at various entry-points (VLD,
+libva: IDCT, Motion Compensation etc.) for the prevailing coding standards
+libva: today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3)
+libva:
+libva: Website: http://www.freedesktop.org/wiki/Software/vaapi
+libva:
+libva:
+libva:
diff --git a/source/x/libvdpau/doinst.sh b/source/x/libvdpau/doinst.sh
new file mode 100644
index 000000000..e184d4720
--- /dev/null
+++ b/source/x/libvdpau/doinst.sh
@@ -0,0 +1,17 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/vdpau_wrapper.cfg.new
+config etc/profile.d/vdpau.sh.new
+config etc/profile.d/vdpau.csh.new
+
diff --git a/source/x/libvdpau/libvdpau.SlackBuild b/source/x/libvdpau/libvdpau.SlackBuild
new file mode 100755
index 000000000..e0ee6e002
--- /dev/null
+++ b/source/x/libvdpau/libvdpau.SlackBuild
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+# Slackware build script for libvdpau
+
+# Copyright 2009-2015 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2012-2013 Edward Koenig, Vancouver, WA, USA
+# Copyright 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=libvdpau
+VERSION=${VERSION:-$(echo libvdpau-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d- | rev)}
+BUILD=${BUILD:-1}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j6}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install-strip DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/etc/profile.d
+cp -a $CWD/profile.d/vdpau.sh $PKG/etc/profile.d/vdpau.sh.new
+cp -a $CWD/profile.d/vdpau.csh $PKG/etc/profile.d/vdpau.csh.new
+chown root:root $PKG/etc/profile.d/*
+chmod 755 $PKG/etc/profile.d/*
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Don't clobber the config file on upgrades
+mv $PKG/etc/vdpau_wrapper.cfg $PKG/etc/vdpau_wrapper.cfg.new
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a AUTHORS COPYING INSTALL NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/x/libvdpau/profile.d/vdpau.csh b/source/x/libvdpau/profile.d/vdpau.csh
new file mode 100755
index 000000000..e2d18c181
--- /dev/null
+++ b/source/x/libvdpau/profile.d/vdpau.csh
@@ -0,0 +1,22 @@
+#!/bin/csh
+
+# Disable debugging output of the vdpau backend
+setenv VDPAU_LOG 0
+
+# Use the vdpau backend of the nvidia binary driver
+#setenv VDPAU_DRIVER "nvidia"
+
+# Use the vdpau backend of the nouveau driver
+#setenv VDPAU_DRIVER "nouveau"
+
+# Use the vdpau backend of the r300 driver
+#setenv VDPAU_DRIVER "r300"
+
+# Use the vdpau backend of the r600 driver
+#setenv VDPAU_DRIVER "r600"
+
+# Use the vdpau backend of the radeonsi driver
+#setenv VDPAU_DRIVER "radeonsi"
+
+# Use the va-api/opengl backend
+#setenv VDPAU_DRIVER "va_gl"
diff --git a/source/x/libvdpau/profile.d/vdpau.sh b/source/x/libvdpau/profile.d/vdpau.sh
new file mode 100755
index 000000000..918312e21
--- /dev/null
+++ b/source/x/libvdpau/profile.d/vdpau.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Disable debugging output of the vdpau backend
+export VDPAU_LOG=0
+
+# Use the vdpau backend of the nvidia binary driver
+#export VDPAU_DRIVER="nvidia"
+
+# Use the vdpau backend of the nouveau driver
+#export VDPAU_DRIVER="nouveau"
+
+# Use the vdpau backend of the r300 driver
+#export VDPAU_DRIVER="r300"
+
+# Use the vdpau backend of the r600 driver
+#export VDPAU_DRIVER="r600"
+
+# Use the vdpau backend of the radeonsi driver
+#export VDPAU_DRIVER="radeonsi"
+
+# Use the va-api/opengl backend
+#export VDPAU_DRIVER="va_gl"
diff --git a/source/x/libvdpau/slack-desc b/source/x/libvdpau/slack-desc
new file mode 100644
index 000000000..a2628b91e
--- /dev/null
+++ b/source/x/libvdpau/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libvdpau: libvdpau (VDPAU wrapper library)
+libvdpau:
+libvdpau: This package contains the libvdpau wrapper library and the
+libvdpau: libvdpau_trace debugging library, along with the header files needed
+libvdpau: to build VDPAU applications. To actually use a VDPAU device, you
+libvdpau: need a vendor-specific implementation library, like the one
+libvdpau: shipped with nvidia's binary graphics driver.
+libvdpau:
+libvdpau: Homepage: http://cgit.freedesktop.org/~aplattner/libvdpau
+libvdpau:
+libvdpau:
diff --git a/source/x/mesa/get-mesa.sh b/source/x/mesa/get-mesa.sh
index 253deeb4c..b88329984 100755
--- a/source/x/mesa/get-mesa.sh
+++ b/source/x/mesa/get-mesa.sh
@@ -11,10 +11,10 @@ HEADISAT="$(cat mesa/.git/packed-refs | grep "refs/remotes/origin/${BRANCH}$" |
# Cleanup. We're not packing up the whole git repo.
( cd mesa && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null )
DATE=$(date +%Y%m%d)
-mv mesa Mesa-${BRANCH}_${HEADISAT}
-tar cf MesaLib-${BRANCH}_${HEADISAT}.tar Mesa-${BRANCH}_${HEADISAT}
-xz -9 MesaLib-${BRANCH}_${HEADISAT}.tar
-rm -rf MesaLib-${BRANCH}_${HEADISAT}
+mv mesa mesa-${BRANCH}_${HEADISAT}
+tar cf mesa-${BRANCH}_${HEADISAT}.tar mesa-${BRANCH}_${HEADISAT}
+xz -9 mesa-${BRANCH}_${HEADISAT}.tar
+rm -rf mesa-${BRANCH}_${HEADISAT}
echo
-echo "Mesa branch $BRANCH with HEAD at $HEADISAT packaged as MesaLib-${BRANCH}_${HEADISAT}.tar.xz"
+echo "Mesa branch $BRANCH with HEAD at $HEADISAT packaged as mesa-${BRANCH}_${HEADISAT}.tar.xz"
echo
diff --git a/source/x/mesa/mesa.SlackBuild b/source/x/mesa/mesa.SlackBuild
index 8d04e7fe0..af959695c 100755
--- a/source/x/mesa/mesa.SlackBuild
+++ b/source/x/mesa/mesa.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,18 +21,20 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=mesa
-VERSION=9.1.7
-DEMOVERS=8.1.0
+VERSION=${VERSION:-11.2.2}
+DEMOVERS=${DEMOVERS:-8.3.0}
BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:--j8}
+NUMJOBS=${NUMJOBS:--j7}
# Be sure this list is up-to-date:
-DRI_DRIVERS="i915,i965,intel,nouveau,r200,radeon,swrast"
+DRI_DRIVERS="i915,i965,nouveau,r200,radeon,swrast"
+GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast"
+EGL_PLATFORMS="drm,x11"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
*) export ARCH=$( uname -m ) ;;
esac
@@ -42,8 +44,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
@@ -56,10 +58,10 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf Mesa-${VERSION}
+rm -rf ${PKGNAM}-${VERSION}
-tar xvf $CWD/MesaLib-${VERSION}.tar.?z* || exit 1
-cd Mesa-$VERSION
+tar xvf $CWD/${PKGNAM}-${VERSION}.tar.xz || exit 1
+cd ${PKGNAM}-$VERSION
# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api
@@ -74,20 +76,26 @@ find . \
# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
-# git checkout origin/8.0
-# git format-patch 3d657b14b4cab98a2945904823e78cd8950944f4.. # 8.0.3 release
+# git checkout origin/11.2
+# git format-patch 5de088f7da75cc0209ff1602ed70aff14f733e4b # 11.2.2 release
if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
for patch in $CWD/patches/*.patch ; do
- patch -p1 < $patch || exit 1 ;
+ patch -p1 < $patch || exit 1 ;
done
fi
-if [ ! -r configure ]; then
- autoreconf || exit 1
-fi
+# Don't worry if Mako is not present:
+#sed -i "s,AX_CHECK_PYTHON_MAKO_MODULE(\$PYTHON_MAKO_REQUIRED),,g" configure.ac
+zcat $CWD/mesa.no.mako.diff.gz | patch -p1 --verbose || exit 1
+
+# This doesn't fully do the trick. See below. ;-)
+#./autogen.sh
-# Running autogen to avoid problems if our autotools don't match upstream's:
-./autogen.sh
+# Fix detection of libLLVM when built with CMake
+sed -i 's/LLVM_SO_NAME=.*/LLVM_SO_NAME=LLVM/' configure.ac
+
+# Seems to need this to avoid tripping over a different libtool version:
+autoreconf -fi
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -95,19 +103,31 @@ CFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
- --docdir=/usr/doc/mesa-$VERSION \
+ --docdir=/usr/doc/${PKGNAM}-$VERSION \
--with-dri-driverdir=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \
--with-dri-drivers="$DRI_DRIVERS" \
- --with-gallium-drivers=nouveau,r300,r600,svga \
+ --with-gallium-drivers="$GALLIUM_DRIVERS" \
+ --with-egl-platforms="$EGL_PLATFORMS" \
--enable-gallium-llvm \
+ --enable-llvm-shared-libs \
+ --enable-egl \
+ --enable-texture-float \
--enable-shared-glapi \
--enable-xa \
+ --enable-nine \
--enable-osmesa \
+ --enable-dri \
+ --enable-dri3 \
+ --enable-gbm \
+ --enable-glx \
+ --enable-glx-tls \
+ --enable-gles1 \
+ --enable-gles2 \
+ --enable-vdpau \
--build=$ARCH-slackware-linux
-# r300 requires llvm
-# Other gallium drivers:
-# galahad,i915,identity,llvmpipe,noop,nv50,nvc0,nvfx,rbug,softpipe,svga,trace
+# This is autodetected anyway:
+# --enable-va \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
@@ -122,7 +142,7 @@ make install DESTDIR=$PKG || exit 1
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -139,7 +159,7 @@ make install DESTDIR=$PKG || exit 1
cp -a src/xdemos/$i $PKG/usr/bin ;
done
)
-
+
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -153,12 +173,12 @@ if [ -d $PKG/usr/info ]; then
gzip -9 $PKG/usr/info/*
fi
-mkdir -p $PKG/usr/doc/Mesa-$VERSION/html
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/html
cp -a \
- docs/COPYING* docs/relnotes-${VERSION}*.html docs/README* docs/GL* \
- $PKG/usr/doc/Mesa-$VERSION
-cp -a docs/*.html $PKG/usr/doc/Mesa-$VERSION/html
-rm -f $PKG/usr/doc/Mesa-$VERSION/html/relnotes*.html
+ docs/COPYING* docs/relnotes/relnotes-${VERSION}*.html docs/README* docs/GL* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a docs/*.html $PKG/usr/doc/$PKGNAM-$VERSION/html
+rm -f $PKG/usr/doc/$PKGNAM-$VERSION/html/relnotes*.html
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/source/x/mesa/mesa.no.mako.diff b/source/x/mesa/mesa.no.mako.diff
new file mode 100644
index 000000000..513589924
--- /dev/null
+++ b/source/x/mesa/mesa.no.mako.diff
@@ -0,0 +1,34 @@
+--- ./configure.ac.orig 2015-04-09 06:28:58.000000000 -0500
++++ ./configure.ac 2015-04-16 15:33:30.087481982 -0500
+@@ -114,19 +114,19 @@
+ fi
+ fi
+
+-AX_CHECK_PYTHON_MAKO_MODULE($PYTHON_MAKO_REQUIRED)
++dnl AX_CHECK_PYTHON_MAKO_MODULE($PYTHON_MAKO_REQUIRED)
+
+-if test -z "$PYTHON2"; then
+- if test ! -f "$srcdir/src/util/format_srgb.c"; then
+- AC_MSG_ERROR([Python not found - unable to generate sources])
+- fi
+-else
+- if test "x$acv_mako_found" = xno; then
+- if test ! -f "$srcdir/src/mesa/main/format_unpack.c"; then
+- AC_MSG_ERROR([Python mako module v$PYTHON_MAKO_REQUIRED or higher not found])
+- fi
+- fi
+-fi
++dnl if test -z "$PYTHON2"; then
++dnl if test ! -f "$srcdir/src/util/format_srgb.c"; then
++dnl AC_MSG_ERROR([Python not found - unable to generate sources])
++dnl fi
++dnl else
++dnl if test "x$acv_mako_found" = xno; then
++dnl if test ! -f "$srcdir/src/mesa/main/format_unpack.c"; then
++dnl AC_MSG_ERROR([Python mako module v$PYTHON_MAKO_REQUIRED or higher not found])
++dnl fi
++dnl fi
++dnl fi
+
+ AC_PROG_INSTALL
+
diff --git a/source/x/motif/motif-2.3.4-bindings.patch b/source/x/motif/motif-2.3.4-bindings.patch
new file mode 100644
index 000000000..baaa573b8
--- /dev/null
+++ b/source/x/motif/motif-2.3.4-bindings.patch
@@ -0,0 +1,36 @@
+diff -up openmotif-2.3.3/configure.ac.bindings openmotif-2.3.3/configure.ac
+--- openmotif-2.3.3/configure.ac.bindings 2009-10-27 17:10:23.000000000 +0100
++++ openmotif-2.3.3/configure.ac 2010-03-19 11:12:39.000000000 +0100
+@@ -185,7 +185,7 @@ AC_SUBST(MWMRCDIR)
+ INCDIR="${includedir}/X11"
+ AC_SUBST(INCDIR)
+
+-XMBINDDIR_FALLBACK="${libdir}/X11/bindings"
++XMBINDDIR_FALLBACK="${datadir}/X11/bindings"
+ AC_SUBST(XMBINDDIR_FALLBACK)
+
+ RM="rm -f"
+diff -up openmotif-2.3.3/doc/man/man3/VirtualBindings.3.bindings openmotif-2.3.3/doc/man/man3/VirtualBindings.3
+--- openmotif-2.3.3/doc/man/man3/VirtualBindings.3.bindings 2005-07-20 13:47:21.000000000 +0200
++++ openmotif-2.3.3/doc/man/man3/VirtualBindings.3 2010-03-19 11:11:42.000000000 +0100
+@@ -90,7 +90,7 @@ bindings contained in that file\&.
+ If it has found no bindings, Motif next looks for the file
+ \fBxmbind\&.alias\fP in the directory specified by the environment
+ variable \fBXMBINDDIR\fP, if \fBXMBINDDIR\fP is set, or in the directory
+-\fB/usr/lib/Xm/bindings\fP if \fBXMBINDDIR\fP is not set\&.
++\fB/usr/share/X11/bindings\fP if \fBXMBINDDIR\fP is not set\&.
+ If this file exists Motif searches it for a pathname associated with the
+ vendor string or with the vendor string and vendor release\&.
+ If it finds such a pathname and if that file exists, Motif loads the
+diff -up openmotif-2.3.3/lib/Xm/XmosP.h.bindings openmotif-2.3.3/lib/Xm/XmosP.h
+--- openmotif-2.3.3/lib/Xm/XmosP.h.bindings 2002-06-17 22:36:30.000000000 +0200
++++ openmotif-2.3.3/lib/Xm/XmosP.h 2010-03-19 11:11:42.000000000 +0100
+@@ -188,7 +188,7 @@ extern "C" {
+
+ #define XMBINDDIR "XMBINDDIR"
+ #ifndef XMBINDDIR_FALLBACK
+-#define XMBINDDIR_FALLBACK "/usr/lib/Xm/bindings"
++#define XMBINDDIR_FALLBACK "/usr/share/X11/bindings"
+ #endif
+ #define XMBINDFILE "xmbind.alias"
+ #define MOTIFBIND ".motifbind"
diff --git a/source/x/motif/motif-2.3.4-mwmrc_dir.patch b/source/x/motif/motif-2.3.4-mwmrc_dir.patch
new file mode 100644
index 000000000..e6a42dc5f
--- /dev/null
+++ b/source/x/motif/motif-2.3.4-mwmrc_dir.patch
@@ -0,0 +1,93 @@
+diff -up openmotif-2.3.3/clients/mwm/WmResParse.c.mwmrc_dir openmotif-2.3.3/clients/mwm/WmResParse.c
+--- openmotif-2.3.3/clients/mwm/WmResParse.c.mwmrc_dir 2009-06-22 23:51:51.000000000 +0200
++++ openmotif-2.3.3/clients/mwm/WmResParse.c 2010-03-23 13:37:03.000000000 +0100
+@@ -2403,7 +2403,7 @@ FILE *FopenConfigFile (void)
+ #endif /* PANELIST */
+
+ #ifndef MWMRCDIR
+-#define MWMRCDIR "/usr/lib/X11"
++#define MWMRCDIR "/etc/X11/mwm"
+ #endif
+ if (LANG != NULL)
+ {
+diff -up openmotif-2.3.3/configure.ac.mwmrc_dir openmotif-2.3.3/configure.ac
+--- openmotif-2.3.3/configure.ac.mwmrc_dir 2009-10-27 17:10:23.000000000 +0100
++++ openmotif-2.3.3/configure.ac 2010-03-23 13:38:33.000000000 +0100
+@@ -179,7 +179,7 @@ AC_SUBST(CDE_CONFIGURATION_TOP)
+ LIBDIR="${libdir}/X11"
+ AC_SUBST(LIBDIR)
+
+-MWMRCDIR="${libdir}/X11"
++MWMRCDIR="/etc/X11/mwm"
+ AC_SUBST(MWMRCDIR)
+
+ INCDIR="${includedir}/X11"
+diff -up openmotif-2.3.3/doc/man/man1/mwm.1.mwmrc_dir openmotif-2.3.3/doc/man/man1/mwm.1
+--- openmotif-2.3.3/doc/man/man1/mwm.1.mwmrc_dir 2002-01-05 16:21:11.000000000 +0100
++++ openmotif-2.3.3/doc/man/man1/mwm.1 2010-03-23 13:37:03.000000000 +0100
+@@ -678,8 +678,8 @@ is set, \fBmwm\fP looks for \fI$HOME/$LA
+ \fB$HOME\fP/\fBconfigFile\fP\&. If the \fIconfigFile\fP pathname does not begin with "~/" or "/", \fBmwm\fP considers it to be relative to the current working directory\&. If
+ the \fIconfigFile\fP resource is not specified
+ or if that file does not exist, \fBmwm\fP uses several default
+-paths to find a configuration file\&. The order of the search is shown below: \fB/usr/X11R6/lib/X11/$LANG/system\&.mwmrc\fP\(dg
+-\fB/usr/X11R6/lib/X11/system\&.mwmrc\fP\(dg Paths marked with \&'\(dg\&' are
++paths to find a configuration file\&. The order of the search is shown below: \fB/etc/X11/mwm/$LANG/system\&.mwmrc\fP\(dg
++\fB/etc/X11/mwm/system\&.mwmrc\fP\(dg Paths marked with \&'\(dg\&' are
+ implementation dependent\&.
+ .IP "\fIdeiconifyKeyFocus\fP\ (class\ \fIDeiconifyKeyFocus\fP)" 10
+ This resource applies only when the keyboard input focus policy is explicit\&.
+@@ -1344,9 +1344,9 @@ the shell to use when executing commands
+ function\&.
+ .SS "Files"
+ .PP
+-\fB/usr/X11R6/lib/X11/$LANG/system\&.mwmrc\fP
++\fB/etc/X11/mwm/$LANG/system\&.mwmrc\fP
+ .PP
+-\fB/usr/X11R6/lib/X11/system\&.mwmrc\fP
++\fB/etc/X11/mwm/system\&.mwmrc\fP
+ .PP
+ \fB/usr/X11R6/lib/X11/app-defaults/Mwm\fP
+ .PP
+diff -up openmotif-2.3.3/doc/man/man4/mwmrc.4.mwmrc_dir openmotif-2.3.3/doc/man/man4/mwmrc.4
+--- openmotif-2.3.3/doc/man/man4/mwmrc.4.mwmrc_dir 2002-01-05 16:21:12.000000000 +0100
++++ openmotif-2.3.3/doc/man/man4/mwmrc.4 2010-03-23 13:37:03.000000000 +0100
+@@ -57,7 +57,7 @@ file that controls much of the behavior
+ It contains descriptions of resources that cannot easily be
+ written using standard X Window System, Version 11 resource syntax\&. The resource
+ description file contains entries that are referred to by X resources in
+-defaults files (for example, \fB/usr/X11R6/lib/X11/app-defaults/Mwm\fP)
++defaults files (for example, \fB/usr/share/X11/app-defaults/Mwm\fP)
+ or in the \fBRESOURCE_MANAGER\fP property on the
+ root window\&. For example, the resource description file enables you to specify
+ different types of window menus; however, an X resource is used to specify
+@@ -72,8 +72,8 @@ on a per-user basis:
+ .nf
+ \f(CW$HOME/$LANG/\&.mwmrc
+ $HOME/\&.mwmrc
+-/usr/X11R6/lib/X11/$LANG/system\&.mwmrc
+-/usr/X11R6/lib/X11/system\&.mwmrc\fR
++/etc/X11/mwm/$LANG/system\&.mwmrc
++/etc/X11/mwm/system\&.mwmrc\fR
+ .fi
+ .PP
+ .PP
+@@ -84,7 +84,7 @@ resource\&. The following shows how a di
+ be specified from the command line:
+ .PP
+ .nf
+-\f(CW/usr/X11R6/bin/X11/mwm -xrm "mwm*configFile: mymwmrc"\fR
++\f(CW/usr/bin/mwm -xrm "mwm*configFile: mymwmrc"\fR
+ .fi
+ .PP
+ .SS "Resource Types"
+@@ -626,8 +626,8 @@ is not what you expect\&.
+ .nf
+ \fB$HOME/$LANG/\&.mwmrc
+ $HOME/\&.mwmrc
+-/usr/X11R6/lib/X11/$LANG/system\&.mwmrc
+-/usr/X11R6/lib/X11/system\&.mwmrc\fP
++/etc/X11/mwm/$LANG/system\&.mwmrc
++/etc/X11/mwm/system\&.mwmrc\fP
+ .fi
+ .SH "RELATED INFORMATION"
+ .PP
diff --git a/source/x/motif/motif-2.3.4-no_demos.patch b/source/x/motif/motif-2.3.4-no_demos.patch
new file mode 100644
index 000000000..bf1b92656
--- /dev/null
+++ b/source/x/motif/motif-2.3.4-no_demos.patch
@@ -0,0 +1,13 @@
+diff -up openmotif-2.3.3/Makefile.am.no_demos openmotif-2.3.3/Makefile.am
+--- openmotif-2.3.3/Makefile.am.no_demos 2008-09-19 16:38:05.000000000 +0200
++++ openmotif-2.3.3/Makefile.am 2010-03-23 13:53:13.000000000 +0100
+@@ -29,7 +29,7 @@ SUBDIRS = bindings bitmaps \
+ include \
+ tools \
+ clients \
+- doc \
+- demos
++ doc
++
+ AUTOMAKE_OPTIONS = 1.4
+ ACLOCAL_AMFLAGS = -I .
diff --git a/source/x/motif/motif.SlackBuild b/source/x/motif/motif.SlackBuild
new file mode 100755
index 000000000..67df95998
--- /dev/null
+++ b/source/x/motif/motif.SlackBuild
@@ -0,0 +1,180 @@
+#!/bin/sh
+
+# Copyright 2014, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=motif
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | cut -f 2 -d - | cut -f 1-3 -d .)}
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf $PKGNAM-${VERSION}
+tar xvf $CWD/$PKGNAM-${VERSION}.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Fix for x86_64 architecture:
+sed -i -e "/UsrLibDir/s,/lib,/lib${LIBDIRSUFFIX},g" config/cf/Imake.tmpl
+
+# Fix path for bindings directory:
+zcat $CWD/motif-2.3.4-bindings.patch.gz | patch -p1 --verbose || exit 1
+# Fix path for system.mwmrc:
+zcat $CWD/motif-2.3.4-mwmrc_dir.patch.gz | patch -p1 --verbose || exit 1
+# Don't compile and install the demo programs:
+zcat $CWD/motif-2.3.4-no_demos.patch.gz | patch -p1 --verbose || exit 1
+# Fix path for system rgb.txt:
+zcat $CWD/motif.rgbtxt.patch.gz | patch -p1 --verbose || exit 1
+
+# Regenerate autoconf after patches:
+autoreconf -vif
+
+# Configure:
+LDFLAGS="$SLKLDFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --localstatedir=/var \
+ --sysconfdir=/etc/X11 \
+ --enable-themes \
+ --disable-static \
+ --enable-shared \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# This conflicts with a perl manpage:
+mv $PKG/usr/man/man3/Shell.3 $PKG/usr/man/man3/omShell.3
+
+# Remove .la files:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ BUGREPORT COPY* INSTALL* NEWS RE* TODO \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source/x/motif/motif.rgbtxt.patch b/source/x/motif/motif.rgbtxt.patch
new file mode 100644
index 000000000..6c5ff1504
--- /dev/null
+++ b/source/x/motif/motif.rgbtxt.patch
@@ -0,0 +1,22 @@
+--- openmotif-2.3.0/lib/Xm/ColorS.c.rgbtxt 2004-07-07 14:24:07.000000000 +0200
++++ openmotif-2.3.0/lib/Xm/ColorS.c 2005-12-02 13:26:11.000000000 +0100
+@@ -131,7 +131,7 @@
+ {
+ XmNrgbFile, XmCString, XmRString,
+ sizeof(String), XtOffsetOf(XmColorSelectorRec, cs.rgb_file),
+- XmRString, (XtPointer) "/usr/lib/X11/rgb.txt"
++ XmRString, (XtPointer) "/usr/share/X11/rgb.txt"
+ },
+ #endif
+ {
+--- openmotif-2.3.0/doc/man/man3/XmColorSelector.3.rgbtxt 2002-01-17 21:32:48.000000000 +0100
++++ openmotif-2.3.0/doc/man/man3/XmColorSelector.3 2005-12-02 13:25:26.000000000 +0100
+@@ -34,7 +34,7 @@
+ noCellError%NoCellError%XmString%"No Color Cell
+ %%% Available"
+ redSliderLabel%SliderLabel%XmString%"Red"
+-rgbFile%String%String%/usr/lib/X11/rgb.txt
++rgbFile%String%String%/usr/share/X11/rgb.txt
+ sliderTogLabel%TogLabel%XmString%"Color Sliders"
+ .TE
+ .PP
diff --git a/source/xap/xchat/slack-desc b/source/x/motif/slack-desc
index 70c75e67c..406c0b3e7 100644
--- a/source/xap/xchat/slack-desc
+++ b/source/x/motif/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-xchat: xchat (GTK+-based IRC client)
-xchat:
-xchat: X-Chat is a GTK+-based IRC (Internet Relay Chat) client.
-xchat:
-xchat:
-xchat:
-xchat:
-xchat:
-xchat:
-xchat:
-xchat:
+motif: motif (Motif X libraries)
+motif:
+motif: Motif is the industry standard user interface toolkit for the X Window
+motif: System. Based on the original Motif source code, this version is
+motif: licensed under the GNU Lesser Public License v2.1.
+motif:
+motif: Motif homepage: http://motif.ics.com
+motif:
+motif:
+motif:
+motif:
diff --git a/source/x/mtdev/mtdev.SlackBuild b/source/x/mtdev/mtdev.SlackBuild
index d3e518cfd..08a9421f2 100755
--- a/source/x/mtdev/mtdev.SlackBuild
+++ b/source/x/mtdev/mtdev.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=mtdev
-VERSION=${VERSION:-1.1.3}
+VERSION=${VERSION:-1.1.5}
BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
diff --git a/source/x/scim-anthy/scim-anthy.SlackBuild b/source/x/scim-anthy/scim-anthy.SlackBuild
index ee43c38bf..fba4ad8aa 100755
--- a/source/x/scim-anthy/scim-anthy.SlackBuild
+++ b/source/x/scim-anthy/scim-anthy.SlackBuild
@@ -23,7 +23,7 @@
# SUCH DAMAGE.
# -----------------------------------------------------------------------------
#
-# Slackware SlackBuild script
+# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers <alien@slackware.com>
# For: scim-anthy
@@ -36,21 +36,21 @@
PKGNAM=scim-anthy
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
NUMJOBS=${NUMJOBS:-" -j7 "}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -68,7 +68,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar -xvf $CWD/${PKGNAM}-${VERSION}.tar.gz || exit 1
+tar -xvf $CWD/${PKGNAM}-${VERSION}.tar.?z* || exit 1
cd ${PKGNAM}-${VERSION} || exit 1
zcat $CWD/scim-anthy.gcc43.diff.gz | patch -p1 --verbose || exit 1
diff --git a/source/x/scim-hangul/scim-hangul-0.3.2+gcc-4.3.patch b/source/x/scim-hangul/scim-hangul-0.3.2+gcc-4.3.patch
new file mode 100644
index 000000000..b7698793a
--- /dev/null
+++ b/source/x/scim-hangul/scim-hangul-0.3.2+gcc-4.3.patch
@@ -0,0 +1,23 @@
+diff -up scim-hangul-0.3.2/src/scim_hangul_imengine.cpp.gcc43~ scim-hangul-0.3.2/src/scim_hangul_imengine.cpp
+--- scim-hangul-0.3.2/src/scim_hangul_imengine.cpp.gcc43~ 2008-01-13 08:01:34.000000000 +0000
++++ scim-hangul-0.3.2/src/scim_hangul_imengine.cpp 2008-01-13 08:01:34.000000000 +0000
+@@ -29,6 +29,7 @@
+ #define Uses_SCIM_LOOKUP_TABLE
+ #define Uses_SCIM_CONFIG_BASE
+
++#include <cstring>
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+diff -up scim-hangul-0.3.2/src/scim_hangul_imengine_setup.cpp.gcc43~ scim-hangul-0.3.2/src/scim_hangul_imengine_setup.cpp
+--- scim-hangul-0.3.2/src/scim_hangul_imengine_setup.cpp.gcc43~ 2008-01-13 08:01:37.000000000 +0000
++++ scim-hangul-0.3.2/src/scim_hangul_imengine_setup.cpp 2008-01-13 08:01:37.000000000 +0000
+@@ -28,7 +28,8 @@
+
+ #define Uses_SCIM_CONFIG_BASE
+
++#include <cstring>
+ #include <gtk/gtk.h>
+
+ #ifdef HAVE_CONFIG_H
+
diff --git a/source/x/scim-hangul/scim-hangul-0.3.2+gcc-4.7.patch b/source/x/scim-hangul/scim-hangul-0.3.2+gcc-4.7.patch
new file mode 100644
index 000000000..918de9e11
--- /dev/null
+++ b/source/x/scim-hangul/scim-hangul-0.3.2+gcc-4.7.patch
@@ -0,0 +1,12 @@
+diff --git a/src/scim_hangul_imengine.cpp b/src/scim_hangul_imengine.cpp
+index 7d70654..d678902 100644
+--- a/src/scim_hangul_imengine.cpp
++++ b/src/scim_hangul_imengine.cpp
+@@ -30,6 +30,7 @@
+ #define Uses_SCIM_CONFIG_BASE
+
+ #include <cstring>
++#include <unistd.h>
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
diff --git a/source/x/scim-hangul/scim-hangul-0.4.0+gtk.patch b/source/x/scim-hangul/scim-hangul-0.4.0+gtk.patch
new file mode 100644
index 000000000..bc1fd4b67
--- /dev/null
+++ b/source/x/scim-hangul/scim-hangul-0.4.0+gtk.patch
@@ -0,0 +1,11 @@
+--- src/scim_hangul_imengine_setup.cpp.orig 2012-07-08 07:52:07.000000000 -0400
++++ src/scim_hangul_imengine_setup.cpp 2012-11-02 14:13:14.000000000 -0400
+@@ -346,7 +346,7 @@
+ for (i = 0; i < n; i++) {
+ const char* name = hangul_ic_get_keyboard_name(i);
+ #if GTK_CHECK_VERSION(2, 24, 0)
+- gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo_box), NULL, name);
++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), name);
+ #else
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), name);
+ #endif
diff --git a/source/x/scim-hangul/scim-hangul.SlackBuild b/source/x/scim-hangul/scim-hangul.SlackBuild
index 58f17654a..06da9e2c2 100755
--- a/source/x/scim-hangul/scim-hangul.SlackBuild
+++ b/source/x/scim-hangul/scim-hangul.SlackBuild
@@ -23,7 +23,7 @@
# SUCH DAMAGE.
# -----------------------------------------------------------------------------
#
-# Slackware SlackBuild script
+# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers <alien@slackware.com>
# For: scim-hangul
@@ -36,21 +36,21 @@
PKGNAM=scim-hangul
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
NUMJOBS=${NUMJOBS:-" -j7 "}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -69,11 +69,12 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar -xvf $CWD/${PKGNAM}-${VERSION}.tar.gz || exit 1
+tar -xvf $CWD/${PKGNAM}-${VERSION}.tar.?z* || exit 1
cd ${PKGNAM}-${VERSION} || exit 1
-zcat $CWD/scim-hangul.gcc43.diff.gz | patch -p1 --verbose || exit 1
-zcat $CWD/scim-hangul.gcc47.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/scim-hangul-0.3.2+gcc-4.3.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/scim-hangul-0.3.2+gcc-4.7.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/scim-hangul-0.4.0+gtk.patch.gz | patch -p0 --verbose || exit 1
chown -R root:root .
find . \
diff --git a/source/x/scim-hangul/scim-hangul.gcc43.diff b/source/x/scim-hangul/scim-hangul.gcc43.diff
deleted file mode 100644
index db63e940d..000000000
--- a/source/x/scim-hangul/scim-hangul.gcc43.diff
+++ /dev/null
@@ -1,22 +0,0 @@
---- ./src/scim_hangul_imengine.cpp.orig 2006-10-23 07:42:47.000000000 -0500
-+++ ./src/scim_hangul_imengine.cpp 2009-06-09 20:50:06.000000000 -0500
-@@ -36,6 +36,8 @@
- #include <scim.h>
- #include "scim_hangul_imengine.h"
-
-+#include <cstring>
-+
- #ifdef HAVE_GETTEXT
- #include <libintl.h>
- #define _(String) dgettext(GETTEXT_PACKAGE,String)
---- ./src/scim_hangul_imengine_setup.cpp.orig 2006-10-23 07:42:47.000000000 -0500
-+++ ./src/scim_hangul_imengine_setup.cpp 2009-06-09 20:50:27.000000000 -0500
-@@ -37,6 +37,8 @@
- #include <scim.h>
- #include <gtk/scimkeyselection.h>
-
-+#include <cstring>
-+
- #ifdef HAVE_GETTEXT
- #include <libintl.h>
- #define _(String) dgettext(GETTEXT_PACKAGE,String)
diff --git a/source/x/scim-hangul/scim-hangul.gcc47.diff b/source/x/scim-hangul/scim-hangul.gcc47.diff
deleted file mode 100644
index 7e0c52c6d..000000000
--- a/source/x/scim-hangul/scim-hangul.gcc47.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/scim_hangul_imengine.cpp.orig 2012-05-11 22:51:39.653751057 -0500
-+++ ./src/scim_hangul_imengine.cpp 2012-05-11 22:53:45.793739278 -0500
-@@ -33,6 +33,8 @@
- #include <config.h>
- #endif
-
-+#include <unistd.h>
-+
- #include <scim.h>
- #include "scim_hangul_imengine.h"
-
diff --git a/source/x/scim-input-pad/scim-input-pad.SlackBuild b/source/x/scim-input-pad/scim-input-pad.SlackBuild
index e5985946f..3f4b82d33 100755
--- a/source/x/scim-input-pad/scim-input-pad.SlackBuild
+++ b/source/x/scim-input-pad/scim-input-pad.SlackBuild
@@ -26,13 +26,13 @@
PKGNAM=scim-input-pad
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
@@ -41,8 +41,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/x/scim-m17n/scim-m17n.SlackBuild b/source/x/scim-m17n/scim-m17n.SlackBuild
index cf0602216..cc4fd9c57 100755
--- a/source/x/scim-m17n/scim-m17n.SlackBuild
+++ b/source/x/scim-m17n/scim-m17n.SlackBuild
@@ -40,8 +40,8 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
@@ -50,8 +50,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/x/scim-pinyin/scim-pinyin.SlackBuild b/source/x/scim-pinyin/scim-pinyin.SlackBuild
index 9eefad63d..87fa81d2d 100755
--- a/source/x/scim-pinyin/scim-pinyin.SlackBuild
+++ b/source/x/scim-pinyin/scim-pinyin.SlackBuild
@@ -23,7 +23,7 @@
# SUCH DAMAGE.
# -----------------------------------------------------------------------------
#
-# Slackware SlackBuild script
+# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers <alien@slackware.com>
# For: scim-pinyin
@@ -36,21 +36,21 @@
PKGNAM=scim-pinyin
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
NUMJOBS=${NUMJOBS:-" -j7 "}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -68,12 +68,9 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar -xvf $CWD/${PKGNAM}-${VERSION}.tar.gz || exit 1
+tar -xvf $CWD/${PKGNAM}-${VERSION}.tar.?z* || exit 1
cd ${PKGNAM}-${VERSION} || exit 1
-# Apply fix for our gcc 4.3.x
-zcat $CWD/scim-pinyin.gcc43.diff.gz | patch -p1 --verbose || exit 1
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -96,22 +93,6 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make DESTDIR=$PKG install || exit 1
-#cd skim
-#echo Building skim ...
-#CFLAGS="$SLKCFLAGS" \
-#./configure \
-# --prefix=$(kde-config --prefix) \
-# --localstatedir=/var \
-# --sysconfdir=/etc \
-# --disable-static \
-# --without-arts \
-# --program-prefix= \
-# --program-suffix= \
-# --build=$ARCH-slackware-linux
-#make $NUMJOBS || make || exit 1
-#make DESTDIR=$PKG install || exit 1
-#cd -
-
# Add documentation:
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
diff --git a/source/x/scim-pinyin/scim-pinyin.gcc43.diff b/source/x/scim-pinyin/scim-pinyin.gcc43.diff
deleted file mode 100644
index 6f9bd3879..000000000
--- a/source/x/scim-pinyin/scim-pinyin.gcc43.diff
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Naur scim-pinyin-0.5.91.orig/src/scim_phrase.cpp scim-pinyin-0.5.91/src/scim_phrase.cpp
---- scim-pinyin-0.5.91.orig/src/scim_phrase.cpp 2005-01-06 22:30:58.000000000 +0900
-+++ scim-pinyin-0.5.91/src/scim_phrase.cpp 2008-06-21 13:16:32.000000000 +0900
-@@ -27,6 +27,7 @@
-
- #define SCIM_PHRASE_MAX_RELATION 1000
-
-+#include <cstring>
- #include <scim.h>
- #include "scim_pinyin_private.h"
- #include "scim_phrase.h"
-diff -Naur scim-pinyin-0.5.91.orig/src/scim_pinyin.cpp scim-pinyin-0.5.91/src/scim_pinyin.cpp
---- scim-pinyin-0.5.91.orig/src/scim_pinyin.cpp 2005-08-08 15:11:16.000000000 +0900
-+++ scim-pinyin-0.5.91/src/scim_pinyin.cpp 2008-06-21 13:16:30.000000000 +0900
-@@ -28,6 +28,7 @@
- #define Uses_SCIM_CONFIG_PATH
- #define Uses_SCIM_LOOKUP_TABLE
-
-+#include <cstring>
- #include <scim.h>
- #include "scim_pinyin.h"
-
-diff -Naur scim-pinyin-0.5.91.orig/src/scim_pinyin_phrase.cpp scim-pinyin-0.5.91/src/scim_pinyin_phrase.cpp
---- scim-pinyin-0.5.91.orig/src/scim_pinyin_phrase.cpp 2005-08-06 21:06:49.000000000 +0900
-+++ scim-pinyin-0.5.91/src/scim_pinyin_phrase.cpp 2008-06-21 13:21:13.000000000 +0900
-@@ -26,6 +26,7 @@
- #define Uses_SCIM_CONFIG_PATH
- #define Uses_SCIM_LOOKUP_TABLE
-
-+#include <cstring>
- #include <scim.h>
- #include "scim_pinyin_private.h"
- #include "scim_phrase.h"
-diff -Naur scim-pinyin-0.5.91.orig/src/scim_special_table.cpp scim-pinyin-0.5.91/src/scim_special_table.cpp
---- scim-pinyin-0.5.91.orig/src/scim_special_table.cpp 2005-01-06 22:31:02.000000000 +0900
-+++ scim-pinyin-0.5.91/src/scim_special_table.cpp 2008-06-21 13:25:25.000000000 +0900
-@@ -20,6 +20,7 @@
- #define Uses_STL_IOMANIP
- #define Uscs_C_STRING
-
-+#include <cstring>
- #include <time.h>
- #include <scim.h>
- #include "scim_pinyin_private.h"
diff --git a/source/x/scim-tables/scim-tables.SlackBuild b/source/x/scim-tables/scim-tables.SlackBuild
index a6d219c2b..be6bef8e6 100755
--- a/source/x/scim-tables/scim-tables.SlackBuild
+++ b/source/x/scim-tables/scim-tables.SlackBuild
@@ -23,7 +23,7 @@
# SUCH DAMAGE.
# -----------------------------------------------------------------------------
#
-# Slackware SlackBuild script
+# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers <alien@slackware.com>
# For: scim-tables
@@ -35,13 +35,13 @@
PKGNAM=scim-tables
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
@@ -50,8 +50,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -75,7 +75,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar -xvf $CWD/${PKGNAM}-${VERSION}.tar.gz || exit 1
+tar -xvf $CWD/${PKGNAM}-${VERSION}.tar.?z* || exit 1
cd ${PKGNAM}-${VERSION} || exit 1
chown -R root:root .
find . \
@@ -85,6 +85,9 @@ find . \
-exec chmod 644 {} \;
echo Building ...
+
+./bootstrap
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/x/scim/scim-disable-subdir-objects.patch b/source/x/scim/scim-disable-subdir-objects.patch
new file mode 100644
index 000000000..f5327df53
--- /dev/null
+++ b/source/x/scim/scim-disable-subdir-objects.patch
@@ -0,0 +1,22 @@
+From 88fbabed7dc236642021f8263f1b25bf67c6806e Mon Sep 17 00:00:00 2001
+From: Tz-Huan Huang <tzhuan@gmail.com>
+Date: Fri, 24 Oct 2014 13:12:32 +0800
+Subject: [PATCH] Disable subdir-objects
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3d89eb1..f3901ba 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -78,7 +78,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain])
+ ###########################################################
+
+ # Init automake stuff
+-AM_INIT_AUTOMAKE([subdir-objects])
++AM_INIT_AUTOMAKE([])
+ AM_CONFIG_HEADER([config.h])
+
+ # Init libtool
diff --git a/source/x/scim/scim.SlackBuild b/source/x/scim/scim.SlackBuild
index 816a50018..53c665cca 100755
--- a/source/x/scim/scim.SlackBuild
+++ b/source/x/scim/scim.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2006, 2007, 2008 Eric Hameleers, Eindhoven, NL
-# Copyright 2008, 2009, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN USA
+# Copyright 2008, 2009, 2011, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, MN USA
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -23,7 +23,7 @@
# SUCH DAMAGE.
# -----------------------------------------------------------------------------
#
-# Slackware SlackBuild script
+# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers <alien@slackware.com>
# For: scim
@@ -35,21 +35,21 @@
PKGNAM=scim
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -79,6 +79,11 @@ rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-${VERSION}.tar.?z* || exit 1
cd ${PKGNAM}-${VERSION} || exit 1
+# Upstream patch to fix crashes in gtk3 apps.
+zcat $CWD/scim-disable-subdir-objects.patch.gz | patch -p1 --verbose || exit 1
+
+./bootstrap
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/source/x/x11/arch.use.flags b/source/x/x11/arch.use.flags
index f28a6ccab..11087c884 100644
--- a/source/x/x11/arch.use.flags
+++ b/source/x/x11/arch.use.flags
@@ -1,5 +1,7 @@
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/source/x/x11/build/appres b/source/x/x11/build/appres
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/appres
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/bdftopcf b/source/x/x11/build/bdftopcf
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/bdftopcf
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/beforelight b/source/x/x11/build/beforelight
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/beforelight
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/bitmap b/source/x/x11/build/bitmap
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/bitmap
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/compiz b/source/x/x11/build/compiz
new file mode 100644
index 000000000..b8626c4cf
--- /dev/null
+++ b/source/x/x11/build/compiz
@@ -0,0 +1 @@
+4
diff --git a/source/x/x11/build/dri2proto b/source/x/x11/build/dri2proto
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/dri2proto
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/dri3proto b/source/x/x11/build/dri3proto
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/dri3proto
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/editres b/source/x/x11/build/editres
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/editres
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/fixesproto b/source/x/x11/build/fixesproto
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/fixesproto
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/font-util b/source/x/x11/build/font-util
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/font-util
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/fonttosfnt b/source/x/x11/build/fonttosfnt
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/fonttosfnt
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/fslsfonts b/source/x/x11/build/fslsfonts
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/fslsfonts
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/fstobdf b/source/x/x11/build/fstobdf
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/fstobdf
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/iceauth b/source/x/x11/build/iceauth
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/iceauth
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/ico b/source/x/x11/build/ico
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/ico
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/imake b/source/x/x11/build/imake
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/imake
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/increment-all-drivers.sh b/source/x/x11/build/increment-all-drivers.sh
new file mode 100755
index 000000000..b3f7cbbab
--- /dev/null
+++ b/source/x/x11/build/increment-all-drivers.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+# A script to increment build numbers of all the drivers.
+# This is used when upgrading to a new major version of the X server.
+#
+# Any drivers that are newly added should not have a build file in
+# here (or it should contain "1"). The usual method is to run this
+# script and then remove the build files for any new driver versions.
+
+for DRVSRC in ../src/driver/* ; do
+ DRVBASENAME=$(basename $DRVSRC | rev | cut -f 2- -d - | rev)
+ ./increment.sh $DRVBASENAME
+done
+
diff --git a/source/x/x11/build/intel-gpu-tools b/source/x/x11/build/intel-gpu-tools
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/intel-gpu-tools
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libICE b/source/x/x11/build/libICE
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libICE
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libSM b/source/x/x11/build/libSM
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libSM
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libX11 b/source/x/x11/build/libX11
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libX11
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXScrnSaver b/source/x/x11/build/libXScrnSaver
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXScrnSaver
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXau b/source/x/x11/build/libXau
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXau
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXaw3d b/source/x/x11/build/libXaw3d
index 0cfbf0888..00750edc0 100644
--- a/source/x/x11/build/libXaw3d
+++ b/source/x/x11/build/libXaw3d
@@ -1 +1 @@
-2
+3
diff --git a/source/x/x11/build/libXcm b/source/x/x11/build/libXcm
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXcm
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXcomposite b/source/x/x11/build/libXcomposite
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXcomposite
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXcursor b/source/x/x11/build/libXcursor
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXcursor
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXdamage b/source/x/x11/build/libXdamage
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXdamage
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXdmcp b/source/x/x11/build/libXdmcp
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXdmcp
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXevie b/source/x/x11/build/libXevie
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXevie
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXext b/source/x/x11/build/libXext
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXext
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXfont b/source/x/x11/build/libXfont
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXfont
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXfontcache b/source/x/x11/build/libXfontcache
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXfontcache
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXft b/source/x/x11/build/libXft
new file mode 100644
index 000000000..00750edc0
--- /dev/null
+++ b/source/x/x11/build/libXft
@@ -0,0 +1 @@
+3
diff --git a/source/x/x11/build/libXinerama b/source/x/x11/build/libXinerama
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXinerama
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXmu b/source/x/x11/build/libXmu
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXmu
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXp b/source/x/x11/build/libXp
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXp
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXpm b/source/x/x11/build/libXpm
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXpm
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXres b/source/x/x11/build/libXres
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXres
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXtst b/source/x/x11/build/libXtst
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXtst
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXv b/source/x/x11/build/libXv
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXv
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXvMC b/source/x/x11/build/libXvMC
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXvMC
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXxf86dga b/source/x/x11/build/libXxf86dga
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXxf86dga
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXxf86misc b/source/x/x11/build/libXxf86misc
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXxf86misc
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libXxf86vm b/source/x/x11/build/libXxf86vm
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libXxf86vm
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libdmx b/source/x/x11/build/libdmx
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libdmx
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/libxshmfence b/source/x/x11/build/libxshmfence
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/libxshmfence
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/listres b/source/x/x11/build/listres
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/listres
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/lndir b/source/x/x11/build/lndir
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/lndir
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/luit b/source/x/x11/build/luit
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/luit
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/makedepend b/source/x/x11/build/makedepend
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/makedepend
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/mkcomposecache b/source/x/x11/build/mkcomposecache
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/mkcomposecache
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/mkfontscale b/source/x/x11/build/mkfontscale
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/mkfontscale
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/oclock b/source/x/x11/build/oclock
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/oclock
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/presentproto b/source/x/x11/build/presentproto
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/presentproto
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/rgb b/source/x/x11/build/rgb
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/rgb
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/sessreg b/source/x/x11/build/sessreg
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/sessreg
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/showfont b/source/x/x11/build/showfont
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/showfont
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/transset b/source/x/x11/build/transset
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/transset
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/viewres b/source/x/x11/build/viewres
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/viewres
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xauth b/source/x/x11/build/xauth
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xauth
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xbacklight b/source/x/x11/build/xbacklight
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xbacklight
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xbiff b/source/x/x11/build/xbiff
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xbiff
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xbitmaps b/source/x/x11/build/xbitmaps
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xbitmaps
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xcalc b/source/x/x11/build/xcalc
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xcalc
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xcb-proto b/source/x/x11/build/xcb-proto
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xcb-proto
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xcb-util b/source/x/x11/build/xcb-util
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xcb-util
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xcb-util-cursor b/source/x/x11/build/xcb-util-cursor
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xcb-util-cursor
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xcb-util-keysyms b/source/x/x11/build/xcb-util-keysyms
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xcb-util-keysyms
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xcb-util-renderutil b/source/x/x11/build/xcb-util-renderutil
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xcb-util-renderutil
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xcb-util-wm b/source/x/x11/build/xcb-util-wm
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xcb-util-wm
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xclipboard b/source/x/x11/build/xclipboard
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xclipboard
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xclock b/source/x/x11/build/xclock
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xclock
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xcm b/source/x/x11/build/xcm
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xcm
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xconsole b/source/x/x11/build/xconsole
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xconsole
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xcursorgen b/source/x/x11/build/xcursorgen
new file mode 100644
index 000000000..00750edc0
--- /dev/null
+++ b/source/x/x11/build/xcursorgen
@@ -0,0 +1 @@
+3
diff --git a/source/x/x11/build/xdbedizzy b/source/x/x11/build/xdbedizzy
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xdbedizzy
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xdm b/source/x/x11/build/xdm
index b8626c4cf..1e8b31496 100644
--- a/source/x/x11/build/xdm
+++ b/source/x/x11/build/xdm
@@ -1 +1 @@
-4
+6
diff --git a/source/x/x11/build/xedit b/source/x/x11/build/xedit
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xedit
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xextproto b/source/x/x11/build/xextproto
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xextproto
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xeyes b/source/x/x11/build/xeyes
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xeyes
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xf86-input-acecad b/source/x/x11/build/xf86-input-acecad
index 7ed6ff82d..ec635144f 100644
--- a/source/x/x11/build/xf86-input-acecad
+++ b/source/x/x11/build/xf86-input-acecad
@@ -1 +1 @@
-5
+9
diff --git a/source/x/x11/build/xf86-input-aiptek b/source/x/x11/build/xf86-input-aiptek
index 7ed6ff82d..ec635144f 100644
--- a/source/x/x11/build/xf86-input-aiptek
+++ b/source/x/x11/build/xf86-input-aiptek
@@ -1 +1 @@
-5
+9
diff --git a/source/x/x11/build/xf86-input-joystick b/source/x/x11/build/xf86-input-joystick
index 7ed6ff82d..ec635144f 100644
--- a/source/x/x11/build/xf86-input-joystick
+++ b/source/x/x11/build/xf86-input-joystick
@@ -1 +1 @@
-5
+9
diff --git a/source/x/x11/build/xf86-input-keyboard b/source/x/x11/build/xf86-input-keyboard
index 00750edc0..0cfbf0888 100644
--- a/source/x/x11/build/xf86-input-keyboard
+++ b/source/x/x11/build/xf86-input-keyboard
@@ -1 +1 @@
-3
+2
diff --git a/source/x/x11/build/xf86-input-mouse b/source/x/x11/build/xf86-input-mouse
index 00750edc0..b8626c4cf 100644
--- a/source/x/x11/build/xf86-input-mouse
+++ b/source/x/x11/build/xf86-input-mouse
@@ -1 +1 @@
-3
+4
diff --git a/source/x/x11/build/xf86-input-penmount b/source/x/x11/build/xf86-input-penmount
index 7ed6ff82d..ec635144f 100644
--- a/source/x/x11/build/xf86-input-penmount
+++ b/source/x/x11/build/xf86-input-penmount
@@ -1 +1 @@
-5
+9
diff --git a/source/x/x11/build/xf86-input-void b/source/x/x11/build/xf86-input-void
index 7ed6ff82d..ec635144f 100644
--- a/source/x/x11/build/xf86-input-void
+++ b/source/x/x11/build/xf86-input-void
@@ -1 +1 @@
-5
+9
diff --git a/source/x/x11/build/xf86-video-apm b/source/x/x11/build/xf86-video-apm
index b8626c4cf..45a4fb75d 100644
--- a/source/x/x11/build/xf86-video-apm
+++ b/source/x/x11/build/xf86-video-apm
@@ -1 +1 @@
-4
+8
diff --git a/source/x/x11/build/xf86-video-ark b/source/x/x11/build/xf86-video-ark
index b8626c4cf..45a4fb75d 100644
--- a/source/x/x11/build/xf86-video-ark
+++ b/source/x/x11/build/xf86-video-ark
@@ -1 +1 @@
-4
+8
diff --git a/source/x/x11/build/xf86-video-chips b/source/x/x11/build/xf86-video-chips
index b8626c4cf..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-chips
+++ b/source/x/x11/build/xf86-video-chips
@@ -1 +1 @@
-4
+2
diff --git a/source/x/x11/build/xf86-video-cirrus b/source/x/x11/build/xf86-video-cirrus
index b8626c4cf..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-cirrus
+++ b/source/x/x11/build/xf86-video-cirrus
@@ -1 +1 @@
-4
+2
diff --git a/source/x/x11/build/xf86-video-dummy b/source/x/x11/build/xf86-video-dummy
new file mode 100644
index 000000000..7ed6ff82d
--- /dev/null
+++ b/source/x/x11/build/xf86-video-dummy
@@ -0,0 +1 @@
+5
diff --git a/source/x/x11/build/xf86-video-glint b/source/x/x11/build/xf86-video-glint
index b8626c4cf..45a4fb75d 100644
--- a/source/x/x11/build/xf86-video-glint
+++ b/source/x/x11/build/xf86-video-glint
@@ -1 +1 @@
-4
+8
diff --git a/source/x/x11/build/xf86-video-i128 b/source/x/x11/build/xf86-video-i128
index b8626c4cf..45a4fb75d 100644
--- a/source/x/x11/build/xf86-video-i128
+++ b/source/x/x11/build/xf86-video-i128
@@ -1 +1 @@
-4
+8
diff --git a/source/x/x11/build/xf86-video-i740 b/source/x/x11/build/xf86-video-i740
index b8626c4cf..00750edc0 100644
--- a/source/x/x11/build/xf86-video-i740
+++ b/source/x/x11/build/xf86-video-i740
@@ -1 +1 @@
-4
+3
diff --git a/source/x/x11/build/xf86-video-mach64 b/source/x/x11/build/xf86-video-mach64
index b8626c4cf..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-mach64
+++ b/source/x/x11/build/xf86-video-mach64
@@ -1 +1 @@
-4
+2
diff --git a/source/x/x11/build/xf86-video-mga b/source/x/x11/build/xf86-video-mga
index b8626c4cf..00750edc0 100644
--- a/source/x/x11/build/xf86-video-mga
+++ b/source/x/x11/build/xf86-video-mga
@@ -1 +1 @@
-4
+3
diff --git a/source/x/x11/build/xf86-video-nv b/source/x/x11/build/xf86-video-nv
index 7ed6ff82d..ec635144f 100644
--- a/source/x/x11/build/xf86-video-nv
+++ b/source/x/x11/build/xf86-video-nv
@@ -1 +1 @@
-5
+9
diff --git a/source/x/x11/build/xf86-video-omap b/source/x/x11/build/xf86-video-omap
index b8626c4cf..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-omap
+++ b/source/x/x11/build/xf86-video-omap
@@ -1 +1 @@
-4
+2
diff --git a/source/x/x11/build/xf86-video-s3 b/source/x/x11/build/xf86-video-s3
index b8626c4cf..45a4fb75d 100644
--- a/source/x/x11/build/xf86-video-s3
+++ b/source/x/x11/build/xf86-video-s3
@@ -1 +1 @@
-4
+8
diff --git a/source/x/x11/build/xf86-video-s3virge b/source/x/x11/build/xf86-video-s3virge
index 7ed6ff82d..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-s3virge
+++ b/source/x/x11/build/xf86-video-s3virge
@@ -1 +1 @@
-5
+2
diff --git a/source/x/x11/build/xf86-video-savage b/source/x/x11/build/xf86-video-savage
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xf86-video-savage
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xf86-video-siliconmotion b/source/x/x11/build/xf86-video-siliconmotion
index 7ed6ff82d..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-siliconmotion
+++ b/source/x/x11/build/xf86-video-siliconmotion
@@ -1 +1 @@
-5
+2
diff --git a/source/x/x11/build/xf86-video-sis b/source/x/x11/build/xf86-video-sis
index b8626c4cf..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-sis
+++ b/source/x/x11/build/xf86-video-sis
@@ -1 +1 @@
-4
+2
diff --git a/source/x/x11/build/xf86-video-sisusb b/source/x/x11/build/xf86-video-sisusb
index b8626c4cf..45a4fb75d 100644
--- a/source/x/x11/build/xf86-video-sisusb
+++ b/source/x/x11/build/xf86-video-sisusb
@@ -1 +1 @@
-4
+8
diff --git a/source/x/x11/build/xf86-video-tdfx b/source/x/x11/build/xf86-video-tdfx
index b8626c4cf..00750edc0 100644
--- a/source/x/x11/build/xf86-video-tdfx
+++ b/source/x/x11/build/xf86-video-tdfx
@@ -1 +1 @@
-4
+3
diff --git a/source/x/x11/build/xf86-video-tga b/source/x/x11/build/xf86-video-tga
index b8626c4cf..45a4fb75d 100644
--- a/source/x/x11/build/xf86-video-tga
+++ b/source/x/x11/build/xf86-video-tga
@@ -1 +1 @@
-4
+8
diff --git a/source/x/x11/build/xf86-video-trident b/source/x/x11/build/xf86-video-trident
index b8626c4cf..00750edc0 100644
--- a/source/x/x11/build/xf86-video-trident
+++ b/source/x/x11/build/xf86-video-trident
@@ -1 +1 @@
-4
+3
diff --git a/source/x/x11/build/xf86-video-tseng b/source/x/x11/build/xf86-video-tseng
index b8626c4cf..45a4fb75d 100644
--- a/source/x/x11/build/xf86-video-tseng
+++ b/source/x/x11/build/xf86-video-tseng
@@ -1 +1 @@
-4
+8
diff --git a/source/x/x11/build/xf86-video-v4l b/source/x/x11/build/xf86-video-v4l
index ec635144f..b1bd38b62 100644
--- a/source/x/x11/build/xf86-video-v4l
+++ b/source/x/x11/build/xf86-video-v4l
@@ -1 +1 @@
-9
+13
diff --git a/source/x/x11/build/xf86-video-vesa b/source/x/x11/build/xf86-video-vesa
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xf86-video-vesa
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xf86-video-vmware b/source/x/x11/build/xf86-video-vmware
index b8626c4cf..7f8f011eb 100644
--- a/source/x/x11/build/xf86-video-vmware
+++ b/source/x/x11/build/xf86-video-vmware
@@ -1 +1 @@
-4
+7
diff --git a/source/x/x11/build/xf86-video-voodoo b/source/x/x11/build/xf86-video-voodoo
index 7ed6ff82d..ec635144f 100644
--- a/source/x/x11/build/xf86-video-voodoo
+++ b/source/x/x11/build/xf86-video-voodoo
@@ -1 +1 @@
-5
+9
diff --git a/source/x/x11/build/xf86-video-xgi b/source/x/x11/build/xf86-video-xgi
index b8626c4cf..0cfbf0888 100644
--- a/source/x/x11/build/xf86-video-xgi
+++ b/source/x/x11/build/xf86-video-xgi
@@ -1 +1 @@
-4
+2
diff --git a/source/x/x11/build/xf86-video-xgixp b/source/x/x11/build/xf86-video-xgixp
index b8626c4cf..45a4fb75d 100644
--- a/source/x/x11/build/xf86-video-xgixp
+++ b/source/x/x11/build/xf86-video-xgixp
@@ -1 +1 @@
-4
+8
diff --git a/source/x/x11/build/xf86dga b/source/x/x11/build/xf86dga
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xf86dga
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xfd b/source/x/x11/build/xfd
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xfd
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xfontsel b/source/x/x11/build/xfontsel
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xfontsel
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xfs b/source/x/x11/build/xfs
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xfs
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xfsinfo b/source/x/x11/build/xfsinfo
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xfsinfo
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xinit b/source/x/x11/build/xinit
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xinit
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xkbcomp b/source/x/x11/build/xkbcomp
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xkbcomp
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xkbutils b/source/x/x11/build/xkbutils
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xkbutils
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xkill b/source/x/x11/build/xkill
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xkill
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xload b/source/x/x11/build/xload
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xload
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xlogo b/source/x/x11/build/xlogo
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xlogo
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xlsclients b/source/x/x11/build/xlsclients
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xlsclients
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xman b/source/x/x11/build/xman
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xman
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xmessage b/source/x/x11/build/xmessage
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xmessage
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xmore b/source/x/x11/build/xmore
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xmore
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xorg-cf-files b/source/x/x11/build/xorg-cf-files
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xorg-cf-files
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xorg-sgml-doctools b/source/x/x11/build/xorg-sgml-doctools
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xorg-sgml-doctools
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xpr b/source/x/x11/build/xpr
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xpr
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xprop b/source/x/x11/build/xprop
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xprop
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xpyb b/source/x/x11/build/xpyb
index 0cfbf0888..00750edc0 100644
--- a/source/x/x11/build/xpyb
+++ b/source/x/x11/build/xpyb
@@ -1 +1 @@
-2
+3
diff --git a/source/x/x11/build/xrdb b/source/x/x11/build/xrdb
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xrdb
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xrefresh b/source/x/x11/build/xrefresh
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xrefresh
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xscope b/source/x/x11/build/xscope
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xscope
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xset b/source/x/x11/build/xset
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xset
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xsetroot b/source/x/x11/build/xsetroot
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xsetroot
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xsm b/source/x/x11/build/xsm
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xsm
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xstdcmap b/source/x/x11/build/xstdcmap
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xstdcmap
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xvidtune b/source/x/x11/build/xvidtune
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xvidtune
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xwd b/source/x/x11/build/xwd
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xwd
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xwininfo b/source/x/x11/build/xwininfo
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xwininfo
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/build/xwud b/source/x/x11/build/xwud
new file mode 100644
index 000000000..0cfbf0888
--- /dev/null
+++ b/source/x/x11/build/xwud
@@ -0,0 +1 @@
+2
diff --git a/source/x/x11/configure/autogen b/source/x/x11/configure/autogen
new file mode 100644
index 000000000..291eb9b94
--- /dev/null
+++ b/source/x/x11/configure/autogen
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./autogen.sh \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/source/x/x11/configure/configure b/source/x/x11/configure/configure
index 0f3bccf24..dcb1109bd 100644
--- a/source/x/x11/configure/configure
+++ b/source/x/x11/configure/configure
@@ -8,5 +8,6 @@ CXXFLAGS=$SLKCFLAGS \
--infodir=/usr/info \
--mandir=/usr/man \
--docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
--disable-static \
--build=$ARCH-slackware-linux
diff --git a/source/x/x11/configure/xf86-input-vmmouse b/source/x/x11/configure/intel-gpu-tools
index 1ac863519..d996de5c3 100644
--- a/source/x/x11/configure/xf86-input-vmmouse
+++ b/source/x/x11/configure/intel-gpu-tools
@@ -7,8 +7,7 @@ CXXFLAGS=$SLKCFLAGS \
--localstatedir=/var \
--infodir=/usr/info \
--mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
--disable-static \
- --with-hal-bin-dir=none \
- --with-hal-callouts-dir=none \
- --with-hal-fdi-dir=none \
+ --disable-dumper \
--build=$ARCH-slackware-linux
diff --git a/source/x/x11/configure/libxcb b/source/x/x11/configure/libxcb
new file mode 100644
index 000000000..0c8a4a8c8
--- /dev/null
+++ b/source/x/x11/configure/libxcb
@@ -0,0 +1,14 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --disable-static \
+ --enable-xinput \
+ --enable-xkb \
+ --build=$ARCH-slackware-linux
diff --git a/source/x/x11/configure/libxshmfence b/source/x/x11/configure/libxshmfence
new file mode 100644
index 000000000..ec0521d86
--- /dev/null
+++ b/source/x/x11/configure/libxshmfence
@@ -0,0 +1,15 @@
+# Of course, the libtool stuff included in the tarball is broken :/
+autoreconf -v -i -f
+
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/source/x/x11/configure/xf86-video-intel b/source/x/x11/configure/xf86-video-intel
new file mode 100644
index 000000000..d744b3290
--- /dev/null
+++ b/source/x/x11/configure/xf86-video-intel
@@ -0,0 +1,14 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./autogen.sh \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --disable-static \
+ --enable-kms-only \
+ --enable-uxa \
+ --build=$ARCH-slackware-linux
diff --git a/source/x/x11/configure/xf86-video-nouveau b/source/x/x11/configure/xf86-video-nouveau
new file mode 100644
index 000000000..0f3bccf24
--- /dev/null
+++ b/source/x/x11/configure/xf86-video-nouveau
@@ -0,0 +1,12 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/source/x/x11/configure/xorg-server b/source/x/x11/configure/xorg-server
index b62befbae..755b565dd 100644
--- a/source/x/x11/configure/xorg-server
+++ b/source/x/x11/configure/xorg-server
@@ -3,17 +3,25 @@ BUILD_SERVERS="--enable-xorg \
--enable-dmx \
--enable-xvfb \
--enable-xnest \
+ --enable-glamor \
--enable-kdrive \
--enable-xephyr \
--enable-xfbdev \
--enable-config-udev \
- --disable-config-hal"
+ --enable-kdrive-evdev \
+ --enable-kdrive-kbd \
+ --enable-kdrive-mouse \
+ --disable-config-hal \
+ --disable-systemd-logind"
-MESA_VERSION=${MESA_VERSION:-7.5} # unused in 1.7+
+#MESA_VERSION=${MESA_VERSION:-7.5} # unused in 1.7+
# Default font paths to be used by the X server
DEF_FONTPATH="/usr/share/fonts/local,/usr/share/fonts/TTF,/usr/share/fonts/OTF,/usr/share/fonts/Type1,/usr/share/fonts/misc,/usr/share/fonts/CID,/usr/share/fonts/75dpi/:unscaled,/usr/share/fonts/100dpi/:unscaled,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/cyrillic"
+# Reconf (don't remove this plz):
+autoreconf -vif
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -24,10 +32,11 @@ CFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--disable-static \
--with-pic \
+ --enable-suid-wrapper \
--with-int10=x86emu \
--with-default-font-path="${DEF_FONTPATH}" \
--with-module-dir=/usr/lib${LIBDIRSUFFIX}/xorg/modules \
- --with-os-name="Slackware 14.1" \
+ --with-os-name="Slackware 14.2" \
--with-os-vendor="Slackware Linux Project" \
--with-xkb-path=/etc/X11/xkb \
--with-xkb-output=/var/lib/xkb \
diff --git a/source/x/x11/makepkg/xorg-server b/source/x/x11/makepkg/xorg-server
index 4f47738e1..13d601edc 100644
--- a/source/x/x11/makepkg/xorg-server
+++ b/source/x/x11/makepkg/xorg-server
@@ -38,5 +38,10 @@ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
/sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-xvfb-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
/sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-xephyr-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
/sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-xnest-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-xvfb-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-xephyr-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
fi
diff --git a/source/x/x11/modularize b/source/x/x11/modularize
index 38762ffda..8a28ed93e 100644
--- a/source/x/x11/modularize
+++ b/source/x/x11/modularize
@@ -11,6 +11,7 @@ compositeproto
damageproto
dmxproto
dri2proto
+dri3proto
editres
encodings
evieext
@@ -58,6 +59,7 @@ fonttosfnt
fslsfonts
fstobdf
gccmakedep
+glamor-egl
glproto
iceauth
ico
@@ -89,6 +91,7 @@ libXinerama
libXmu
libXp
libXpm
+libXpresent
libXrandr
libXrender
libXres
@@ -105,6 +108,7 @@ libpciaccess
libpthread-stubs
libxcb
libxkbfile
+libxshmfence
listres
lndir
luit
@@ -114,6 +118,7 @@ mkfontdir
mkfontscale
oclock
pixman
+presentproto
printproto
randrproto
recordproto
@@ -140,6 +145,7 @@ xcalc
xcb-proto
xcb-util
xcb-util-cursor
+xcb-util-errors
xcb-util-image
xcb-util-keysyms
xcb-util-renderutil
@@ -173,6 +179,7 @@ xf86-input-synaptics
xf86-input-vmmouse
xf86-input-void
xf86-input-wacom
+xf86-video-amdgpu
xf86-video-apm
xf86-video-ark
xf86-video-ast
diff --git a/source/x/x11/noarch b/source/x/x11/noarch
index 480ffc26c..8785ee527 100644
--- a/source/x/x11/noarch
+++ b/source/x/x11/noarch
@@ -70,7 +70,6 @@ xf86miscproto
xf86vidmodeproto
xineramaproto
xkeyboard-config
-xorg-cf-files
xorg-docs
xproto
xtrans
diff --git a/source/x/x11/package-blacklist b/source/x/x11/package-blacklist
index 8e2f3eb5c..603b8c31f 100644
--- a/source/x/x11/package-blacklist
+++ b/source/x/x11/package-blacklist
@@ -28,6 +28,7 @@ xf86-video-via
xkbdata
xphelloworld
xrx
+xf86-video-modesetting
# Not applicable to us
grandr
diff --git a/source/x/x11/patch/luit.patch b/source/x/x11/patch/luit.patch
new file mode 100644
index 000000000..871e17bc3
--- /dev/null
+++ b/source/x/x11/patch/luit.patch
@@ -0,0 +1,3 @@
+zcat $CWD/patch/luit/luit_use_system_extensions.diff.gz | patch -p1 --verbose \
+ || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+autoreconf -v -i -f
diff --git a/source/x/x11/patch/luit/luit_use_system_extensions.diff b/source/x/x11/patch/luit/luit_use_system_extensions.diff
new file mode 100644
index 000000000..24f1791e6
--- /dev/null
+++ b/source/x/x11/patch/luit/luit_use_system_extensions.diff
@@ -0,0 +1,38 @@
+--- ./configure.ac.orig 2012-03-22 23:23:07.000000000 -0500
++++ ./configure.ac 2014-07-14 18:22:11.438996085 -0500
+@@ -33,9 +33,7 @@
+ XORG_DEFAULT_OPTIONS
+
+ AC_CONFIG_HEADERS([config.h])
+-
+-AC_CANONICAL_HOST
+-
++AC_USE_SYSTEM_EXTENSIONS
+
+ AC_CHECK_HEADERS([pty.h stropts.h sys/param.h sys/select.h])
+ AC_CHECK_FUNCS([select grantpt posix_openpt])
+@@ -54,23 +52,16 @@
+ PKG_CHECK_EXISTS(x11, [],
+ [AC_MSG_WARN([libX11 not found. luit may not be able to find locale aliases without it.])])
+
++AC_CANONICAL_HOST
+ case $host_os in
+ # darwin has poll() but can't be used to poll character devices (atleast through SnowLeopard)
+ darwin*)
+- OS_CFLAGS=
+- ;;
+- linux*)
+- AC_CHECK_HEADERS([poll.h])
+- AC_CHECK_FUNCS([poll])
+- OS_CFLAGS="-D_XOPEN_SOURCE=500"
+ ;;
+ *)
+ AC_CHECK_HEADERS([poll.h])
+ AC_CHECK_FUNCS([poll])
+- OS_CFLAGS=
+ ;;
+ esac
+-AC_SUBST(OS_CFLAGS)
+
+ AC_CHECK_HEADERS([pty.h stropts.h sys/ioctl.h sys/param.h sys/poll.h sys/select.h sys/time.h termios.h])
+ AC_CHECK_FUNCS([grantpt putenv select strdup])
diff --git a/source/x/x11/patch/xdm.patch b/source/x/x11/patch/xdm.patch
index 75e0dcb92..37be22286 100644
--- a/source/x/x11/patch/xdm.patch
+++ b/source/x/x11/patch/xdm.patch
@@ -1 +1,8 @@
-zcat $CWD/patch/xdm/xdm.glibc.crypt.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xdm/xdm.glibc.crypt.diff.gz | patch -p1 --verbose || \
+ { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xdm/xdm-1.1.11-arc4random-include.patch.gz | patch -p1 --verbose || \
+ { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xdm/xdm-1.1.11-setproctitle-include.patch.gz | patch -p1 --verbose || \
+ { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xdm/xdm-consolekit.patch.gz | patch -p1 --verbose || \
+ { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/x/x11/patch/xdm/xdm-1.1.11-arc4random-include.patch b/source/x/x11/patch/xdm/xdm-1.1.11-arc4random-include.patch
new file mode 100644
index 000000000..db948094b
--- /dev/null
+++ b/source/x/x11/patch/xdm/xdm-1.1.11-arc4random-include.patch
@@ -0,0 +1,18 @@
+diff -ur a/xdm/genauth.c b/xdm/genauth.c
+--- a/xdm/genauth.c 2011-09-25 09:35:47.000000000 +0200
++++ b/xdm/genauth.c 2014-01-06 16:28:09.664060603 +0100
+@@ -40,6 +40,14 @@
+
+ #include <errno.h>
+
++#ifdef HAVE_ARC4RANDOM
++# ifdef __linux__
++# include <bsd/stdlib.h>
++# else
++# include <stdlib.h>
++# endif
++#endif
++
+ #include <time.h>
+ #define Time_t time_t
+
diff --git a/source/x/x11/patch/xdm/xdm-1.1.11-setproctitle-include.patch b/source/x/x11/patch/xdm/xdm-1.1.11-setproctitle-include.patch
new file mode 100644
index 000000000..0a3f32bbe
--- /dev/null
+++ b/source/x/x11/patch/xdm/xdm-1.1.11-setproctitle-include.patch
@@ -0,0 +1,37 @@
+diff -ur a/xdm/choose.c b/xdm/choose.c
+--- a/xdm/choose.c 2011-09-25 09:35:47.000000000 +0200
++++ b/xdm/choose.c 2014-01-06 16:33:09.628065364 +0100
+@@ -54,6 +54,14 @@
+ # include <tiuser.h>
+ # endif
+
++# ifdef HAVE_SETPROCTITLE
++# ifdef __linux__
++# include <bsd/unistd.h>
++# else
++# include <unistd.h>
++# endif
++# endif
++
+ # include <time.h>
+ # define Time_t time_t
+
+diff -ur a/xdm/session.c b/xdm/session.c
+--- a/xdm/session.c 2011-09-25 09:35:47.000000000 +0200
++++ b/xdm/session.c 2014-01-06 16:40:57.508072789 +0100
+@@ -54,6 +54,15 @@
+ # include <usersec.h>
+ #endif
+
++# ifdef HAVE_SETPROCTITLE
++# include <sys/types.h>
++# ifdef __linux__
++# include <bsd/unistd.h>
++# else
++# include <unistd.h>
++# endif
++# endif
++
+ #ifndef USE_PAM /* PAM modules should handle these */
+ # ifdef SECURE_RPC
+ # include <rpc/rpc.h>
diff --git a/source/x/x11/patch/xdm/xdm-consolekit.patch b/source/x/x11/patch/xdm/xdm-consolekit.patch
new file mode 100644
index 000000000..fbacd36fc
--- /dev/null
+++ b/source/x/x11/patch/xdm/xdm-consolekit.patch
@@ -0,0 +1,230 @@
+http://bugs.gentoo.org/360987
+http://projects.archlinux.org/svntogit/packages.git/plain/trunk/xdm-consolekit.patch?h=packages/xorg-xdm
+http://lists.x.org/archives/xorg-devel/2011-February/019615.html
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615020
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -362,6 +362,20 @@
+
+ AM_CONDITIONAL(DYNAMIC_GREETER, test x$DYNAMIC_GREETER = xyes)
+
++# ConsoleKit support
++AC_ARG_WITH(consolekit, AC_HELP_STRING([--with-consolekit], [Use ConsoleKit]),
++ [USE_CONSOLEKIT=$withval], [USE_CONSOLEKIT=yes])
++if test x"$USE_CONSOLEKIT" != xno; then
++ PKG_CHECK_MODULES(CK_CONNECTOR, ck-connector,
++ [USE_CONSOLEKIT=yes], [USE_CONSOLEKIT=no])
++ if test x"$USE_CONSOLEKIT" = xyes; then
++ AC_DEFINE([USE_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit])
++ XDM_CFLAGS="$XDM_CFLAGS $CK_CONNECTOR_CFLAGS -DUSE_CONSOLEKIT"
++ XDM_LIBS="$XDM_LIBS $CK_CONNECTOR_LIBS"
++ fi
++fi
++dnl AM_CONDITIONAL(USE_CONSOLEKIT, test$USE_CONSOLEKIT = xyes)
++
+ #
+ # XDM
+ #
+--- a/xdm/session.c
++++ b/xdm/session.c
+@@ -66,6 +66,11 @@
+ #endif
+ #endif /* USE_PAM */
+
++#ifdef USE_CONSOLEKIT
++#include <ck-connector.h>
++#include <dbus/dbus.h>
++#endif
++
+ #ifdef __SCO__
+ #include <prot.h>
+ #endif
+@@ -472,6 +477,97 @@
+ }
+ }
+
++#ifdef USE_CONSOLEKIT
++
++static CkConnector *connector;
++
++static int openCKSession(struct verify_info *verify, struct display *d)
++{
++ int ret;
++ DBusError error;
++ char *remote_host_name = "";
++ dbus_bool_t is_local;
++ char *display_name = "";
++ char *display_device = "";
++ char devtmp[16];
++
++ if (!use_consolekit)
++ return 1;
++
++ is_local = d->displayType.location == Local;
++ if (d->peerlen > 0 && d->peer)
++ remote_host_name = d->peer;
++ if (d->name)
++ display_name = d->name;
++ /* how can we get the corresponding tty at best...? */
++ if (d->windowPath) {
++ display_device = strchr(d->windowPath, ':');
++ if (display_device && display_device[1])
++ display_device++;
++ else
++ display_device = d->windowPath;
++ snprintf(devtmp, sizeof(devtmp), "/dev/tty%s", display_device);
++ display_device = devtmp;
++ }
++
++ connector = ck_connector_new();
++ if (!connector) {
++ LogOutOfMem("ck_connector");
++ return 0;
++ }
++
++ dbus_error_init(&error);
++ ret = ck_connector_open_session_with_parameters(
++ connector, &error,
++ "unix-user", &verify->uid,
++ "x11-display", &display_name,
++ "x11-display-device", &display_device,
++ "remote-host-name", &remote_host_name,
++ "is-local", &is_local,
++ NULL);
++ if (!ret) {
++ if (dbus_error_is_set(&error)) {
++ LogError("Dbus error: %s\n", error.message);
++ dbus_error_free(&error);
++ } else {
++ LogError("ConsoleKit error\n");
++ }
++ LogError("console-kit-daemon not running?\n");
++ ck_connector_unref(connector);
++ connector = NULL;
++ return 0;
++ }
++
++ verify->userEnviron = setEnv(verify->userEnviron,
++ "XDG_SESSION_COOKIE", ck_connector_get_cookie(connector));
++ return 1;
++}
++
++static void closeCKSession(void)
++{
++ DBusError error;
++
++ if (!connector)
++ return;
++
++ dbus_error_init(&error);
++ if (!ck_connector_close_session(connector, &error)) {
++ if (dbus_error_is_set(&error)) {
++ LogError("Dbus error: %s\n", error.message);
++ dbus_error_free(&error);
++ } else {
++ LogError("ConsoleKit close error\n");
++ }
++ LogError("console-kit-daemon not running?\n");
++ }
++ ck_connector_unref(connector);
++ connector = NULL;
++}
++#else
++#define openCKSession(v,d) 1
++#define closeCKSession()
++#endif
++
+ void
+ SessionExit (struct display *d, int status, int removeAuth)
+ {
+@@ -486,6 +580,8 @@
+ }
+ #endif
+
++ closeCKSession();
++
+ /* make sure the server gets reset after the session is over */
+ if (d->serverPid >= 2 && d->resetSignal)
+ kill (d->serverPid, d->resetSignal);
+@@ -568,6 +664,10 @@
+ #ifdef USE_PAM
+ if (pamh) pam_open_session(pamh, 0);
+ #endif
++
++ if (!openCKSession(verify, d))
++ return 0;
++
+ switch (pid = fork ()) {
+ case 0:
+ CleanUpChild ();
+--- a/include/dm.h
++++ b/include/dm.h
+@@ -325,6 +325,9 @@
+ extern char *prngdSocket;
+ extern int prngdPort;
+ # endif
++#ifdef USE_CONSOLEKIT
++extern int use_consolekit;
++#endif
+
+ extern char *greeterLib;
+ extern char *willing;
+--- a/xdm/resource.c
++++ b/xdm/resource.c
+@@ -68,6 +68,9 @@
+ char *prngdSocket;
+ int prngdPort;
+ #endif
++#ifdef USE_CONSOLEKIT
++int use_consolekit;
++#endif
+
+ char *greeterLib;
+ char *willing;
+@@ -258,6 +261,10 @@
+ "false"} ,
+ { "willing", "Willing", DM_STRING, &willing,
+ ""} ,
++#ifdef USE_CONSOLEKIT
++{ "consoleKit", "ConsoleKit", DM_BOOL, (char **) &use_consolekit,
++ "true"} ,
++#endif
+ };
+
+ # define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0])
+@@ -440,7 +447,11 @@
+ {"-debug", "*debugLevel", XrmoptionSepArg, (caddr_t) NULL },
+ {"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL },
+ {"-daemon", ".daemonMode", XrmoptionNoArg, "true" },
+-{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" }
++{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" },
++#ifdef USE_CONSOLEKIT
++{"-consolekit", ".consoleKit", XrmoptionNoArg, "true" },
++{"-noconsolekit", ".consoleKit", XrmoptionNoArg, "false" }
++#endif
+ };
+
+ static int originalArgc;
+--- a/man/xdm.man
++++ b/man/xdm.man
+@@ -51,6 +51,8 @@
+ ] [
+ .B \-session
+ .I session_program
++] [
++.B \-noconsolekit
+ ]
+ .SH DESCRIPTION
+ .I Xdm
+@@ -218,6 +220,10 @@
+ .IP "\fB\-xrm\fP \fIresource_specification\fP"
+ Allows an arbitrary resource to be specified, as in most
+ X Toolkit applications.
++.IP "\fB\-noconsolekit\fP"
++Specifies ``false'' as the value for the \fBDisplayManager.consoleKit\fP
++resource.
++This suppresses the session management using ConsoleKit.
+ .SH RESOURCES
+ At many stages the actions of
+ .I xdm
diff --git a/source/x/x11/patch/xf86-video-chips.patch b/source/x/x11/patch/xf86-video-chips.patch
deleted file mode 100644
index a9ddcaa4d..000000000
--- a/source/x/x11/patch/xf86-video-chips.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-# Rationale for this is here:
-
-# commit bde65934fe8b40a5fdc8a469d0355caca59e81b5
-# Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-# Date: Sat Jul 21 09:27:10 2012 -0700
-#
-# Add iopl.h to source lists in util/Makefile.am so it gets packaged
-#
-# Was missed when it was created in commit c421f2477c9999, since
-# "make distcheck" passes due to configure determining it can't
-# build the utils without the header and moving on.
-#
-# Reported-by: Andreas Radke <a.radke@arcor.de>
-# Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
-# iopl.h obtained from git repo
-cp $CWD/patch/xf86-video-chips/iopl.h util/ \
- || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-chips/iopl.h b/source/x/x11/patch/xf86-video-chips/iopl.h
deleted file mode 100644
index e08207c7f..000000000
--- a/source/x/x11/patch/xf86-video-chips/iopl.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifdef __NetBSD__
-# include <sys/types.h>
-# include <machine/pio.h>
-# include <machine/sysarch.h>
-#else
-# if defined(__linux__)
-/* Can't because <sys/iopl.h> provides conflicting inb, outb, etc
- * # include <sys/io.h>
- */
-int iopl(int level);
-# endif
-# if defined(SVR4) && defined(i386)
-# include <sys/types.h>
-# ifdef NCR
- /* broken NCR <sys/sysi86.h> */
-# define __STDC
-# include <sys/sysi86.h>
-# undef __STDC
-# else
-# include <sys/sysi86.h>
-# endif
-# ifdef SVR4
-# if !defined(sun)
-# include <sys/seg.h>
-# endif
-# endif
-# include <sys/v86.h>
-# if defined(sun)
-# include <sys/psw.h>
-# endif
-# endif
-# include "AsmMacros.h"
-#endif /* NetBSD */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef __NetBSD__
-# define SET_IOPL() i386_iopl(3)
-# define RESET_IOPL() i386_iopl(0)
-#else
-# if defined(SVR4) && defined(i386)
-# ifndef SI86IOPL
-# define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL)
-# define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0)
-# else
-# define SET_IOPL() sysi86(SI86IOPL,3)
-# define RESET_IOPL() sysi86(SI86IOPL,0)
-# endif
-# else
-# ifdef linux
-# define SET_IOPL() iopl(3)
-# define RESET_IOPL() iopl(0)
-# else
-# define SET_IOPL() (void)0
-# define RESET_IOPL() (void)0
-# endif
-# endif
-#endif
diff --git a/source/x/x11/patch/xf86-video-geode.patch b/source/x/x11/patch/xf86-video-geode.patch
deleted file mode 100644
index 6bbc3b34a..000000000
--- a/source/x/x11/patch/xf86-video-geode.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScrn);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScrn);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-i740.patch b/source/x/x11/patch/xf86-video-i740.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-i740.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-intel.patch b/source/x/x11/patch/xf86-video-intel.patch
new file mode 100644
index 000000000..dab2d0d30
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-intel.patch
@@ -0,0 +1,3 @@
+# Disable this patch. Latest git should support gen9 properly.
+#zcat $CWD/patch/xf86-video-intel/0001-sna-Let-modestting-glamor-handle-gen9.patch.gz \
+# | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/x/x11/patch/xf86-video-intel/0001-sna-Let-modestting-glamor-handle-gen9.patch b/source/x/x11/patch/xf86-video-intel/0001-sna-Let-modestting-glamor-handle-gen9.patch
new file mode 100644
index 000000000..75d719529
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-intel/0001-sna-Let-modestting-glamor-handle-gen9.patch
@@ -0,0 +1,41 @@
+From 442ac0a20132f49fbfb37f05db9d90f04b13698d Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Mon, 29 Feb 2016 14:43:35 +0100
+Subject: [RFC/PATCH xf86-video-intel] sna: Let modestting + glamor handle
+ gen9+
+
+sna has no meaningfull accel for gen9+, this causes problems with i.e.
+apps using XVideo since the sprite XVideo support does not work well
+for many apps.
+
+Therefor it is better to just let the xserver fall back to modesetting +
+glamor. This is implemented by returning FALSE from the probe methods,
+just like how nouveau handles falling back to modesetting for newer cards.
+
+BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1305369
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+ src/intel_module.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/intel_module.c b/src/intel_module.c
+index 60835b9..5979cb9 100644
+--- a/src/intel_module.c
++++ b/src/intel_module.c
+@@ -571,6 +571,13 @@ intel_scrn_create(DriverPtr driver,
+ return FALSE;
+ }
+
++ /*
++ * We've no accel support for these, so let modesetting + glamor
++ * handle them.
++ */
++ if ((unsigned)((struct intel_device_info *)match_data)->gen >= 0110)
++ return FALSE;
++
+ scrn = xf86AllocateScreen(driver, flags);
+ if (scrn == NULL)
+ return FALSE;
+--
+2.7.2
+
diff --git a/source/x/x11/patch/xf86-video-neomagic.patch b/source/x/x11/patch/xf86-video-neomagic.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-neomagic.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-r128.patch b/source/x/x11/patch/xf86-video-r128.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-r128.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-rendition.patch b/source/x/x11/patch/xf86-video-rendition.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-rendition.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-s3virge.patch b/source/x/x11/patch/xf86-video-s3virge.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-s3virge.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-savage.patch b/source/x/x11/patch/xf86-video-savage.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-savage.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-siliconmotion.patch b/source/x/x11/patch/xf86-video-siliconmotion.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-siliconmotion.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-sis.patch b/source/x/x11/patch/xf86-video-sis.patch
deleted file mode 100644
index 45276b4c8..000000000
--- a/source/x/x11/patch/xf86-video-sis.patch
+++ /dev/null
@@ -1,2 +0,0 @@
-zcat $CWD/patch/xf86-video-sis/sis-0.10.7-git.patch.gz | patch -p1 --verbose \
- || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/x/x11/patch/xf86-video-sis/sis-0.10.7-git.patch b/source/x/x11/patch/xf86-video-sis/sis-0.10.7-git.patch
deleted file mode 100644
index 865237552..000000000
--- a/source/x/x11/patch/xf86-video-sis/sis-0.10.7-git.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-diff --git a/src/sis.h b/src/sis.h
-index 46fca2a..20e6134 100644
---- a/src/sis.h
-+++ b/src/sis.h
-@@ -75,7 +75,6 @@
-
- #include "compiler.h"
- #include "xf86Pci.h"
--#include "xf86Priv.h"
- #include "xf86_OSproc.h"
- #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
- #include "xf86Resources.h"
-diff --git a/src/sis_driver.c b/src/sis_driver.c
-index 61e8075..0fd83d7 100644
---- a/src/sis_driver.c
-+++ b/src/sis_driver.c
-@@ -57,7 +57,6 @@
- #include "fb.h"
- #include "micmap.h"
- #include "mipointer.h"
--#include "mibstore.h"
- #include "edid.h"
-
- #define SIS_NEED_inSISREG
-@@ -94,6 +93,10 @@
- #include "dri.h"
- #endif
-
-+#ifndef DEFAULT_DPI
-+#define DEFAULT_DPI 96
-+#endif
-+
- /*
- * LookupWindow was removed with video abi 11.
- */
-@@ -7344,7 +7347,11 @@ SISUnmapMem(ScrnInfoPtr pScrn)
- if(pSiSEnt->MapCountIOBase) {
- pSiSEnt->MapCountIOBase--;
- if((pSiSEnt->MapCountIOBase == 0) || (pSiSEnt->forceUnmapIOBase)) {
-+#ifndef XSERVER_LIBPCIACCESS
- xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pSiSEnt->IOBase, (pSiS->mmioSize * 1024));
-+#else
-+ pci_device_unmap_range(pSiS->PciInfo, pSiSEnt->IOBase, (pSiS->mmioSize * 1024));
-+#endif
- pSiSEnt->IOBase = NULL;
- pSiSEnt->MapCountIOBase = 0;
- pSiSEnt->forceUnmapIOBase = FALSE;
-@@ -7355,7 +7362,11 @@ SISUnmapMem(ScrnInfoPtr pScrn)
- if(pSiSEnt->MapCountIOBaseDense) {
- pSiSEnt->MapCountIOBaseDense--;
- if((pSiSEnt->MapCountIOBaseDense == 0) || (pSiSEnt->forceUnmapIOBaseDense)) {
-+#ifndef XSERVER_LIBPCIACCESS
- xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pSiSEnt->IOBaseDense, (pSiS->mmioSize * 1024));
-+#else
-+ pci_device_unmap_range(pSiS->PciInfo, (pointer)pSiSEnt->IOBaseDense, (pSiS->mmioSize * 1024));
-+#endif
- pSiSEnt->IOBaseDense = NULL;
- pSiSEnt->MapCountIOBaseDense = 0;
- pSiSEnt->forceUnmapIOBaseDense = FALSE;
-@@ -7366,7 +7377,11 @@ SISUnmapMem(ScrnInfoPtr pScrn)
- if(pSiSEnt->MapCountFbBase) {
- pSiSEnt->MapCountFbBase--;
- if((pSiSEnt->MapCountFbBase == 0) || (pSiSEnt->forceUnmapFbBase)) {
-+#ifndef XSERVER_LIBPCIACCESS
- xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pSiSEnt->RealFbBase, pSiS->FbMapSize);
-+#else
-+ pci_device_unmap_range(pSiS->PciInfo, (pointer)pSiSEnt->RealFbBase, pSiS->FbMapSize);
-+#endif
- pSiSEnt->FbBase = pSiSEnt->RealFbBase = NULL;
- pSiSEnt->MapCountFbBase = 0;
- pSiSEnt->forceUnmapFbBase = FALSE;
-@@ -7376,13 +7391,25 @@ SISUnmapMem(ScrnInfoPtr pScrn)
- }
- } else {
- #endif
-+#ifndef XSERVER_LIBPCIACCESS
- xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pSiS->IOBase, (pSiS->mmioSize * 1024));
-+#else
-+ pci_device_unmap_range(pSiS->PciInfo, (pointer)pSiS->IOBase, (pSiS->mmioSize * 1024));
-+#endif
- pSiS->IOBase = NULL;
- #ifdef __alpha__
-+#ifndef XSERVER_LIBPCIACCESS
- xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pSiS->IOBaseDense, (pSiS->mmioSize * 1024));
-+#else
-+ pci_device_unmap_range(pSiS->PciInfo, (pointer)pSiS->IOBaseDense, (pSiS->mmioSize * 1024));
-+#endif
- pSiS->IOBaseDense = NULL;
- #endif
-+#ifndef XSERVER_LIBPCIACCESS
- xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pSiS->RealFbBase, pSiS->FbMapSize);
-+#else
-+ pci_device_unmap_range(pSiS->PciInfo, (pointer)pSiS->RealFbBase, pSiS->FbMapSize);
-+#endif
- pSiS->FbBase = pSiS->RealFbBase = NULL;
- #ifdef SISDUALHEAD
- }
-@@ -8859,7 +8886,6 @@ SISScreenInit(SCREEN_INIT_ARGS_DECL)
- }
- pSiS->SiSFastVidCopyDone = TRUE;
-
-- miInitializeBackingStore(pScreen);
- xf86SetBackingStore(pScreen);
- xf86SetSilkenMouse(pScreen);
-
-@@ -9352,7 +9378,14 @@ SISMergedPointerMoved(SCRN_ARG_TYPE arg, int x, int y)
- }
- if(doit) {
- sigstate = xf86BlockSIGIO();
--#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 15
-+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 18
-+ {
-+ double dx = x, dy = y;
-+ miPointerSetPosition(inputInfo.pointer, Absolute, &dx, &dy, NULL, NULL);
-+ x = (int)dx;
-+ y = (int)dy;
-+ }
-+#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 15
- {
- double dx = x, dy = y;
- miPointerSetPosition(inputInfo.pointer, Absolute, &dx, &dy);
diff --git a/source/x/x11/patch/xf86-video-tdfx.patch b/source/x/x11/patch/xf86-video-tdfx.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-tdfx.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-trident.patch b/source/x/x11/patch/xf86-video-trident.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-trident.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-v4l.patch b/source/x/x11/patch/xf86-video-v4l.patch
new file mode 100644
index 000000000..5040a98ec
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-v4l.patch
@@ -0,0 +1,4 @@
+zcat $CWD/patch/xf86-video-v4l/xorg-x11-drv-v4l-support_v4l2_only_drivers.patch.gz \
+ | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xf86-video-v4l/xf86-video-v4l-0.2.0-build-fix.patch.gz \
+ | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/x/x11/patch/xf86-video-v4l/xf86-video-v4l-0.2.0-build-fix.patch b/source/x/x11/patch/xf86-video-v4l/xf86-video-v4l-0.2.0-build-fix.patch
new file mode 100644
index 000000000..febba2c68
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-v4l/xf86-video-v4l-0.2.0-build-fix.patch
@@ -0,0 +1,14 @@
+diff -up xf86-video-v4l-0.2.0/src/v4l.c~ xf86-video-v4l-0.2.0/src/v4l.c
+--- xf86-video-v4l-0.2.0/src/v4l.c~ 2015-02-11 17:42:55.000000000 +0100
++++ xf86-video-v4l-0.2.0/src/v4l.c 2015-02-11 17:44:33.432706357 +0100
+@@ -42,6 +42,10 @@
+ # define DEBUG(x)
+ #endif
+
++#ifndef VIDEO_INVERT_CLIPLIST
++#define VIDEO_INVERT_CLIPLIST 0x00000002
++#endif
++
+ /***************************************************************************/
+
+ static void V4LIdentify(int flags);
diff --git a/source/x/x11/patch/xf86-video-v4l/xorg-x11-drv-v4l-support_v4l2_only_drivers.patch b/source/x/x11/patch/xf86-video-v4l/xorg-x11-drv-v4l-support_v4l2_only_drivers.patch
new file mode 100644
index 000000000..3a2ec418e
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-v4l/xorg-x11-drv-v4l-support_v4l2_only_drivers.patch
@@ -0,0 +1,4068 @@
+diff --git a/src/v4l.c b/src/v4l.c
+--- a/src/v4l.c
++++ b/src/v4l.c
+@@ -1,6 +1,9 @@
+ /*
+- * video4linux Xv Driver
++ * video4linux Xv Driver
+ * based on Michael Schimek's permedia 2 driver.
++ *
++ * Copyright (c) 2011 Mauro Carvalho Chehab <mchehab@redhat.com> for:
++ * - Major rewrite, as driver got ported to V4L2 API
+ */
+
+ #ifdef HAVE_CONFIG_H
+@@ -9,12 +12,16 @@
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <ctype.h>
++
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <unistd.h>
++#include <sys/ioctl.h>
+
+-#include "videodev.h"
++#include "videodev2.h"
+ #include "xf86.h"
+ #include "xf86_OSproc.h"
+ #include "xf86Pci.h"
+@@ -25,29 +32,32 @@
+ #include "regionstr.h"
+ #include "dgaproc.h"
+ #include "xf86str.h"
++#include "fourcc.h"
+
+-#include <asm/ioctl.h> /* _IORW(xxx) #defines are here */
++#include <asm/ioctl.h> /* _IORW(xxx) #defines are here */
+
+-#if 0
++#if 1
+ # define DEBUG(x) (x)
+ #else
+ # define DEBUG(x)
+ #endif
+
++/***************************************************************************/
++
+ static void V4LIdentify(int flags);
+ static Bool V4LProbe(DriverPtr drv, int flags);
+ static const OptionInfoRec * V4LAvailableOptions(int chipid, int busid);
+
+ _X_EXPORT DriverRec V4L = {
+- 40000,
+- "v4l",
+- V4LIdentify, /* Identify*/
+- V4LProbe, /* Probe */
+- V4LAvailableOptions,
+- NULL,
+- 0
+-};
+-
++ .driverVersion = 50000,
++ .driverName = "v4l",
++ .Identify = V4LIdentify,
++ .Probe = V4LProbe,
++ .AvailableOptions = V4LAvailableOptions,
++ .module = NULL,
++ .refCount = 0,
++ .driverFunc = NULL, /* FIXME: Need to implement for new probing mode */
++};
+
+ #ifdef XFree86LOADER
+
+@@ -55,16 +65,16 @@ static MODULESETUPPROTO(v4lSetup);
+
+ static XF86ModuleVersionInfo v4lVersRec =
+ {
+- "v4l",
+- MODULEVENDORSTRING,
+- MODINFOSTRING1,
+- MODINFOSTRING2,
+- XORG_VERSION_CURRENT,
+- 0, 1, 1,
+- ABI_CLASS_VIDEODRV,
+- ABI_VIDEODRV_VERSION,
+- MOD_CLASS_NONE,
+- {0,0,0,0}
++ "v4l",
++ MODULEVENDORSTRING,
++ MODINFOSTRING1,
++ MODINFOSTRING2,
++ XORG_VERSION_CURRENT,
++ 0, 1, 1,
++ ABI_CLASS_VIDEODRV,
++ ABI_VIDEODRV_VERSION,
++ MOD_CLASS_NONE,
++ {0,0,0,0}
+ };
+
+ _X_EXPORT XF86ModuleData v4lModuleData = { &v4lVersRec, v4lSetup, NULL };
+@@ -72,32 +82,32 @@ _X_EXPORT XF86ModuleData v4lModuleData =
+ static pointer
+ v4lSetup(pointer module, pointer opts, int *errmaj, int *errmin)
+ {
+- const char *osname;
+- static Bool setupDone = FALSE;
++ const char *osname;
++ static Bool setupDone = FALSE;
+
+- if (setupDone) {
+- if (errmaj)
+- *errmaj = LDR_ONCEONLY;
+- return NULL;
+- }
+-
+- setupDone = TRUE;
++ if (setupDone) {
++ if (errmaj)
++ *errmaj = LDR_ONCEONLY;
++ return NULL;
++ }
+
+- /* Check that we're being loaded on a Linux system */
+- LoaderGetOS(&osname, NULL, NULL, NULL);
+- if (!osname || strcmp(osname, "linux") != 0) {
+- if (errmaj)
+- *errmaj = LDR_BADOS;
+- if (errmin)
+- *errmin = 0;
+- return NULL;
+- } else {
+- /* OK */
++ setupDone = TRUE;
+
+- xf86AddDriver (&V4L, module, 0);
+-
+- return (pointer)1;
+- }
++ /* Check that we're being loaded on a Linux system */
++ LoaderGetOS(&osname, NULL, NULL, NULL);
++ if (!osname || strcmp(osname, "linux") != 0) {
++ if (errmaj)
++ *errmaj = LDR_BADOS;
++ if (errmin)
++ *errmin = 0;
++ return NULL;
++ } else {
++ /* OK */
++
++ xf86AddDriver (&V4L, module, 0);
++
++ return (pointer)1;
++ }
+ }
+
+ #else
+@@ -112,25 +122,28 @@ v4lSetup(pointer module, pointer opts, i
+ #define VIDEO_YUV 2 /* yuv overlay (to offscreen memory + hw scaling) */
+ #define VIDEO_RECLIP 3 /* temporarly off, window clipping changes */
+
++typedef struct _XvV4LCtrlRec {
++ struct v4l2_queryctrl qctrl;
++ Atom xv;
++} XvV4LCtrlRec, *XvV4LCtrlPtr;
++
+ typedef struct _PortPrivRec {
+ ScrnInfoPtr pScrn;
+- FBAreaPtr pFBArea[2];
+- int VideoOn;
+- Bool StreamOn;
++ FBAreaPtr pFBArea[2];
++ int VideoOn;
++ Bool StreamOn;
+
+ /* file handle */
+- int nr;
+- struct video_capability cap;
++ int nr;
++ struct v4l2_capability cap;
+
+ /* RGB overlay */
+- struct video_buffer rgb_fbuf;
+- struct video_window rgb_win;
+- int rgbpalette;
++ struct v4l2_framebuffer rgb_fbuf;
++ struct v4l2_window rgb_win;
+ int rgbdepth;
+
+ /* attributes */
+- struct video_picture pict;
+- struct video_audio audio;
++ CARD32 pixelformat;
+
+ XF86VideoEncodingPtr enc;
+ int *input;
+@@ -145,24 +158,21 @@ typedef struct _PortPrivRec {
+
+ int yuv_width,yuv_height;
+ XF86SurfacePtr surface;
+- struct video_buffer yuv_fbuf;
+- struct video_window yuv_win;
++ struct v4l2_framebuffer yuv_fbuf;
++ struct v4l2_window yuv_win;
++
++ struct v4l2_standard *standard; /* FIXME: can be removed */
++
++ XvV4LCtrlPtr XvV4LCtrl;
++ int n_qctrl;
+ } PortPrivRec, *PortPrivPtr;
+
+-#define XV_ENCODING "XV_ENCODING"
+-#define XV_BRIGHTNESS "XV_BRIGHTNESS"
+-#define XV_CONTRAST "XV_CONTRAST"
+-#define XV_SATURATION "XV_SATURATION"
+-#define XV_HUE "XV_HUE"
++#define XV_ENCODING "XV_ENCODING"
++#define XV_FREQ "XV_FREQ"
+
+-#define XV_FREQ "XV_FREQ"
+-#define XV_MUTE "XV_MUTE"
+-#define XV_VOLUME "XV_VOLUME"
++#define MAKE_ATOM(a) MakeAtom(a, strlen(a), TRUE)
+
+-#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
+-
+-static Atom xvEncoding, xvBrightness, xvContrast, xvSaturation, xvHue;
+-static Atom xvFreq, xvMute, xvVolume;
++static Atom xvEncoding, xvFreq;
+
+ static XF86VideoFormatRec
+ InputVideoFormats[] = {
+@@ -176,16 +186,8 @@ InputVideoFormats[] = {
+
+ static const XF86AttributeRec Attributes[] = {
+ {XvSettable | XvGettable, -1000, 1000, XV_ENCODING},
+- {XvSettable | XvGettable, -1000, 1000, XV_BRIGHTNESS},
+- {XvSettable | XvGettable, -1000, 1000, XV_CONTRAST},
+- {XvSettable | XvGettable, -1000, 1000, XV_SATURATION},
+- {XvSettable | XvGettable, -1000, 1000, XV_HUE},
+ };
+-static const XF86AttributeRec VolumeAttr =
+- {XvSettable | XvGettable, -1000, 1000, XV_VOLUME};
+-static const XF86AttributeRec MuteAttr =
+- {XvSettable | XvGettable, 0, 1, XV_MUTE};
+-static const XF86AttributeRec FreqAttr =
++static const XF86AttributeRec FreqAttr =
+ {XvSettable | XvGettable, 0, 16*1000, XV_FREQ};
+
+
+@@ -206,59 +208,247 @@ static struct V4L_DEVICE {
+ };
+
+ /* ---------------------------------------------------------------------- */
+-/* forward decl */
+
+-static void V4lQueryBestSize(ScrnInfoPtr pScrn, Bool motion,
+- short vid_w, short vid_h, short drw_w, short drw_h,
+- unsigned int *p_w, unsigned int *p_h, pointer data);
++static int SetV4LFmt(int fd, CARD32 pixelformat)
++{
++ struct v4l2_framebuffer fbuf;
++ char *p = (char *)&pixelformat;
++
++ memset(&fbuf, 0, sizeof(fbuf));
++ if (ioctl(fd, VIDIOC_G_FBUF, &fbuf) == -1) {
++ xf86Msg(X_ERROR, "v4l: Error %d: Can't get FBUF\n", errno);
++ return errno;
++ }
++ if (fbuf.fmt.pixelformat != pixelformat) {
++ fbuf.fmt.pixelformat = pixelformat;
++ if (ioctl(fd, VIDIOC_S_FBUF, &fbuf) == -1) {
++ xf86Msg(X_ERROR, "v4l: Error %d: Can't set FBUF to %c%c%c%c\n",
++ errno, p[0], p[1], p[2], p[3]);
++ return errno;
++ }
++ }
++ DEBUG(xf86Msg(X_INFO, "v4l: Set overlay format to %c%c%c%c\n",
++ p[0], p[1], p[2], p[3]));
++ return 0;
++}
++static int GetV4LFmt(int fd, CARD32 *pixelformat)
++{
++ struct v4l2_framebuffer fbuf;
++
++ memset(&fbuf, 0, sizeof(fbuf));
++ if (ioctl(fd, VIDIOC_G_FBUF, &fbuf) == -1) {
++ xf86Msg(X_ERROR, "v4l: Error %d: Can't get FBUF\n", errno);
++ return errno;
++ }
++
++ *pixelformat = fbuf.fmt.pixelformat;
++
++ return 0;
++}
++
++#define ATTR_NAME_PREFIX "XV_"
++static int AddControl(PortPrivPtr p, XF86AttributeRec **list, int *count,
++ struct v4l2_queryctrl *qctrl, int *n)
++{
++ char *ptr;
++
++/* v4l_add_attr */
++ if (qctrl->flags & V4L2_CTRL_FLAG_DISABLED)
++ return 0;
++ switch (qctrl->type) {
++ case V4L2_CTRL_TYPE_INTEGER:
++ case V4L2_CTRL_TYPE_BOOLEAN:
++ case V4L2_CTRL_TYPE_MENU:
++ case V4L2_CTRL_TYPE_BUTTON:
++ break;
++ default:
++ return 0;
++ }
++
++ p->XvV4LCtrl = realloc(p->XvV4LCtrl, sizeof(XvV4LCtrlRec) * (*n + 1));
++ if (!p->XvV4LCtrl) {
++ if (*list) {
++ free (*list);
++ *count = 0;
++ *n = 0;
++ }
++ return -1;
++ }
++
++ *list = realloc(*list, sizeof(XF86AttributeRec) * (*count + 1));
++ if (NULL == *list) {
++ if (p->XvV4LCtrl)
++ free (p->XvV4LCtrl);
++ *count = 0;
++ return -1;
++ }
++
++ memset(*list + *count, 0, sizeof(XF86AttributeRec));
++ (*list)[*count].flags = XvSettable | XvGettable;
++
++ if (qctrl->flags & V4L2_CTRL_FLAG_READ_ONLY)
++ (*list)[*count].flags &= ~XvSettable;
++ if (qctrl->flags & V4L2_CTRL_FLAG_WRITE_ONLY)
++ (*list)[*count].flags &= ~XvGettable;
++ (*list)[*count].min_value = qctrl->minimum;
++ (*list)[*count].max_value = qctrl->maximum;
++ (*list)[*count].name = malloc(strlen((char *)qctrl->name) + 1 + sizeof (ATTR_NAME_PREFIX));
++ strcpy((*list)[*count].name, ATTR_NAME_PREFIX);
++ strcat((*list)[*count].name, (char *)qctrl->name);
++ for (ptr = (*list)[*count].name; *ptr; ptr++) {
++ *ptr = toupper(*ptr);
++ if (*ptr == ' ')
++ *ptr = '_';
++ }
++
++ p->XvV4LCtrl[*n].xv = MAKE_ATOM((*list)[*count].name);
++ memcpy(&p->XvV4LCtrl[*n].qctrl, qctrl, sizeof(*qctrl));
++
++ xf86Msg(X_INFO, "v4l: add attr %s (Xv/GPA %d) (%d to %d)\n",
++ (*list)[*count].name, (int)p->XvV4LCtrl[*n].xv,
++ p->XvV4LCtrl[*n].qctrl.minimum,
++ p->XvV4LCtrl[*n].qctrl.maximum);
++
++ (*count)++;
++ (*n)++;
++
++ return 0;
++}
++
++static void AddAllV4LControls(PortPrivPtr p, XF86AttributeRec **list,
++ int *count, int fd)
++{
++ int entries = 0;
++ CARD32 id;
++ struct v4l2_queryctrl qctrl;
++
++ memset(&qctrl, 0, sizeof(qctrl));
++ qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
++ while (!ioctl(fd, VIDIOC_QUERYCTRL, &qctrl)) {
++ if (AddControl(p, list, count, &qctrl, &entries))
++ return;
++ qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
++ }
++ if (qctrl.id != V4L2_CTRL_FLAG_NEXT_CTRL)
++ return;
++ for (id = V4L2_CID_USER_BASE; id < V4L2_CID_LASTP1; id++) {
++ qctrl.id = id;
++ if (!ioctl(fd, VIDIOC_QUERYCTRL, &qctrl)) {
++ if (AddControl(p, list, count, &qctrl, &entries))
++ return;
++ }
++ }
++ qctrl.id = V4L2_CID_PRIVATE_BASE;
++ while (!ioctl(fd, VIDIOC_QUERYCTRL, &qctrl)) {
++ if (AddControl(p, list, count, &qctrl, &entries))
++ return;
++ qctrl.id++;
++ }
++ p->n_qctrl = entries;
++}
+
+ /* ---------------------------------------------------------------------- */
+
++/* setup yuv overlay + hw scaling: look if we find some common video
++ format which both v4l driver and the X-Server can handle */
++static int v4l_check_yuv(ScrnInfoPtr pScrn, PortPrivPtr pPPriv,
++ char *dev, int fd)
++{
++ static const struct {
++ CARD32 v4l_palette;
++ unsigned int xv_id;
++ unsigned int xv_format;
++ } yuvlist[] = {
++ { V4L2_PIX_FMT_YUYV, FOURCC_YUY2, XvPacked },
++ { V4L2_PIX_FMT_UYVY, FOURCC_UYVY, XvPacked },
++ { 0 /* end of list */ },
++ };
++ /* FIXME: Why pScrn->scrnIndex? */
++ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
++ int fmt,i;
++
++ pPPriv->format = xf86XVQueryOffscreenImages(pScreen, &pPPriv->nformat);
++ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
++ "v4l: Number of Xv formats: %d\n", pPPriv->nformat);
++ if (!pPPriv->nformat)
++ return FALSE;
++
++ for (fmt = 0; yuvlist[fmt].v4l_palette != 0; fmt++) {
++ pPPriv->pixelformat = yuvlist[fmt].v4l_palette;
++ if (-1 == SetV4LFmt(fd, pPPriv->pixelformat))
++ continue;
++ GetV4LFmt(fd, &pPPriv->pixelformat);
++ if (pPPriv->pixelformat != yuvlist[fmt].v4l_palette)
++ continue;
++ /* ... works, check available offscreen image formats now ... */
++ for (i = 0; i < pPPriv->nformat; i++) {
++ if (pPPriv->format[i].image->id == yuvlist[fmt].xv_id &&
++ pPPriv->format[i].image->format == yuvlist[fmt].xv_format) {
++ /* ... match found, good. */
++ pPPriv->yuv_format = yuvlist[fmt].v4l_palette;
++ pPPriv->myfmt = pPPriv->format+i;
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
++ "v4l[%s]: using hw video scaling [%4.4s].\n",
++ dev,(char*)&(pPPriv->format[i].image->id));
++ return TRUE;
++ }
++ }
++ }
++ return TRUE;
++}
++
+ static int V4lOpenDevice(PortPrivPtr pPPriv, ScrnInfoPtr pScrn)
+ {
+ static int first = 1;
+
++#if 0
++ /*
++ * It may be a good idea to probe here, but this would break
++ * some things, as initialization uses yuv_format
++ */
++ if (!pPPriv->yuv_format && first)
++ v4l_check_yuv(pScrn, pPPriv, V4L_NAME, V4L_FD);
++#endif
+ if (-1 == V4L_FD) {
+- V4L_FD = open(V4L_NAME, O_RDWR, 0);
++ V4L_FD = open(V4L_NAME, O_RDWR, 0);
+
+- pPPriv->rgb_fbuf.width = pScrn->virtualX;
+- pPPriv->rgb_fbuf.height = pScrn->virtualY;
+- pPPriv->rgb_fbuf.depth = pScrn->bitsPerPixel;
+- pPPriv->rgb_fbuf.bytesperline = pScrn->displayWidth * ((pScrn->bitsPerPixel + 7)/8);
+- pPPriv->rgb_fbuf.base = (pointer)(pScrn->memPhysBase + pScrn->fbOffset);
+- if (first) {
+- first = 0;
+- xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
+- "v4l: memPhysBase=0x%lx\n", pScrn->memPhysBase);
+- }
++ if (-1 == V4L_FD)
++ return errno;
+
+- switch (pScrn->bitsPerPixel) {
+- case 16:
+- if (pScrn->weight.green == 5) {
+- pPPriv->rgbpalette = VIDEO_PALETTE_RGB555;
+- pPPriv->rgbdepth = 16;
+- } else {
+- pPPriv->rgbpalette = VIDEO_PALETTE_RGB565;
+- pPPriv->rgbdepth = 16;
+- }
+- break;
+- case 24:
+- pPPriv->rgbpalette = VIDEO_PALETTE_RGB24;
+- pPPriv->rgbdepth = 24;
+- break;
+- case 32:
+- pPPriv->rgbpalette = VIDEO_PALETTE_RGB32;
+- pPPriv->rgbdepth = 32;
+- break;
+- }
++ if (-1 == ioctl(V4L_FD, VIDIOC_G_FBUF, &pPPriv->rgb_fbuf)) {
++ xf86Msg(X_ERROR, "v4l: Error %d: Can't get FBUF\n", errno);
++ return errno;
++ }
++ pPPriv->rgb_fbuf.fmt.width = pScrn->virtualX;
++ pPPriv->rgb_fbuf.fmt.height = pScrn->virtualY;
++ pPPriv->rgb_fbuf.fmt.bytesperline = pScrn->displayWidth * ((pScrn->bitsPerPixel + 7)/8);
++ pPPriv->rgb_fbuf.base = (pointer)(pScrn->memPhysBase + pScrn->fbOffset);
++ if (first) {
++ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
++ "v4l: memPhysBase=0x%lx\n", pScrn->memPhysBase);
++ first = 0;
++ }
++
++ switch (pScrn->bitsPerPixel) {
++ case 16:
++ if (pScrn->weight.green == 5) {
++ pPPriv->rgb_fbuf.fmt.pixelformat = V4L2_PIX_FMT_RGB555;
++ } else {
++ pPPriv->rgb_fbuf.fmt.pixelformat = V4L2_PIX_FMT_RGB565;
++ }
++ break;
++ case 24:
++ pPPriv->rgb_fbuf.fmt.pixelformat = V4L2_PIX_FMT_BGR24;
++ break;
++ case 32:
++ pPPriv->rgb_fbuf.fmt.pixelformat = V4L2_PIX_FMT_BGR32;
++ break;
++ }
+ }
+
+- if (-1 == V4L_FD)
+- return errno;
+-
+ V4L_REF++;
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
+- "Xv/open: refcount=%d\n",V4L_REF));
++ "Xv/open: refcount=%d\n",V4L_REF));
+
+ return 0;
+ }
+@@ -267,10 +457,10 @@ static void V4lCloseDevice(PortPrivPtr p
+ {
+ V4L_REF--;
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
+- "Xv/close: refcount=%d\n",V4L_REF));
++ "Xv/close: refcount=%d\n",V4L_REF));
+ if (0 == V4L_REF && -1 != V4L_FD) {
+- close(V4L_FD);
+- V4L_FD = -1;
++ close(V4L_FD);
++ V4L_FD = -1;
+ }
+ }
+
+@@ -280,8 +470,10 @@ V4lPutVideo(ScrnInfoPtr pScrn,
+ short vid_w, short vid_h, short drw_w, short drw_h,
+ RegionPtr clipBoxes, pointer data, DrawablePtr pDraw)
+ {
++ struct v4l2_format fmt;
++
+ PortPrivPtr pPPriv = (PortPrivPtr) data;
+- struct video_clip *clip;
++ struct v4l2_clip *clip;
+ BoxPtr pBox;
+ RegionRec newReg;
+ BoxRec newBox;
+@@ -291,179 +483,214 @@ V4lPutVideo(ScrnInfoPtr pScrn,
+
+ /* Open a file handle to the device */
+ if (VIDEO_OFF == pPPriv->VideoOn) {
+- if (V4lOpenDevice(pPPriv, pScrn))
+- return Success;
++ if (V4lOpenDevice(pPPriv, pScrn))
++ return Success;
+ }
+
+ if (0 != pPPriv->yuv_format) {
+- DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/PV yuv\n"));
+- width = pPPriv->enc[pPPriv->cenc].width;
++ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/PV yuv\n"));
++ width = pPPriv->enc[pPPriv->cenc].width;
+ height = pPPriv->enc[pPPriv->cenc].height/2; /* no interlace */
+- if (drw_w < width)
+- width = drw_w;
+- if (drw_h < height)
+- height = drw_h;
+- if ((height != pPPriv->yuv_height) || (width != pPPriv->yuv_width)) {
+- /* new size -- free old surface */
+- DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, " surface resize\n"));
+- if (pPPriv->surface) {
+- pPPriv->VideoOn = VIDEO_OFF;
+- pPPriv->myfmt->stop(pPPriv->surface);
+- pPPriv->myfmt->free_surface(pPPriv->surface);
+- xfree(pPPriv->surface);
+- pPPriv->surface = NULL;
+- }
+- pPPriv->yuv_width = width;
+- pPPriv->yuv_height = height;
+- }
+- if (!pPPriv->surface) {
+- /* allocate + setup offscreen surface */
+- if (NULL == (pPPriv->surface = xalloc(sizeof(XF86SurfaceRec))))
+- return FALSE;
+- if (Success != pPPriv->myfmt->alloc_surface
+- (pScrn,pPPriv->myfmt->image->id,
+- pPPriv->yuv_width,pPPriv->yuv_height,pPPriv->surface)) {
+- xfree(pPPriv->surface);
+- pPPriv->surface = NULL;
+- goto fallback_to_rgb;
+- }
+- pPPriv->yuv_fbuf.width = pPPriv->surface->width;
+- pPPriv->yuv_fbuf.height = pPPriv->surface->height;
+- pPPriv->yuv_fbuf.depth = 16;
+- pPPriv->yuv_fbuf.bytesperline = pPPriv->surface->pitches[0];
+- pPPriv->yuv_fbuf.base =
+- (pointer)(pScrn->memPhysBase + pPPriv->surface->offsets[0]);
+- DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, " surface: %p+%d = %p, %dx%d, pitch %d\n",
+- pScrn->memPhysBase,pPPriv->surface->offsets[0],
+- pScrn->memPhysBase+pPPriv->surface->offsets[0],
+- pPPriv->surface->width,pPPriv->surface->height,
+- pPPriv->surface->pitches[0]));
+- pPPriv->yuv_win.width = pPPriv->surface->width;
+- pPPriv->yuv_win.height = pPPriv->surface->height;
+- }
++ if (drw_w < width)
++ width = drw_w;
++ if (drw_h < height)
++ height = drw_h;
++ if ((height != pPPriv->yuv_height) || (width != pPPriv->yuv_width)) {
++ /* new size -- free old surface */
++ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, " surface resize\n"));
++ if (pPPriv->surface) {
++ pPPriv->VideoOn = VIDEO_OFF;
++ pPPriv->myfmt->stop(pPPriv->surface);
++ pPPriv->myfmt->free_surface(pPPriv->surface);
++ free(pPPriv->surface);
++ pPPriv->surface = NULL;
++ }
++ pPPriv->yuv_width = width;
++ pPPriv->yuv_height = height;
++ }
++ if (!pPPriv->surface) {
++ /* allocate + setup offscreen surface */
++ if (NULL == (pPPriv->surface = malloc(sizeof(XF86SurfaceRec))))
++ return FALSE;
++ if (Success != pPPriv->myfmt->alloc_surface
++ (pScrn,pPPriv->myfmt->image->id,
++ pPPriv->yuv_width,pPPriv->yuv_height,pPPriv->surface)) {
++ free(pPPriv->surface);
++ pPPriv->surface = NULL;
++ goto fallback_to_rgb;
++ }
+
+- /* program driver */
+- if (-1 == ioctl(V4L_FD,VIDIOCSFBUF,&(pPPriv->yuv_fbuf)))
+- perror("ioctl VIDIOCSFBUF");
+- if (-1 == ioctl(V4L_FD,VIDIOCGPICT,&pPPriv->pict))
+- perror("ioctl VIDIOCGPICT");
+- pPPriv->pict.palette = pPPriv->yuv_format;
+- pPPriv->pict.depth = 16;
+- if (-1 == ioctl(V4L_FD,VIDIOCSPICT,&pPPriv->pict))
+- perror("ioctl VIDIOCSPICT");
+- if (-1 == ioctl(V4L_FD,VIDIOCSWIN,&(pPPriv->yuv_win)))
+- perror("ioctl VIDIOCSWIN");
+- if (-1 == ioctl(V4L_FD, VIDIOCCAPTURE, &one))
+- perror("ioctl VIDIOCCAPTURE(1)");
++ if (-1 == ioctl(V4L_FD, VIDIOC_G_FBUF, &pPPriv->yuv_fbuf)) {
++ xf86Msg(X_ERROR, "v4l: Error %d: Can't get FBUF\n", errno);
++ return errno;
++ }
++ pPPriv->yuv_fbuf.fmt.width = pPPriv->surface->width;
++ pPPriv->yuv_fbuf.fmt.height = pPPriv->surface->height;
++ pPPriv->yuv_fbuf.fmt.bytesperline = pPPriv->surface->pitches[0];
++ pPPriv->yuv_fbuf.fmt.pixelformat = pPPriv->yuv_format;
++ pPPriv->yuv_fbuf.base =
++ (pointer)(pScrn->memPhysBase + pPPriv->surface->offsets[0]);
++ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
++ " surface: %p+%d = %p, %dx%d, pitch %d\n",
++ (void *)pScrn->memPhysBase, pPPriv->surface->offsets[0],
++ (void *)pScrn->memPhysBase+pPPriv->surface->offsets[0],
++ pPPriv->surface->width, pPPriv->surface->height,
++ pPPriv->surface->pitches[0]));
++ memset(&pPPriv->yuv_win, 0, sizeof(pPPriv->yuv_win));
++ pPPriv->yuv_win.w.left = 0;
++ pPPriv->yuv_win.w.top = 0;
++ pPPriv->yuv_win.w.width = pPPriv->surface->width;
++ pPPriv->yuv_win.w.height = pPPriv->surface->height;
++ }
+
+- if (0 == (pPPriv->myfmt->flags & VIDEO_INVERT_CLIPLIST)) {
+- /* invert cliplist */
+- newBox.x1 = drw_x;
+- newBox.y1 = drw_y;
+- newBox.x2 = drw_x + drw_w;
+- newBox.y2 = drw_y + drw_h;
++ /* program driver */
++ if (-1 == ioctl(V4L_FD, VIDIOC_S_FBUF, &pPPriv->yuv_fbuf)) {
++ xf86Msg(X_ERROR, "Error %d at VIDIOC_S_FBUF\n", errno);
++ return BadValue;
++ }
++ pPPriv->pixelformat = pPPriv->yuv_format;
++ if (-1 == SetV4LFmt(V4L_FD, pPPriv->pixelformat))
++ return BadValue;
+
+- if (pPPriv->myfmt->flags & VIDEO_CLIP_TO_VIEWPORT) {
+- /* trim to the viewport */
+- if(newBox.x1 < pScrn->frameX0)
+- newBox.x1 = pScrn->frameX0;
+- if(newBox.x2 > pScrn->frameX1)
+- newBox.x2 = pScrn->frameX1;
+-
+- if(newBox.y1 < pScrn->frameY0)
+- newBox.y1 = pScrn->frameY0;
+- if(newBox.y2 > pScrn->frameY1)
+- newBox.y2 = pScrn->frameY1;
+- }
++ memset(&fmt, 0, sizeof(fmt));
++ fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
++ memcpy(&fmt.fmt.win, &pPPriv->yuv_win, sizeof(pPPriv->yuv_win));
++ if (-1 == ioctl(V4L_FD, VIDIOC_S_FMT, &fmt)) {
++ xf86Msg(X_ERROR, "Error %d at VIDIOC_S_FMT\n", errno);
++ return BadValue;
++ }
++ if (-1 == ioctl(V4L_FD, VIDIOC_OVERLAY, &one)) {
++ xf86Msg(X_ERROR, "v4l: Error %d while enabling Overlay\n", errno);
++ return BadValue;
++ }
+
+- REGION_INIT(pScrn->pScreen, &newReg, &newBox, 1);
+- REGION_SUBTRACT(pScrn->pScreen, &newReg, &newReg, clipBoxes);
+- clipBoxes = &newReg;
+- }
+-
+- /* start overlay */
+- DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
+- "over: - %d,%d -> %d,%d (%dx%d) (yuv=%dx%d)\n",
+- drw_x, drw_y,
+- drw_x+drw_w, drw_y+drw_h,
+- drw_w, drw_h,
+- pPPriv->surface->width,pPPriv->surface->height));
+- pPPriv->myfmt->display(pPPriv->surface,
+- 0, 0, drw_x, drw_y,
+- pPPriv->surface->width,
+- pPPriv->surface->height,
+- drw_w, drw_h,
+- clipBoxes);
+- if (0 == (pPPriv->myfmt->flags & VIDEO_INVERT_CLIPLIST)) {
+- REGION_UNINIT(pScrn->pScreen, &newReg);
+- }
+- pPPriv->VideoOn = VIDEO_YUV;
+- return Success;
++ if (0 == (pPPriv->myfmt->flags & VIDEO_INVERT_CLIPLIST)) {
++ /* invert cliplist */
++ newBox.x1 = drw_x;
++ newBox.y1 = drw_y;
++ newBox.x2 = drw_x + drw_w;
++ newBox.y2 = drw_y + drw_h;
++
++ if (pPPriv->myfmt->flags & VIDEO_CLIP_TO_VIEWPORT) {
++ /* trim to the viewport */
++ if(newBox.x1 < pScrn->frameX0)
++ newBox.x1 = pScrn->frameX0;
++ if(newBox.x2 > pScrn->frameX1)
++ newBox.x2 = pScrn->frameX1;
++
++ if(newBox.y1 < pScrn->frameY0)
++ newBox.y1 = pScrn->frameY0;
++ if(newBox.y2 > pScrn->frameY1)
++ newBox.y2 = pScrn->frameY1;
++ }
++
++ REGION_INIT(pScrn->pScreen, &newReg, &newBox, 1);
++ REGION_SUBTRACT(pScrn->pScreen, &newReg, &newReg, clipBoxes);
++ clipBoxes = &newReg;
++ }
++
++ /* start overlay */
++ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
++ "over: - %d,%d -> %d,%d (%dx%d) (yuv=%dx%d)\n",
++ drw_x, drw_y,
++ drw_x+drw_w, drw_y+drw_h,
++ drw_w, drw_h,
++ pPPriv->surface->width,pPPriv->surface->height));
++ pPPriv->myfmt->display(pPPriv->surface,
++ 0, 0, drw_x, drw_y,
++ pPPriv->surface->width,
++ pPPriv->surface->height,
++ drw_w, drw_h,
++ clipBoxes);
++ if (0 == (pPPriv->myfmt->flags & VIDEO_INVERT_CLIPLIST)) {
++ REGION_UNINIT(pScrn->pScreen, &newReg);
++ }
++ pPPriv->VideoOn = VIDEO_YUV;
++ return Success;
+ }
+
+- fallback_to_rgb:
++fallback_to_rgb:
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/PV rgb\n"));
+ /* FIXME: vid-* is ignored for now, not supported by v4l */
+
+ dw = (drw_w < pPPriv->enc[pPPriv->cenc].width) ?
+- drw_w : pPPriv->enc[pPPriv->cenc].width;
++ drw_w : pPPriv->enc[pPPriv->cenc].width;
+ dh = (drw_h < pPPriv->enc[pPPriv->cenc].height) ?
+- drw_h : pPPriv->enc[pPPriv->cenc].height;
++ drw_h : pPPriv->enc[pPPriv->cenc].height;
+ /* if the window is too big, center the video */
+ dx = drw_x + (drw_w - dw)/2;
+ dy = drw_y + (drw_h - dh)/2;
+ /* bttv prefeares aligned addresses */
+ dx &= ~3;
+- if (dx < drw_x) dx += 4;
+- if (dx+dw > drw_x+drw_w) dw -= 4;
++ if (dx < drw_x)
++ dx += 4;
++ if (dx+dw > drw_x+drw_w)
++ dw -= 4;
+
+ /* window */
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, " win: %dx%d+%d+%d\n",
+- drw_w,drw_h,drw_x,drw_y));
++ drw_w,drw_h,drw_x,drw_y));
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, " use: %dx%d+%d+%d\n",
+- dw,dh,dx,dy));
+- pPPriv->rgb_win.x = dx;
+- pPPriv->rgb_win.y = dy;
+- pPPriv->rgb_win.width = dw;
+- pPPriv->rgb_win.height = dh;
+- pPPriv->rgb_win.flags = 0;
+-
++ dw,dh,dx,dy));
++ memset(&pPPriv->rgb_win, 0, sizeof(pPPriv->rgb_win));
++ pPPriv->rgb_win.w.left = dx;
++ pPPriv->rgb_win.w.top = dy;
++ pPPriv->rgb_win.w.width = dw;
++ pPPriv->rgb_win.w.height = dh;
++
+ /* clipping */
+ if (pPPriv->rgb_win.clips) {
+- xfree(pPPriv->rgb_win.clips);
+- pPPriv->rgb_win.clips = NULL;
++ free(pPPriv->rgb_win.clips);
++ pPPriv->rgb_win.clips = NULL;
+ }
+ pPPriv->rgb_win.clipcount = REGION_NUM_RECTS(clipBoxes);
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2," clip: have #%d\n",
+- pPPriv->rgb_win.clipcount));
++ pPPriv->rgb_win.clipcount));
+ if (0 != pPPriv->rgb_win.clipcount) {
+- pPPriv->rgb_win.clips = xalloc(pPPriv->rgb_win.clipcount*sizeof(struct video_clip));
+- if (NULL != pPPriv->rgb_win.clips) {
+- memset(pPPriv->rgb_win.clips,0,pPPriv->rgb_win.clipcount*sizeof(struct video_clip));
+- pBox = REGION_RECTS(clipBoxes);
+- clip = pPPriv->rgb_win.clips;
+- for (i = 0; i < REGION_NUM_RECTS(clipBoxes); i++, pBox++, clip++) {
+- clip->x = pBox->x1 - dx;
+- clip->y = pBox->y1 - dy;
+- clip->width = pBox->x2 - pBox->x1;
+- clip->height = pBox->y2 - pBox->y1;
+- }
+- }
++ pPPriv->rgb_win.clips = malloc(pPPriv->rgb_win.clipcount*sizeof(struct v4l2_clip));
++ if (NULL != pPPriv->rgb_win.clips) {
++ memset(pPPriv->rgb_win.clips,0,pPPriv->rgb_win.clipcount*sizeof(struct v4l2_clip));
++ pBox = REGION_RECTS(clipBoxes);
++ clip = pPPriv->rgb_win.clips;
++
++ /*
++ * FIXME: This code currently does nothing, as we don't emulate
++ * The V4L1 clipping stuff
++ */
++ for (i = 0; i < REGION_NUM_RECTS(clipBoxes); i++, pBox++, clip++) {
++ clip->c.left = pBox->x1 - dx;
++ clip->c.top = pBox->y1 - dy;
++ clip->c.width = pBox->x2 - pBox->x1;
++ clip->c.height = pBox->y2 - pBox->y1;
++ }
++ }
+ }
+
+ /* start */
+- if (-1 == ioctl(V4L_FD,VIDIOCSFBUF,&(pPPriv->rgb_fbuf)))
+- perror("ioctl VIDIOCSFBUF");
+- if (-1 == ioctl(V4L_FD,VIDIOCGPICT,&pPPriv->pict))
+- perror("ioctl VIDIOCGPICT");
+- pPPriv->pict.palette = pPPriv->rgbpalette;
+- pPPriv->pict.depth = pPPriv->rgbdepth;
+- if (-1 == ioctl(V4L_FD,VIDIOCSPICT,&pPPriv->pict))
+- perror("ioctl VIDIOCSPICT");
+- if (-1 == ioctl(V4L_FD,VIDIOCSWIN,&(pPPriv->rgb_win)))
+- perror("ioctl VIDIOCSWIN");
+- if (-1 == ioctl(V4L_FD, VIDIOCCAPTURE, &one))
+- perror("ioctl VIDIOCCAPTURE(1)");
++ if (-1 == ioctl(V4L_FD, VIDIOC_S_FBUF, &pPPriv->rgb_fbuf)) {
++ xf86Msg(X_ERROR, "Error %d at VIDIOC_S_FBUF\n", errno);
++ return BadValue;
++ }
++ if (-1 == GetV4LFmt(V4L_FD, &pPPriv->pixelformat)) {
++ xf86Msg(X_ERROR, "Error %d getting pixelformat\n", errno);
++ return BadValue;
++ }
++ pPPriv->pixelformat = pPPriv->rgb_fbuf.fmt.pixelformat;
++ if (-1 == SetV4LFmt(V4L_FD, pPPriv->pixelformat)) {
++ xf86Msg(X_ERROR, "Error %d getting pixelformat\n", errno);
++ return BadValue;
++ }
++ memset(&fmt, 0, sizeof(fmt));
++ fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
++ memcpy(&fmt.fmt.win, &pPPriv->rgb_win, sizeof(pPPriv->rgb_win));
++ if (-1 == ioctl(V4L_FD, VIDIOC_S_FMT, &fmt)) {
++ xf86Msg(X_ERROR, "Error %d at VIDIOC_S_FMT\n", errno);
++ return BadValue;
++ }
++ if (-1 == ioctl(V4L_FD, VIDIOC_OVERLAY, &one)) {
++ xf86Msg(X_ERROR, "v4l: Error %d while enabling Overlay\n", errno);
++ return BadValue;
++ }
+ pPPriv->VideoOn = VIDEO_RGB;
+
+ return Success;
+@@ -476,7 +703,7 @@ V4lPutStill(ScrnInfoPtr pScrn,
+ RegionPtr clipBoxes, pointer data, DrawablePtr pDraw)
+ {
+ #if 0
+- PortPrivPtr pPPriv = (PortPrivPtr) data;
++ PortPrivPtr pPPriv = (PortPrivPtr) data;
+ #endif
+
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/PS\n"));
+@@ -488,177 +715,152 @@ V4lPutStill(ScrnInfoPtr pScrn,
+ static void
+ V4lStopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
+ {
+- PortPrivPtr pPPriv = (PortPrivPtr) data;
++ PortPrivPtr pPPriv = (PortPrivPtr) data;
+ int zero=0;
+
+ if (VIDEO_OFF == pPPriv->VideoOn) {
+- DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
+- "Xv/StopVideo called with video already off\n"));
+- return;
++ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
++ "Xv/StopVideo called with video already off\n"));
++ return;
+ }
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/StopVideo shutdown=%d\n",shutdown));
+
+ if (!shutdown) {
+- /* just reclipping, we have to stop DMA transfers to the visible screen */
+- if (VIDEO_RGB == pPPriv->VideoOn) {
+- if (-1 == ioctl(V4L_FD, VIDIOCCAPTURE, &zero))
+- perror("ioctl VIDIOCCAPTURE(0)");
+- pPPriv->VideoOn = VIDEO_RECLIP;
+- }
++ /* just reclipping, we have to stop DMA transfers to the visible screen */
++ if (VIDEO_RGB == pPPriv->VideoOn) {
++ if (-1 == ioctl(V4L_FD, VIDIOC_OVERLAY, &zero))
++ xf86Msg(X_ERROR, "v4l: Error %d while disabling Overlay\n", errno);
++ pPPriv->VideoOn = VIDEO_RECLIP;
++ }
+ } else {
+- /* video stop - turn off and free everything */
+- if (VIDEO_YUV == pPPriv->VideoOn) {
+- pPPriv->myfmt->stop(pPPriv->surface);
+- pPPriv->myfmt->free_surface(pPPriv->surface);
+- xfree(pPPriv->surface);
+- pPPriv->surface = NULL;
+- }
+- if (-1 == ioctl(V4L_FD, VIDIOCCAPTURE, &zero))
+- perror("ioctl VIDIOCCAPTURE(0)");
+-
+- V4lCloseDevice(pPPriv,pScrn);
+- pPPriv->VideoOn = VIDEO_OFF;
++ /* video stop - turn off and free everything */
++ if (VIDEO_YUV == pPPriv->VideoOn) {
++ pPPriv->myfmt->stop(pPPriv->surface);
++ pPPriv->myfmt->free_surface(pPPriv->surface);
++ free(pPPriv->surface);
++ pPPriv->surface = NULL;
++ }
++ if (-1 == ioctl(V4L_FD, VIDIOC_OVERLAY, &zero))
++ xf86Msg(X_ERROR, "v4l: Error %d while disabling Overlay\n", errno);
++
++ V4lCloseDevice(pPPriv,pScrn);
++ pPPriv->VideoOn = VIDEO_OFF;
+ }
+ }
+
+-/* v4l uses range 0 - 65535; Xv uses -1000 - 1000 */
+-static int
+-v4l_to_xv(int val) {
+- val = val * 2000 / 65536 - 1000;
+- if (val < -1000) val = -1000;
+- if (val > 1000) val = 1000;
+- return val;
+-}
+-static int
+-xv_to_v4l(int val) {
+- val = val * 65536 / 2000 + 32768;
+- if (val < -0) val = 0;
+- if (val > 65535) val = 65535;
+- return val;
+-}
+-
+ static int
+ V4lSetPortAttribute(ScrnInfoPtr pScrn,
+ Atom attribute, INT32 value, pointer data)
+ {
+- PortPrivPtr pPPriv = (PortPrivPtr) data;
+- struct video_channel chan;
+- int ret = Success;
++ struct v4l2_control ctrl;
++ PortPrivPtr pPPriv = (PortPrivPtr) data;
++ int i, ret = BadValue;
+
+ if (V4lOpenDevice(pPPriv, pScrn))
+- return Success;
++ return Success;
+
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/SPA %d, %d\n",
+- attribute, value));
++ (int)attribute, (int)value));
+
+ if (-1 == V4L_FD) {
+- ret = Success;
++ ret = Success;
+ } else if (attribute == xvEncoding) {
+- if (value >= 0 && value < pPPriv->nenc) {
+- pPPriv->cenc = value;
+- chan.channel = pPPriv->input[value];
+- chan.norm = pPPriv->norm[value];
+- if (-1 == ioctl(V4L_FD,VIDIOCSCHAN,&chan))
+- perror("ioctl VIDIOCSCHAN");
+- } else {
+- ret = BadValue;
+- }
+- } else if (attribute == xvBrightness ||
+- attribute == xvContrast ||
+- attribute == xvSaturation ||
+- attribute == xvHue) {
+- ioctl(V4L_FD,VIDIOCGPICT,&pPPriv->pict);
+- if (attribute == xvBrightness) pPPriv->pict.brightness = xv_to_v4l(value);
+- if (attribute == xvContrast) pPPriv->pict.contrast = xv_to_v4l(value);
+- if (attribute == xvSaturation) pPPriv->pict.colour = xv_to_v4l(value);
+- if (attribute == xvHue) pPPriv->pict.hue = xv_to_v4l(value);
+- if (-1 == ioctl(V4L_FD,VIDIOCSPICT,&pPPriv->pict))
+- perror("ioctl VIDIOCSPICT");
+- } else if (attribute == xvMute ||
+- attribute == xvVolume) {
+- ioctl(V4L_FD,VIDIOCGAUDIO,&pPPriv->audio);
+- if (attribute == xvMute) {
+- if (value)
+- pPPriv->audio.flags |= VIDEO_AUDIO_MUTE;
+- else
+- pPPriv->audio.flags &= ~VIDEO_AUDIO_MUTE;
+- } else if (attribute == xvVolume) {
+- if (pPPriv->audio.flags & VIDEO_AUDIO_VOLUME)
+- pPPriv->audio.volume = xv_to_v4l(value);
+- } else {
+- ret = BadValue;
+- }
+- if (ret != BadValue)
+- if (-1 == ioctl(V4L_FD,VIDIOCSAUDIO,&pPPriv->audio))
+- perror("ioctl VIDIOCSAUDIO");
++ if (value < 0 || value >= pPPriv->nenc)
++ goto err;
++ if (ioctl(V4L_FD, VIDIOC_S_INPUT, &pPPriv->input[value]) == -1) {
++ xf86Msg(X_ERROR, "v4l: Error %d while setting input\n", errno);
++ goto err;
++ }
++ if (ioctl(V4L_FD, VIDIOC_S_STD, &pPPriv->norm[value]) == -1) {
++ xf86Msg(X_ERROR, "v4l: Error %d while setting standard\n", errno);
++ goto err;
++ }
++ pPPriv->cenc = value;
++ ret = Success;
+ } else if (attribute == xvFreq) {
+- unsigned long freq = value;
+- if (-1 == ioctl(V4L_FD,VIDIOCSFREQ,&freq))
+- perror("ioctl VIDIOCSFREQ");
+- } else if (0 != pPPriv->yuv_format &&
+- pPPriv->myfmt->setAttribute) {
+- /* not mine -> pass to yuv scaler driver */
+- ret = pPPriv->myfmt->setAttribute(pScrn, attribute, value);
++ struct v4l2_frequency freq;
++ memset(&freq, 0, sizeof(freq));
++ ioctl(V4L_FD, VIDIOC_G_FREQUENCY, &freq);
++ freq.frequency = value;
++ if (ioctl(V4L_FD, VIDIOC_S_FREQUENCY, &freq) == -1)
++ xf86Msg(X_ERROR, "v4l: Error %d while setting frequency\n", errno);
++ else
++ ret = Success;
+ } else {
+- ret = BadValue;
++ for (i = 0; i < pPPriv->n_qctrl; i++)
++ if (pPPriv->XvV4LCtrl[i].xv == attribute)
++ break;
++ if (i == pPPriv->n_qctrl) {
++ /* not mine -> pass to yuv scaler driver */
++ if (0 != pPPriv->yuv_format && pPPriv->myfmt->setAttribute)
++ ret = pPPriv->myfmt->setAttribute(pScrn, attribute, value);
++ else
++ ret = BadMatch;
++ goto err;
++ }
++ if (pPPriv->XvV4LCtrl[i].qctrl.flags & V4L2_CTRL_FLAG_DISABLED)
++ goto err;
++ ctrl.id = pPPriv->XvV4LCtrl[i].qctrl.id;
++ ctrl.value = value;
++ if (ioctl(V4L_FD, VIDIOC_S_CTRL, &ctrl) != 1)
++ ret = Success;
+ }
+
++err:
+ V4lCloseDevice(pPPriv,pScrn);
+ return ret;
+ }
+
+ static int
+-V4lGetPortAttribute(ScrnInfoPtr pScrn,
++V4lGetPortAttribute(ScrnInfoPtr pScrn,
+ Atom attribute, INT32 *value, pointer data)
+ {
++ struct v4l2_control ctrl;
+ PortPrivPtr pPPriv = (PortPrivPtr) data;
+- int ret = Success;
++ int i, ret = BadValue;
+
+ if (V4lOpenDevice(pPPriv, pScrn))
+- return Success;
++ return Success;
+
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/GPA %d\n",
+- attribute));
++ (int)attribute));
+
+ if (-1 == V4L_FD) {
+- ret = Success;
++ ret = Success;
+ } else if (attribute == xvEncoding) {
+- *value = pPPriv->cenc;
+- } else if (attribute == xvBrightness ||
+- attribute == xvContrast ||
+- attribute == xvSaturation ||
+- attribute == xvHue) {
+- ioctl(V4L_FD,VIDIOCGPICT,&pPPriv->pict);
+- if (attribute == xvBrightness) *value = v4l_to_xv(pPPriv->pict.brightness);
+- if (attribute == xvContrast) *value = v4l_to_xv(pPPriv->pict.contrast);
+- if (attribute == xvSaturation) *value = v4l_to_xv(pPPriv->pict.colour);
+- if (attribute == xvHue) *value = v4l_to_xv(pPPriv->pict.hue);
+- } else if (attribute == xvMute ||
+- attribute == xvVolume) {
+- ioctl(V4L_FD,VIDIOCGAUDIO,&pPPriv->audio);
+- if (attribute == xvMute) {
+- *value = (pPPriv->audio.flags & VIDEO_AUDIO_MUTE) ? 1 : 0;
+- } else if (attribute == xvVolume) {
+- if (pPPriv->audio.flags & VIDEO_AUDIO_VOLUME)
+- *value = v4l_to_xv(pPPriv->audio.volume);
+- } else {
+- ret = BadValue;
+- }
++ *value = pPPriv->cenc;
++ ret = Success;
+ } else if (attribute == xvFreq) {
+- unsigned long freq;
+- ioctl(V4L_FD,VIDIOCGFREQ,&freq);
+- *value = freq;
+- } else if (0 != pPPriv->yuv_format &&
+- pPPriv->myfmt->getAttribute) {
+- /* not mine -> pass to yuv scaler driver */
+- ret = pPPriv->myfmt->getAttribute(pScrn, attribute, value);
++ struct v4l2_frequency freq;
++ memset(&freq, 0, sizeof(freq));
++ if (ioctl(V4L_FD, VIDIOC_G_FREQUENCY, &freq) != -1) {
++ *value = freq.frequency;
++ ret = Success;
++ }
+ } else {
+- ret = BadValue;
++ for (i = 0; i < pPPriv->n_qctrl; i++)
++ if (pPPriv->XvV4LCtrl[i].xv == attribute)
++ break;
++ if (i == pPPriv->n_qctrl) {
++ /* not mine -> pass to yuv scaler driver */
++ if (0 != pPPriv->yuv_format && pPPriv->myfmt->getAttribute)
++ ret = pPPriv->myfmt->getAttribute(pScrn, attribute, value);
++ else
++ ret = BadMatch;
++ goto err;
++ }
++ if (pPPriv->XvV4LCtrl[i].qctrl.flags & V4L2_CTRL_FLAG_DISABLED)
++ goto err;
++ ctrl.id = pPPriv->XvV4LCtrl[i].qctrl.id;
++ if (ioctl(V4L_FD, VIDIOC_G_CTRL, &ctrl) != -1) {
++ *value = ctrl.value;
++ ret = Success;
++ }
+ }
++ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/GPA %d, %d\n",
++ (int)attribute, (int)*value));
+
+- DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/GPA %d, %d\n",
+- attribute, *value));
+-
++err:
+ V4lCloseDevice(pPPriv,pScrn);
+ return ret;
+ }
+@@ -673,15 +875,15 @@ V4lQueryBestSize(ScrnInfoPtr pScrn, Bool
+ int maxy = pPPriv->enc[pPPriv->cenc].height;
+
+ if (0 != pPPriv->yuv_format) {
+- *p_w = pPPriv->myfmt->max_width;
+- *p_h = pPPriv->myfmt->max_height;
++ *p_w = pPPriv->myfmt->max_width;
++ *p_h = pPPriv->myfmt->max_height;
+ } else {
+- *p_w = (drw_w < maxx) ? drw_w : maxx;
+- *p_h = (drw_h < maxy) ? drw_h : maxy;
++ *p_w = (drw_w < maxx) ? drw_w : maxx;
++ *p_h = (drw_h < maxy) ? drw_h : maxy;
+ }
+
+ DEBUG(xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "Xv/BS %d %dx%d %dx%d\n",
+- pPPriv->cenc,drw_w,drw_h,*p_w,*p_h));
++ pPPriv->cenc,drw_w,drw_h,*p_w,*p_h));
+ }
+
+ static const OptionInfoRec *
+@@ -693,132 +895,198 @@ V4LAvailableOptions(int chipid, int busi
+ static void
+ V4LIdentify(int flags)
+ {
+- xf86Msg(X_INFO, "v4l driver for Video4Linux\n");
+-}
++ xf86Msg(X_INFO, "v4l driver for Video4Linux overlay mode (V4L2)\n");
++}
+
+ static char*
+ fixname(char *str)
+ {
+ int s,d;
+ for (s=0, d=0;; s++) {
+- if (str[s] == '-')
+- continue;
+- str[d++] = tolower(str[s]);
+- if (0 == str[s])
+- break;
++ if (str[s] == '-')
++ continue;
++ str[d++] = tolower(str[s]);
++ if (0 == str[s])
++ break;
+ }
+ return str;
+ }
+
+ static int
+-v4l_add_enc(XF86VideoEncodingPtr enc, int i,
+- char *norm, char *input, int width, int height, int n, int d)
++AddV4LEnc(XF86VideoEncodingPtr enc, int entry,
++ char *norm, char *input, int width, int height, int n, int d)
+ {
+- enc[i].id = i;
+- enc[i].name = xalloc(strlen(norm)+strlen(input)+2);
+- if (NULL == enc[i].name)
+- return -1;
+- enc[i].width = width;
+- enc[i].height = height;
+- enc[i].rate.numerator = n;
+- enc[i].rate.denominator = d;
+- sprintf(enc[i].name,"%s-%s",norm,fixname(input));
++ enc->id = entry;
++ enc->name = malloc(strlen(norm) + strlen(input) + 2);
++ if (!enc->name)
++ return -1;
++
++ enc->width = width;
++ enc->height = height;
++ enc->rate.numerator = n;
++ enc->rate.denominator = d * 2; /* Refresh rate is twice, due to interlace */
++ sprintf(enc->name,"%s-%s",norm,fixname(input));
++
++ xf86Msg(X_INFO, "v4l: adding input %s, %dx%d %d fps\n",
++ enc->name, enc->width, enc->height, (d + n - 1)/n);
++
+ return 0;
+ }
+
++static int
++V4LGetStd(PortPrivPtr p, int fd)
++{
++ struct v4l2_standard standard;
++ int entries = 0;
++
++ /*
++ * 128 is just an arbitrary large number. There aren't that many video stds
++ * The max value is there just to avoid an endless loop, if the driver is
++ * broken.
++ */
++ for (entries = 0; entries < 128; entries++) {
++ memset(&standard, 0, sizeof(standard));
++ standard.index = entries;
++ if (-1 == ioctl(fd,VIDIOC_ENUMSTD, &standard))
++ break;
++ p->standard = realloc(p->standard, sizeof(standard) * (entries + 1));
++ memcpy(&p->standard[entries], &standard, sizeof(standard));
++ }
++
++ /*
++ * Some webcam drivers don't implement VIDIOC_ENUMSTD. Fake it
++ * This is currently unused, as no webcam driver allows OVERLAY mode,
++ * but the code is here, in the case some webcam driver starts allowing
++ * overlay.
++ * FIXME: Webcam drivers may use VIDIOC_ENUM_FRAMESIZES and
++ * VIDIOC_ENUM_FRAMEINTERVALS ioctl's that may help to fine-tune
++ * their needs. Those ioctl's could be used here in order to better
++ * support webcams.
++ */
++ if (!entries) {
++ xf86Msg(X_INFO, "v4l: VIDIOC_ENUMSTD error %d.\n",errno);
++ p->standard = realloc(p->standard, sizeof(standard) * (entries + 1));
++ p->standard[0].id = V4L2_STD_ALL;
++ strcpy((char *)p->standard[0].name, "CAMERA");
++ p->standard[0].frameperiod.numerator = 1001;
++ p->standard[0].frameperiod.denominator = 300001;
++ p->standard[0].framelines = 480;
++ entries++;
++ }
++ return entries;
++}
++
+ static void
+-V4LBuildEncodings(PortPrivPtr p, int fd, int channels)
++V4LBuildEncodings(PortPrivPtr p, int fd)
+ {
+- static struct video_channel channel;
+- int i,entries,have_bttv,bttv_ver;
++ unsigned int inp, std, num_std;
+
+-#define BTTV_VERSION _IOR('v' , BASE_VIDIOCPRIVATE+6, int)
+- have_bttv = 0;
+- if (-1 != ioctl(fd,BTTV_VERSION,&bttv_ver))
+- have_bttv = 1;
+-
+- entries = (have_bttv ? 7 : 3) * channels;
+- p->enc = xalloc(sizeof(XF86VideoEncodingRec) * entries);
+- if (NULL == p->enc)
+- goto fail;
+- memset(p->enc,0,sizeof(XF86VideoEncodingRec) * entries);
+- p->norm = xalloc(sizeof(int) * entries);
+- if (NULL == p->norm)
+- goto fail;
+- memset(p->norm,0,sizeof(int) * entries);
+- p->input = xalloc(sizeof(int) * entries);
+- if (NULL == p->input)
+- goto fail;
+- memset(p->input,0,sizeof(int) * entries);
++ num_std = V4LGetStd(p, fd);
+
+ p->nenc = 0;
+- for (i = 0; i < channels; i++) {
+- channel.channel = i;
+- if (-1 == ioctl(fd,VIDIOCGCHAN,&channel)) {
+- perror("ioctl VIDIOCGCHAN");
+- continue;
+- }
+-
+- v4l_add_enc(p->enc, p->nenc,"PAL", channel.name, 768,576, 1,50);
+- p->norm[p->nenc] = VIDEO_MODE_PAL;
+- p->input[p->nenc] = i;
+- p->nenc++;
+-
+- v4l_add_enc(p->enc,p->nenc,"NTSC", channel.name, 640,480, 1001,60000);
+- p->norm[p->nenc] = VIDEO_MODE_NTSC;
+- p->input[p->nenc] = i;
+- p->nenc++;
+-
+- v4l_add_enc(p->enc,p->nenc,"SECAM",channel.name, 768,576, 1,50);
+- p->norm[p->nenc] = VIDEO_MODE_SECAM;
+- p->input[p->nenc] = i;
+- p->nenc++;
+
+- if (have_bttv) {
+- /* workaround for a v4l design flaw: The v4l API knows just pal,
+- ntsc and secam. But there are a few more norms (pal versions
+- with a different timings used in south america for example).
+- The bttv driver can handle these too. */
+- if (0 != v4l_add_enc(p->enc,p->nenc,"PAL-Nc",channel.name,
+- 640, 576, 1,50))
+- goto fail;
+- p->norm[p->nenc] = 3;
+- p->input[p->nenc] = i;
+- p->nenc++;
++ /*
++ * 256 is just an arbitrary large number. There aren't that many video
++ * inputs on any driver. The max value is there just to avoid an endless
++ * loop, if the driver is broken.
++ */
++ for (inp = 0; inp < 256; inp++) {
++ struct v4l2_input input;
+
+- if (0 != v4l_add_enc(p->enc,p->nenc,"PAL-M",channel.name,
+- 640, 576, 1,50))
+- goto fail;
+- p->norm[p->nenc] = 4;
+- p->input[p->nenc] = i;
+- p->nenc++;
++ memset(&input, 0, sizeof(input));
++ input.index = inp;
++ if (ioctl(fd, VIDIOC_ENUMINPUT, &input) == -1)
++ break;
+
+- if (0 != v4l_add_enc(p->enc, p->nenc,"PAL-N", channel.name,
+- 768,576, 1,50))
+- goto fail;
+- p->norm[p->nenc] = 5;
+- p->input[p->nenc] = i;
+- p->nenc++;
+-
+- if (0 != v4l_add_enc(p->enc,p->nenc,"NTSC-JP", channel.name,
+- 640,480, 1001,60000))
+- goto fail;
+- p->norm[p->nenc] = 6;
+- p->input[p->nenc] = i;
+- p->nenc++;
+- }
++ for (std = 0; std < num_std; std++) {
++ int width, height;
++
++ /*
++ * Currently, this code is not reliable, due to driver
++ * non-compliance on both saa7134 and bttv. So, instead,
++ * just use the video standard information
++ */
++#if 0
++ struct v4l2_framebuffer fbuf;
++
++ /* Some webcam drivers will fail here, but that's OK */
++ ioctl(fd, VIDIOC_S_STD, &p->standard[std].id);
++
++ memset(&fbuf, 0, sizeof(fbuf));
++ if (ioctl(fd, VIDIOC_G_FBUF, &fbuf) == -1) {
++ xf86Msg(X_INFO, "v4l: Error %d: Can't get FBUF\n", errno);
++ return;
++ }
++ height = fbuf.fmt.height;
++ width = fbuf.fmt.width;
++
++ /*
++ * If the overlay method fails, get the resolution
++ * via checking V4L2_BUF_TYPE_VIDEO_CAPTURE
++ */
++ if (!height || !width) {
++ struct v4l2_format format;
++
++ format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ if (ioctl(fd, VIDIOC_G_FMT, &format) == -1) {
++ /* Hmm... device doesn't support capture. */
++ height = p->standard[std].framelines;
++ if (height == 480)
++ width = 640;
++ else if (height == 576)
++ width = 768;
++ else
++ continue;
++ } else {
++ height = format.fmt.pix.height;
++ width = format.fmt.pix.width;
++ }
++ }
++#else
++ if (p->standard[std].id & V4L2_STD_525_60) {
++ height = 480;
++ width = 640;
++ } else {
++ height = 576;
++ width = 768;
++ }
++
++#endif
++ /* Fixup for some driver bug */
++ if ((p->standard[std].id & V4L2_STD_525_60) && (height == 576))
++ height = 480;
++
++ p->enc = realloc(p->enc, sizeof(XF86VideoEncodingRec) * (p->nenc + 1));
++ p->norm = realloc(p->norm, sizeof(int) * (p->nenc + 1));
++ p->input = realloc(p->input, sizeof(int) * (p->nenc + 1));
++ if (!p->enc || !p->norm || !p->input)
++ goto fail;
++ if (AddV4LEnc(&p->enc[p->nenc], p->nenc,
++ (char *)p->standard[std].name,
++ (char *)input.name, width, height,
++ p->standard[std].frameperiod.numerator,
++ p->standard[std].frameperiod.denominator))
++ goto fail;
++ p->norm[p->nenc] = p->standard[std].id;
++ p->input[p->nenc] = inp;
++ p->nenc++;
++ }
+ }
++
++ if (!p->nenc)
++ xf86Msg(X_ERROR, "v4l: couldn't detect any valid input/standard\n");
+ return;
+-
+- fail:
++
++fail:
++ xf86Msg(X_ERROR, "v4l: Fail to get standards: %d\n", errno);
+ if (p->input)
+- xfree(p->input);
++ free(p->input);
+ p->input = NULL;
+ if (p->norm)
+- xfree(p->norm);
++ free(p->norm);
+ p->norm = NULL;
+ if (p->enc)
+- xfree(p->enc);
++ free(p->enc);
+ p->enc = NULL;
+ p->nenc = 0;
+ }
+@@ -826,75 +1094,35 @@ V4LBuildEncodings(PortPrivPtr p, int fd,
+ /* add a attribute a list */
+ static void
+ v4l_add_attr(XF86AttributeRec **list, int *count,
+- const XF86AttributeRec *attr)
++ const XF86AttributeRec *attr)
+ {
+ XF86AttributeRec *oldlist = *list;
+ int i;
++ Atom gpa;
+
+ for (i = 0; i < *count; i++) {
+- if (0 == strcmp((*list)[i].name,attr->name)) {
+- DEBUG(xf86Msg(X_INFO, "v4l: skip dup attr %s\n",attr->name));
+- return;
+- }
++ if (0 == strcmp((*list)[i].name,attr->name)) {
++ DEBUG(xf86Msg(X_INFO, "v4l: skip dup attr %s\n",attr->name));
++ return;
++ }
+ }
+-
+- DEBUG(xf86Msg(X_INFO, "v4l: add attr %s\n",attr->name));
+- *list = xalloc((*count + 1) * sizeof(XF86AttributeRec));
++
++ *list = malloc((*count + 1) * sizeof(XF86AttributeRec));
+ if (NULL == *list) {
+- *count = 0;
+- return;
++ *count = 0;
++ return;
+ }
+ if (*count)
+- memcpy(*list, oldlist, *count * sizeof(XF86AttributeRec));
++ memcpy(*list, oldlist, *count * sizeof(XF86AttributeRec));
+ memcpy(*list + *count, attr, sizeof(XF86AttributeRec));
++
++ gpa = MAKE_ATOM((*list)[*count].name);
++ xf86Msg(X_INFO, "v4l: add attr %s (Xv/GPA %d) (%d to %d)\n",
++ attr->name, (int)gpa, attr->min_value, attr->max_value);
++
+ (*count)++;
+ }
+
+-/* setup yuv overlay + hw scaling: look if we find some common video
+- format which both v4l driver and the X-Server can handle */
+-static void v4l_check_yuv(ScrnInfoPtr pScrn, PortPrivPtr pPPriv,
+- char *dev, int fd)
+-{
+- static const struct {
+- unsigned int v4l_palette;
+- unsigned int v4l_depth;
+- unsigned int xv_id;
+- unsigned int xv_format;
+- } yuvlist[] = {
+- { VIDEO_PALETTE_YUV422, 16, 0x32595559, XvPacked },
+- { VIDEO_PALETTE_UYVY, 16, 0x59565955, XvPacked },
+- { 0 /* end of list */ },
+- };
+- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+- int fmt,i;
+-
+- pPPriv->format = xf86XVQueryOffscreenImages(pScreen,&pPPriv->nformat);
+- for (fmt = 0; yuvlist[fmt].v4l_palette != 0; fmt++) {
+- /* check v4l ... */
+- ioctl(fd,VIDIOCGPICT,&pPPriv->pict);
+- pPPriv->pict.palette = yuvlist[fmt].v4l_palette;
+- pPPriv->pict.depth = yuvlist[fmt].v4l_depth;
+- if (-1 == ioctl(fd,VIDIOCSPICT,&pPPriv->pict))
+- continue;
+- ioctl(fd,VIDIOCGPICT,&pPPriv->pict);
+- if (pPPriv->pict.palette != yuvlist[fmt].v4l_palette)
+- continue;
+- /* ... works, check available offscreen image formats now ... */
+- for (i = 0; i < pPPriv->nformat; i++) {
+- if (pPPriv->format[i].image->id == yuvlist[fmt].xv_id &&
+- pPPriv->format[i].image->format == yuvlist[fmt].xv_format) {
+- /* ... match found, good. */
+- pPPriv->yuv_format = yuvlist[fmt].v4l_palette;
+- pPPriv->myfmt = pPPriv->format+i;
+- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+- "v4l[%s]: using hw video scaling [%4.4s].\n",
+- dev,(char*)&(pPPriv->format[i].image->id));
+- return;
+- }
+- }
+- }
+-}
+-
+ static int
+ V4LInit(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **adaptors)
+ {
+@@ -904,118 +1132,114 @@ V4LInit(ScrnInfoPtr pScrn, XF86VideoAdap
+ char dev[18];
+ int fd,i,j,d;
+
+- DEBUG(xf86Msg(X_INFO, "v4l: init start\n"));
++ for (i = 0, d = 0; d < MAX_V4L_DEVICES; d++) {
++ sprintf(dev, "/dev/video%d", d);
++ fd = open(dev, O_RDWR, 0);
++ if (fd == -1) {
++ sprintf(dev, "/dev/v4l/video%d", d);
++ fd = open(dev, O_RDWR, 0);
++ if (fd == -1)
++ break;
++ }
++ DEBUG(xf86Msg(X_INFO, "v4l: %s open ok\n",dev));
+
+- for (i = 0, d = 0; d < MAX_V4L_DEVICES; d++) {
+- sprintf(dev, "/dev/video%d", d);
+- fd = open(dev, O_RDWR, 0);
+- if (fd == -1) {
+- sprintf(dev, "/dev/v4l/video%d", d);
+- fd = open(dev, O_RDWR, 0);
+- if (fd == -1)
+- break;
+- }
+- DEBUG(xf86Msg(X_INFO, "v4l: %s open ok\n",dev));
++ /* our private data */
++ pPPriv = malloc(sizeof(PortPrivRec));
++ if (!pPPriv)
++ return FALSE;
++ memset(pPPriv,0,sizeof(PortPrivRec));
++ pPPriv->nr = d;
+
+- /* our private data */
+- pPPriv = xalloc(sizeof(PortPrivRec));
+- if (!pPPriv)
+- return FALSE;
+- memset(pPPriv,0,sizeof(PortPrivRec));
+- pPPriv->nr = d;
++ /* check device capabilities */
++ memset(&pPPriv->cap, 0, sizeof(&pPPriv->cap));
++ if (-1 == ioctl(fd, VIDIOC_QUERYCAP, &pPPriv->cap) ||
++ 0 == (pPPriv->cap.capabilities & V4L2_CAP_VIDEO_OVERLAY)) {
++ xf86Msg(X_ERROR, "v4l: %s: no overlay support\n",dev);
++ free(pPPriv);
++ close(fd);
++ continue;
++ }
+
+- /* check device */
+- if (-1 == ioctl(fd,VIDIOCGCAP,&pPPriv->cap) ||
+- 0 == (pPPriv->cap.type & VID_TYPE_OVERLAY)) {
+- DEBUG(xf86Msg(X_INFO, "v4l: %s: no overlay support\n",dev));
+- xfree(pPPriv);
+- close(fd);
+- continue;
+- }
+- strncpy(V4L_NAME, dev, 16);
+- V4LBuildEncodings(pPPriv,fd,pPPriv->cap.channels);
+- if (NULL == pPPriv->enc)
+- return FALSE;
+- v4l_check_yuv(pScrn,pPPriv,dev,fd);
+-
+- /* alloc VideoAdaptorRec */
+- VAR = xrealloc(VAR,sizeof(XF86VideoAdaptorPtr)*(i+1));
+- VAR[i] = xalloc(sizeof(XF86VideoAdaptorRec));
+- if (!VAR[i])
+- return FALSE;
+- memset(VAR[i],0,sizeof(XF86VideoAdaptorRec));
++ if (v4l_check_yuv(pScrn, pPPriv, dev, fd) == FALSE) {
++ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2,
++ "Xv Overlay not supported. Can't use v4l driver\n");
++ free(pPPriv);
++ close(fd);
++ continue;
++ }
+
++ xf86Msg(X_INFO, "v4l: enabling overlay mode for %s.\n", dev);
++ strncpy(V4L_NAME, dev, 16);
++ V4LBuildEncodings(pPPriv, fd);
++ if (NULL == pPPriv->enc)
++ return FALSE;
+
+- /* build attribute list */
+- for (j = 0; j < V4L_ATTR; j++) {
+- /* video attributes */
+- v4l_add_attr(&VAR[i]->pAttributes, &VAR[i]->nAttributes,
+- &Attributes[j]);
+- }
+- if (0 == ioctl(fd,VIDIOCGAUDIO,&pPPriv->audio)) {
+- /* audio attributes */
+- if (pPPriv->audio.flags & VIDEO_AUDIO_VOLUME)
+- v4l_add_attr(&VAR[i]->pAttributes, &VAR[i]->nAttributes,
+- &VolumeAttr);
+- if (pPPriv->audio.flags & VIDEO_AUDIO_MUTABLE)
+- v4l_add_attr(&VAR[i]->pAttributes, &VAR[i]->nAttributes,
+- &MuteAttr);
+- }
+- if (pPPriv->cap.type & VID_TYPE_TUNER) {
+- /* tuner attributes */
+- v4l_add_attr(&VAR[i]->pAttributes, &VAR[i]->nAttributes,
+- &FreqAttr);
+- }
+- if (0 != pPPriv->yuv_format) {
+- /* pass throuth scaler attributes */
+- for (j = 0; j < pPPriv->myfmt->num_attributes; j++) {
+- v4l_add_attr(&VAR[i]->pAttributes, &VAR[i]->nAttributes,
+- pPPriv->myfmt->attributes+j);
+- }
+- }
+-
+-
+- /* hook in private data */
+- Private = xalloc(sizeof(DevUnion));
+- if (!Private)
+- return FALSE;
+- memset(Private,0,sizeof(DevUnion));
+- Private->ptr = (pointer)pPPriv;
+- VAR[i]->pPortPrivates = Private;
+- VAR[i]->nPorts = 1;
++ /* alloc VideoAdaptorRec */
++ VAR = realloc(VAR,sizeof(XF86VideoAdaptorPtr)*(i+1));
++ VAR[i] = malloc(sizeof(XF86VideoAdaptorRec));
++ if (!VAR[i])
++ return FALSE;
++ memset(VAR[i],0,sizeof(XF86VideoAdaptorRec));
+
+- /* init VideoAdaptorRec */
+- VAR[i]->type = XvInputMask | XvWindowMask | XvVideoMask;
+- VAR[i]->name = "video4linux";
+- VAR[i]->flags = VIDEO_INVERT_CLIPLIST;
++ /* build attribute list */
++ AddAllV4LControls(pPPriv, &VAR[i]->pAttributes, &VAR[i]->nAttributes, fd);
+
+- VAR[i]->PutVideo = V4lPutVideo;
+- VAR[i]->PutStill = V4lPutStill;
+- VAR[i]->StopVideo = V4lStopVideo;
+- VAR[i]->SetPortAttribute = V4lSetPortAttribute;
+- VAR[i]->GetPortAttribute = V4lGetPortAttribute;
+- VAR[i]->QueryBestSize = V4lQueryBestSize;
++ for (j = 0; j < V4L_ATTR; j++) {
++ /* Other video attributes */
++ v4l_add_attr(&VAR[i]->pAttributes, &VAR[i]->nAttributes,
++ &Attributes[j]);
++ }
++ if (pPPriv->cap.capabilities & V4L2_CAP_TUNER) {
++ /* tuner attributes */
++ v4l_add_attr(&VAR[i]->pAttributes, &VAR[i]->nAttributes,
++ &FreqAttr);
++ }
+
+- VAR[i]->nEncodings = pPPriv->nenc;
+- VAR[i]->pEncodings = pPPriv->enc;
+- VAR[i]->nFormats =
+- sizeof(InputVideoFormats) / sizeof(InputVideoFormats[0]);
+- VAR[i]->pFormats = InputVideoFormats;
++ /* Initialize yuv_format */
++ if (0 != pPPriv->yuv_format) {
++ /* pass throuth scaler attributes */
++ for (j = 0; j < pPPriv->myfmt->num_attributes; j++) {
++ v4l_add_attr(&VAR[i]->pAttributes, &VAR[i]->nAttributes,
++ pPPriv->myfmt->attributes+j);
++ }
++ }
+
+- if (fd != -1)
+- close(fd);
+- i++;
++ DEBUG(xf86Msg(X_INFO, "v4l: saving config into driver data\n"));
++ /* hook in private data */
++ Private = malloc(sizeof(DevUnion));
++ if (!Private)
++ return FALSE;
++ memset(Private,0,sizeof(DevUnion));
++ Private->ptr = (pointer)pPPriv;
++ VAR[i]->pPortPrivates = Private;
++ VAR[i]->nPorts = 1;
++
++ /* init VideoAdaptorRec */
++ VAR[i]->type = XvInputMask | XvWindowMask | XvVideoMask;
++ VAR[i]->name = "video4linux";
++ VAR[i]->flags = VIDEO_INVERT_CLIPLIST;
++
++ VAR[i]->PutVideo = V4lPutVideo;
++ VAR[i]->PutStill = V4lPutStill;
++ VAR[i]->StopVideo = V4lStopVideo;
++ VAR[i]->SetPortAttribute = V4lSetPortAttribute;
++ VAR[i]->GetPortAttribute = V4lGetPortAttribute;
++ VAR[i]->QueryBestSize = V4lQueryBestSize;
++
++ VAR[i]->nEncodings = pPPriv->nenc;
++ VAR[i]->pEncodings = pPPriv->enc;
++ VAR[i]->nFormats = sizeof(InputVideoFormats) / sizeof(InputVideoFormats[0]);
++ VAR[i]->pFormats = InputVideoFormats;
++
++ if (fd != -1) {
++ DEBUG(xf86Msg(X_INFO, "v4l: %s init finished.\n",dev));
++ close(fd);
++ }
++ i++;
+ }
+
+ xvEncoding = MAKE_ATOM(XV_ENCODING);
+- xvHue = MAKE_ATOM(XV_HUE);
+- xvSaturation = MAKE_ATOM(XV_SATURATION);
+- xvBrightness = MAKE_ATOM(XV_BRIGHTNESS);
+- xvContrast = MAKE_ATOM(XV_CONTRAST);
+-
+ xvFreq = MAKE_ATOM(XV_FREQ);
+- xvMute = MAKE_ATOM(XV_MUTE);
+- xvVolume = MAKE_ATOM(XV_VOLUME);
+
+ DEBUG(xf86Msg(X_INFO, "v4l: init done, %d device(s) found\n",i));
+
+@@ -1024,10 +1248,43 @@ V4LInit(ScrnInfoPtr pScrn, XF86VideoAdap
+ }
+
+ static Bool
++V4LDetect(void)
++{
++ struct v4l2_capability cap;
++ int fd, d, n = 0;
++ char dev[18];
++
++ for (d = 0; d < MAX_V4L_DEVICES; d++) {
++ sprintf(dev, "/dev/video%d", d);
++ fd = open(dev, O_RDWR, 0);
++ if (fd == -1) {
++ sprintf(dev, "/dev/v4l/video%d", d);
++ fd = open(dev, O_RDWR, 0);
++ if (fd == -1)
++ break;
++ }
++ close (fd);
++ memset(&cap, 0, sizeof(cap));
++ if (!ioctl(fd, VIDIOC_QUERYCAP, &cap) &&
++ (cap.capabilities & V4L2_CAP_VIDEO_OVERLAY))
++ n++;
++ }
++ xf86Msg(X_INFO, "v4l: %d video adapters with overlay support detected\n", n);
++
++ return (n > 0) ? TRUE : FALSE;
++}
++
++static Bool
+ V4LProbe(DriverPtr drv, int flags)
+ {
+- if (flags & PROBE_DETECT)
+- return TRUE;
++ /*
++ * Don't try to register adapter at the detection phase, as Xv
++ * extensions won't be there
++ */
++ if (flags == PROBE_DETECT)
++ return V4LDetect();
++
++ DEBUG(xf86Msg(X_INFO, "v4l: Initiating device probe\n"));
+
+ xf86XVRegisterGenericAdaptorDriver(V4LInit);
+ drv->refCount++;
+diff --git a/src/videodev.h b/src/videodev.h
+deleted file mode 100644
+--- a/src/videodev.h
++++ /dev/null
+@@ -1,254 +0,0 @@
+-#ifndef __LINUX_VIDEODEV_H
+-#define __LINUX_VIDEODEV_H
+-
+-/* Linux V4L API, Version 1
+- * videodev.h from v4l driver in Linux 2.2.3
+- *
+- * Used here with the explicit permission of the original author, Alan Cox.
+- * <alan@lxorguk.ukuu.org.uk>
+- */
+-
+-#include <X11/Xmd.h>
+-
+-#define VID_TYPE_CAPTURE 1 /* Can capture */
+-#define VID_TYPE_TUNER 2 /* Can tune */
+-#define VID_TYPE_TELETEXT 4 /* Does teletext */
+-#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
+-#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
+-#define VID_TYPE_CLIPPING 32 /* Can clip */
+-#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
+-#define VID_TYPE_SCALES 128 /* Scalable */
+-#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
+-#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
+-
+-struct video_capability
+-{
+- char name[32];
+- int type;
+- int channels; /* Num channels */
+- int audios; /* Num audio devices */
+- int maxwidth; /* Supported width */
+- int maxheight; /* And height */
+- int minwidth; /* Supported width */
+- int minheight; /* And height */
+-};
+-
+-
+-struct video_channel
+-{
+- int channel;
+- char name[32];
+- int tuners;
+- CARD32 flags;
+-#define VIDEO_VC_TUNER 1 /* Channel has a tuner */
+-#define VIDEO_VC_AUDIO 2 /* Channel has audio */
+- CARD16 type;
+-#define VIDEO_TYPE_TV 1
+-#define VIDEO_TYPE_CAMERA 2
+- CARD16 norm; /* Norm set by channel */
+-};
+-
+-struct video_tuner
+-{
+- int tuner;
+- char name[32];
+- unsigned long rangelow, rangehigh; /* Tuner range */
+- CARD32 flags;
+-#define VIDEO_TUNER_PAL 1
+-#define VIDEO_TUNER_NTSC 2
+-#define VIDEO_TUNER_SECAM 4
+-#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
+-#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
+-#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
+- CARD16 mode; /* PAL/NTSC/SECAM/OTHER */
+-#define VIDEO_MODE_PAL 0
+-#define VIDEO_MODE_NTSC 1
+-#define VIDEO_MODE_SECAM 2
+-#define VIDEO_MODE_AUTO 3
+- CARD16 signal; /* Signal strength 16bit scale */
+-};
+-
+-struct video_picture
+-{
+- CARD16 brightness;
+- CARD16 hue;
+- CARD16 colour;
+- CARD16 contrast;
+- CARD16 whiteness; /* Black and white only */
+- CARD16 depth; /* Capture depth */
+- CARD16 palette; /* Palette in use */
+-#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
+-#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
+-#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
+-#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
+-#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
+-#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
+-#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
+-#define VIDEO_PALETTE_YUYV 8
+-#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
+-#define VIDEO_PALETTE_YUV420 10
+-#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
+-#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
+-#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
+-#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
+-#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
+-#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
+-#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
+-#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
+-};
+-
+-struct video_audio
+-{
+- int audio; /* Audio channel */
+- CARD16 volume; /* If settable */
+- CARD16 bass, treble;
+- CARD32 flags;
+-#define VIDEO_AUDIO_MUTE 1
+-#define VIDEO_AUDIO_MUTABLE 2
+-#define VIDEO_AUDIO_VOLUME 4
+-#define VIDEO_AUDIO_BASS 8
+-#define VIDEO_AUDIO_TREBLE 16
+- char name[16];
+-#define VIDEO_SOUND_MONO 1
+-#define VIDEO_SOUND_STEREO 2
+-#define VIDEO_SOUND_LANG1 4
+-#define VIDEO_SOUND_LANG2 8
+- CARD16 mode;
+- CARD16 balance; /* Stereo balance */
+- CARD16 step; /* Step actual volume uses */
+-};
+-
+-struct video_clip
+-{
+- INT32 x,y;
+- INT32 width, height;
+- struct video_clip *next; /* For user use/driver use only */
+-};
+-
+-struct video_window
+-{
+- CARD32 x,y; /* Position of window */
+- CARD32 width,height; /* Its size */
+- CARD32 chromakey;
+- CARD32 flags;
+- struct video_clip *clips; /* Set only */
+- int clipcount;
+-#define VIDEO_WINDOW_INTERLACE 1
+-#define VIDEO_CLIP_BITMAP -1
+-/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
+-#define VIDEO_CLIPMAP_SIZE (128 * 625)
+-};
+-
+-struct video_capture
+-{
+- CARD32 x,y; /* Offsets into image */
+- CARD32 width, height; /* Area to capture */
+- CARD16 decimation; /* Decimation divder */
+- CARD16 flags; /* Flags for capture */
+-#define VIDEO_CAPTURE_ODD 0 /* Temporal */
+-#define VIDEO_CAPTURE_EVEN 1
+-};
+-
+-struct video_buffer
+-{
+- void *base;
+- int height,width;
+- int depth;
+- int bytesperline;
+-};
+-
+-struct video_mmap
+-{
+- unsigned int frame; /* Frame (0 - n) for double buffer */
+- int height,width;
+- unsigned int format; /* should be VIDEO_PALETTE_* */
+-};
+-
+-struct video_key
+-{
+- CARD8 key[8];
+- CARD32 flags;
+-};
+-
+-
+-#define VIDEO_MAX_FRAME 32
+-
+-struct video_mbuf
+-{
+- int size; /* Total memory to map */
+- int frames; /* Frames */
+- int offsets[VIDEO_MAX_FRAME];
+-};
+-
+-
+-#define VIDEO_NO_UNIT (-1)
+-
+-
+-struct video_unit
+-{
+- int video; /* Video minor */
+- int vbi; /* VBI minor */
+- int radio; /* Radio minor */
+- int audio; /* Audio minor */
+- int teletext; /* Teletext minor */
+-};
+-
+-#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
+-#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
+-#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
+-#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
+-#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
+-#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
+-#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
+-#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
+-#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Set the video overlay window */
+-#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
+-#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
+-#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
+-#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */
+-#define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
+-#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
+-#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
+-#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
+-#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */
+-#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */
+-#define VIDIOCGMBUF _IOR('v', 20, struct video_mbuf) /* Memory map buffer info */
+-#define VIDIOCGUNIT _IOR('v', 21, struct video_unit) /* Get attached units */
+-#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get frame buffer */
+-#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set frame buffer - root only */
+-
+-#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
+-
+-
+-#define VID_HARDWARE_BT848 1
+-#define VID_HARDWARE_QCAM_BW 2
+-#define VID_HARDWARE_PMS 3
+-#define VID_HARDWARE_QCAM_C 4
+-#define VID_HARDWARE_PSEUDO 5
+-#define VID_HARDWARE_SAA5249 6
+-#define VID_HARDWARE_AZTECH 7
+-#define VID_HARDWARE_SF16MI 8
+-#define VID_HARDWARE_RTRACK 9
+-#define VID_HARDWARE_ZOLTRIX 10
+-#define VID_HARDWARE_SAA7146 11
+-#define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */
+-#define VID_HARDWARE_RTRACK2 13
+-#define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */
+-#define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */
+-#define VID_HARDWARE_PLANB 16 /* PowerMac motherboard video-in */
+-#define VID_HARDWARE_BROADWAY 17 /* Broadway project */
+-#define VID_HARDWARE_GEMTEK 18
+-#define VID_HARDWARE_TYPHOON 19
+-#define VID_HARDWARE_VINO 20 /* Reserved for SGI Indy Vino */
+-
+-/*
+- * Initialiser list
+- */
+-
+-struct video_init
+-{
+- char *name;
+- int (*init)(struct video_init *);
+-};
+-
+-#endif
+diff --git a/src/videodev2.h b/src/videodev2.h
+new file mode 100644
+--- /dev/null
++++ b/src/videodev2.h
+@@ -0,0 +1,1929 @@
++/*
++ * Video for Linux Two header file
++ *
++ * Copyright (C) 1999-2007 the contributors
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * Alternatively you can redistribute this file under the terms of the
++ * BSD license as stated below:
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in
++ * the documentation and/or other materials provided with the
++ * distribution.
++ * 3. The names of its contributors may not be used to endorse or promote
++ * products derived from this software without specific prior written
++ * permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
++ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
++ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ *
++ * Header file for v4l or V4L2 drivers and applications
++ * with public API.
++ * All kernel-specific stuff were moved to media/v4l2-dev.h, so
++ * no #if __KERNEL tests are allowed here
++ *
++ * See http://linuxtv.org for more info
++ *
++ * Author: Bill Dirks <bill@thedirks.org>
++ * Justin Schoeman
++ * Hans Verkuil <hverkuil@xs4all.nl>
++ * et al.
++ */
++#ifndef __LINUX_VIDEODEV2_H
++#define __LINUX_VIDEODEV2_H
++
++#include <linux/ioctl.h>
++#include <linux/types.h>
++#include <sys/time.h>
++
++/*
++ * Common stuff for both V4L1 and V4L2
++ * Moved from videodev.h
++ */
++#define VIDEO_MAX_FRAME 32
++#define VIDEO_MAX_PLANES 8
++
++/* These defines are V4L1 specific and should not be used with the V4L2 API!
++ They will be removed from this header in the future. */
++
++#define VID_TYPE_CAPTURE 1 /* Can capture */
++#define VID_TYPE_TUNER 2 /* Can tune */
++#define VID_TYPE_TELETEXT 4 /* Does teletext */
++#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
++#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
++#define VID_TYPE_CLIPPING 32 /* Can clip */
++#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
++#define VID_TYPE_SCALES 128 /* Scalable */
++#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
++#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
++#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
++#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
++#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
++#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
++
++/*
++ * M I S C E L L A N E O U S
++ */
++
++/* Four-character-code (FOURCC) */
++#define v4l2_fourcc(a, b, c, d)\
++ ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
++
++/*
++ * E N U M S
++ */
++enum v4l2_field {
++ V4L2_FIELD_ANY = 0, /* driver can choose from none,
++ top, bottom, interlaced
++ depending on whatever it thinks
++ is approximate ... */
++ V4L2_FIELD_NONE = 1, /* this device has no fields ... */
++ V4L2_FIELD_TOP = 2, /* top field only */
++ V4L2_FIELD_BOTTOM = 3, /* bottom field only */
++ V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */
++ V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one
++ buffer, top-bottom order */
++ V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */
++ V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into
++ separate buffers */
++ V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field
++ first and the top field is
++ transmitted first */
++ V4L2_FIELD_INTERLACED_BT = 9, /* both fields interlaced, top field
++ first and the bottom field is
++ transmitted first */
++};
++#define V4L2_FIELD_HAS_TOP(field) \
++ ((field) == V4L2_FIELD_TOP ||\
++ (field) == V4L2_FIELD_INTERLACED ||\
++ (field) == V4L2_FIELD_INTERLACED_TB ||\
++ (field) == V4L2_FIELD_INTERLACED_BT ||\
++ (field) == V4L2_FIELD_SEQ_TB ||\
++ (field) == V4L2_FIELD_SEQ_BT)
++#define V4L2_FIELD_HAS_BOTTOM(field) \
++ ((field) == V4L2_FIELD_BOTTOM ||\
++ (field) == V4L2_FIELD_INTERLACED ||\
++ (field) == V4L2_FIELD_INTERLACED_TB ||\
++ (field) == V4L2_FIELD_INTERLACED_BT ||\
++ (field) == V4L2_FIELD_SEQ_TB ||\
++ (field) == V4L2_FIELD_SEQ_BT)
++#define V4L2_FIELD_HAS_BOTH(field) \
++ ((field) == V4L2_FIELD_INTERLACED ||\
++ (field) == V4L2_FIELD_INTERLACED_TB ||\
++ (field) == V4L2_FIELD_INTERLACED_BT ||\
++ (field) == V4L2_FIELD_SEQ_TB ||\
++ (field) == V4L2_FIELD_SEQ_BT)
++
++enum v4l2_buf_type {
++ V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
++ V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
++ V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
++ V4L2_BUF_TYPE_VBI_CAPTURE = 4,
++ V4L2_BUF_TYPE_VBI_OUTPUT = 5,
++ V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
++ V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
++#if 1
++ /* Experimental */
++ V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
++#endif
++ V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,
++ V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,
++ V4L2_BUF_TYPE_PRIVATE = 0x80,
++};
++
++#define V4L2_TYPE_IS_MULTIPLANAR(type) \
++ ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
++ || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
++
++#define V4L2_TYPE_IS_OUTPUT(type) \
++ ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT \
++ || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE \
++ || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \
++ || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \
++ || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \
++ || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT)
++
++enum v4l2_tuner_type {
++ V4L2_TUNER_RADIO = 1,
++ V4L2_TUNER_ANALOG_TV = 2,
++ V4L2_TUNER_DIGITAL_TV = 3,
++};
++
++enum v4l2_memory {
++ V4L2_MEMORY_MMAP = 1,
++ V4L2_MEMORY_USERPTR = 2,
++ V4L2_MEMORY_OVERLAY = 3,
++};
++
++/* see also http://vektor.theorem.ca/graphics/ycbcr/ */
++enum v4l2_colorspace {
++ /* ITU-R 601 -- broadcast NTSC/PAL */
++ V4L2_COLORSPACE_SMPTE170M = 1,
++
++ /* 1125-Line (US) HDTV */
++ V4L2_COLORSPACE_SMPTE240M = 2,
++
++ /* HD and modern captures. */
++ V4L2_COLORSPACE_REC709 = 3,
++
++ /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */
++ V4L2_COLORSPACE_BT878 = 4,
++
++ /* These should be useful. Assume 601 extents. */
++ V4L2_COLORSPACE_470_SYSTEM_M = 5,
++ V4L2_COLORSPACE_470_SYSTEM_BG = 6,
++
++ /* I know there will be cameras that send this. So, this is
++ * unspecified chromaticities and full 0-255 on each of the
++ * Y'CbCr components
++ */
++ V4L2_COLORSPACE_JPEG = 7,
++
++ /* For RGB colourspaces, this is probably a good start. */
++ V4L2_COLORSPACE_SRGB = 8,
++};
++
++enum v4l2_priority {
++ V4L2_PRIORITY_UNSET = 0, /* not initialized */
++ V4L2_PRIORITY_BACKGROUND = 1,
++ V4L2_PRIORITY_INTERACTIVE = 2,
++ V4L2_PRIORITY_RECORD = 3,
++ V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE,
++};
++
++struct v4l2_rect {
++ __s32 left;
++ __s32 top;
++ __s32 width;
++ __s32 height;
++};
++
++struct v4l2_fract {
++ __u32 numerator;
++ __u32 denominator;
++};
++
++/*
++ * D R I V E R C A P A B I L I T I E S
++ */
++struct v4l2_capability {
++ __u8 driver[16]; /* i.e. "bttv" */
++ __u8 card[32]; /* i.e. "Hauppauge WinTV" */
++ __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */
++ __u32 version; /* should use KERNEL_VERSION() */
++ __u32 capabilities; /* Device capabilities */
++ __u32 reserved[4];
++};
++
++/* Values for 'capabilities' field */
++#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */
++#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */
++#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */
++#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */
++#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */
++#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */
++#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */
++#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
++#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */
++#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */
++#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */
++
++/* Is a video capture device that supports multiplanar formats */
++#define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000
++/* Is a video output device that supports multiplanar formats */
++#define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000
++
++#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
++#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
++#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
++#define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */
++
++#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
++#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
++#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */
++
++/*
++ * V I D E O I M A G E F O R M A T
++ */
++struct v4l2_pix_format {
++ __u32 width;
++ __u32 height;
++ __u32 pixelformat;
++ enum v4l2_field field;
++ __u32 bytesperline; /* for padding, zero if unused */
++ __u32 sizeimage;
++ enum v4l2_colorspace colorspace;
++ __u32 priv; /* private data, depends on pixelformat */
++};
++
++/* Pixel format FOURCC depth Description */
++
++/* RGB formats */
++#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */
++#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */
++#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
++#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
++#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */
++#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */
++#define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */
++#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */
++#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
++#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
++#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */
++
++/* Grey formats */
++#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
++#define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */
++#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */
++#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */
++#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
++
++/* Palette formats */
++#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */
++
++/* Luminance+Chrominance formats */
++#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */
++#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */
++#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */
++#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */
++#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */
++#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */
++#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */
++#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */
++#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 16 YVU411 planar */
++#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */
++#define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */
++#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */
++#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */
++#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */
++#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */
++#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */
++#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */
++#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */
++
++/* two planes -- one Y, one Cr + Cb interleaved */
++#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */
++#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */
++#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */
++#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */
++
++/* two non contiguous planes - one Y, one Cr + Cb interleaved */
++#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */
++#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */
++
++/* three non contiguous planes - Y, Cb, Cr */
++#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
++
++/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
++#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
++#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
++#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */
++#define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */
++#define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */
++#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */
++#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */
++#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */
++ /* 10bit raw bayer DPCM compressed to 8 bits */
++#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
++ /*
++ * 10bit raw bayer, expanded to 16 bits
++ * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
++ */
++#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */
++
++/* compressed formats */
++#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */
++#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */
++#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */
++#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */
++
++/* Vendor-specific formats */
++#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
++#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */
++#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */
++#define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */
++#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */
++#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */
++#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */
++#define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S', '5', '0', '1') /* YUYV per line */
++#define V4L2_PIX_FMT_SPCA505 v4l2_fourcc('S', '5', '0', '5') /* YYUV per line */
++#define V4L2_PIX_FMT_SPCA508 v4l2_fourcc('S', '5', '0', '8') /* YUVY per line */
++#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */
++#define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */
++#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
++#define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */
++#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */
++#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
++#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
++#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
++#define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */
++#define V4L2_PIX_FMT_TM6000 v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */
++#define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */
++#define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */
++
++/*
++ * F O R M A T E N U M E R A T I O N
++ */
++struct v4l2_fmtdesc {
++ __u32 index; /* Format number */
++ enum v4l2_buf_type type; /* buffer type */
++ __u32 flags;
++ __u8 description[32]; /* Description string */
++ __u32 pixelformat; /* Format fourcc */
++ __u32 reserved[4];
++};
++
++#define V4L2_FMT_FLAG_COMPRESSED 0x0001
++#define V4L2_FMT_FLAG_EMULATED 0x0002
++
++#if 1
++ /* Experimental Frame Size and frame rate enumeration */
++/*
++ * F R A M E S I Z E E N U M E R A T I O N
++ */
++enum v4l2_frmsizetypes {
++ V4L2_FRMSIZE_TYPE_DISCRETE = 1,
++ V4L2_FRMSIZE_TYPE_CONTINUOUS = 2,
++ V4L2_FRMSIZE_TYPE_STEPWISE = 3,
++};
++
++struct v4l2_frmsize_discrete {
++ __u32 width; /* Frame width [pixel] */
++ __u32 height; /* Frame height [pixel] */
++};
++
++struct v4l2_frmsize_stepwise {
++ __u32 min_width; /* Minimum frame width [pixel] */
++ __u32 max_width; /* Maximum frame width [pixel] */
++ __u32 step_width; /* Frame width step size [pixel] */
++ __u32 min_height; /* Minimum frame height [pixel] */
++ __u32 max_height; /* Maximum frame height [pixel] */
++ __u32 step_height; /* Frame height step size [pixel] */
++};
++
++struct v4l2_frmsizeenum {
++ __u32 index; /* Frame size number */
++ __u32 pixel_format; /* Pixel format */
++ __u32 type; /* Frame size type the device supports. */
++
++ union { /* Frame size */
++ struct v4l2_frmsize_discrete discrete;
++ struct v4l2_frmsize_stepwise stepwise;
++ };
++
++ __u32 reserved[2]; /* Reserved space for future use */
++};
++
++/*
++ * F R A M E R A T E E N U M E R A T I O N
++ */
++enum v4l2_frmivaltypes {
++ V4L2_FRMIVAL_TYPE_DISCRETE = 1,
++ V4L2_FRMIVAL_TYPE_CONTINUOUS = 2,
++ V4L2_FRMIVAL_TYPE_STEPWISE = 3,
++};
++
++struct v4l2_frmival_stepwise {
++ struct v4l2_fract min; /* Minimum frame interval [s] */
++ struct v4l2_fract max; /* Maximum frame interval [s] */
++ struct v4l2_fract step; /* Frame interval step size [s] */
++};
++
++struct v4l2_frmivalenum {
++ __u32 index; /* Frame format index */
++ __u32 pixel_format; /* Pixel format */
++ __u32 width; /* Frame width */
++ __u32 height; /* Frame height */
++ __u32 type; /* Frame interval type the device supports. */
++
++ union { /* Frame interval */
++ struct v4l2_fract discrete;
++ struct v4l2_frmival_stepwise stepwise;
++ };
++
++ __u32 reserved[2]; /* Reserved space for future use */
++};
++#endif
++
++/*
++ * T I M E C O D E
++ */
++struct v4l2_timecode {
++ __u32 type;
++ __u32 flags;
++ __u8 frames;
++ __u8 seconds;
++ __u8 minutes;
++ __u8 hours;
++ __u8 userbits[4];
++};
++
++/* Type */
++#define V4L2_TC_TYPE_24FPS 1
++#define V4L2_TC_TYPE_25FPS 2
++#define V4L2_TC_TYPE_30FPS 3
++#define V4L2_TC_TYPE_50FPS 4
++#define V4L2_TC_TYPE_60FPS 5
++
++/* Flags */
++#define V4L2_TC_FLAG_DROPFRAME 0x0001 /* "drop-frame" mode */
++#define V4L2_TC_FLAG_COLORFRAME 0x0002
++#define V4L2_TC_USERBITS_field 0x000C
++#define V4L2_TC_USERBITS_USERDEFINED 0x0000
++#define V4L2_TC_USERBITS_8BITCHARS 0x0008
++/* The above is based on SMPTE timecodes */
++
++struct v4l2_jpegcompression {
++ int quality;
++
++ int APPn; /* Number of APP segment to be written,
++ * must be 0..15 */
++ int APP_len; /* Length of data in JPEG APPn segment */
++ char APP_data[60]; /* Data in the JPEG APPn segment. */
++
++ int COM_len; /* Length of data in JPEG COM segment */
++ char COM_data[60]; /* Data in JPEG COM segment */
++
++ __u32 jpeg_markers; /* Which markers should go into the JPEG
++ * output. Unless you exactly know what
++ * you do, leave them untouched.
++ * Inluding less markers will make the
++ * resulting code smaller, but there will
++ * be fewer applications which can read it.
++ * The presence of the APP and COM marker
++ * is influenced by APP_len and COM_len
++ * ONLY, not by this property! */
++
++#define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */
++#define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */
++#define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */
++#define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */
++#define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will
++ * allways use APP0 */
++};
++
++/*
++ * M E M O R Y - M A P P I N G B U F F E R S
++ */
++struct v4l2_requestbuffers {
++ __u32 count;
++ enum v4l2_buf_type type;
++ enum v4l2_memory memory;
++ __u32 reserved[2];
++};
++
++/**
++ * struct v4l2_plane - plane info for multi-planar buffers
++ * @bytesused: number of bytes occupied by data in the plane (payload)
++ * @length: size of this plane (NOT the payload) in bytes
++ * @mem_offset: when memory in the associated struct v4l2_buffer is
++ * V4L2_MEMORY_MMAP, equals the offset from the start of
++ * the device memory for this plane (or is a "cookie" that
++ * should be passed to mmap() called on the video node)
++ * @userptr: when memory is V4L2_MEMORY_USERPTR, a userspace pointer
++ * pointing to this plane
++ * @data_offset: offset in the plane to the start of data; usually 0,
++ * unless there is a header in front of the data
++ *
++ * Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer
++ * with two planes can have one plane for Y, and another for interleaved CbCr
++ * components. Each plane can reside in a separate memory buffer, or even in
++ * a completely separate memory node (e.g. in embedded devices).
++ */
++struct v4l2_plane {
++ __u32 bytesused;
++ __u32 length;
++ union {
++ __u32 mem_offset;
++ unsigned long userptr;
++ } m;
++ __u32 data_offset;
++ __u32 reserved[11];
++};
++
++/**
++ * struct v4l2_buffer - video buffer info
++ * @index: id number of the buffer
++ * @type: buffer type (type == *_MPLANE for multiplanar buffers)
++ * @bytesused: number of bytes occupied by data in the buffer (payload);
++ * unused (set to 0) for multiplanar buffers
++ * @flags: buffer informational flags
++ * @field: field order of the image in the buffer
++ * @timestamp: frame timestamp
++ * @timecode: frame timecode
++ * @sequence: sequence count of this frame
++ * @memory: the method, in which the actual video data is passed
++ * @offset: for non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;
++ * offset from the start of the device memory for this plane,
++ * (or a "cookie" that should be passed to mmap() as offset)
++ * @userptr: for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;
++ * a userspace pointer pointing to this buffer
++ * @planes: for multiplanar buffers; userspace pointer to the array of plane
++ * info structs for this buffer
++ * @length: size in bytes of the buffer (NOT its payload) for single-plane
++ * buffers (when type != *_MPLANE); number of elements in the
++ * planes array for multi-plane buffers
++ * @input: input number from which the video data has has been captured
++ *
++ * Contains data exchanged by application and driver using one of the Streaming
++ * I/O methods.
++ */
++struct v4l2_buffer {
++ __u32 index;
++ enum v4l2_buf_type type;
++ __u32 bytesused;
++ __u32 flags;
++ enum v4l2_field field;
++ struct timeval timestamp;
++ struct v4l2_timecode timecode;
++ __u32 sequence;
++
++ /* memory location */
++ enum v4l2_memory memory;
++ union {
++ __u32 offset;
++ unsigned long userptr;
++ struct v4l2_plane *planes;
++ } m;
++ __u32 length;
++ __u32 input;
++ __u32 reserved;
++};
++
++/* Flags for 'flags' field */
++#define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */
++#define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */
++#define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */
++#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */
++#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */
++#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */
++/* Buffer is ready, but the data contained within is corrupted. */
++#define V4L2_BUF_FLAG_ERROR 0x0040
++#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */
++#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */
++
++/*
++ * O V E R L A Y P R E V I E W
++ */
++struct v4l2_framebuffer {
++ __u32 capability;
++ __u32 flags;
++/* FIXME: in theory we should pass something like PCI device + memory
++ * region + offset instead of some physical address */
++ void *base;
++ struct v4l2_pix_format fmt;
++};
++/* Flags for the 'capability' field. Read only */
++#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001
++#define V4L2_FBUF_CAP_CHROMAKEY 0x0002
++#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004
++#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008
++#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010
++#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020
++#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040
++#define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080
++/* Flags for the 'flags' field. */
++#define V4L2_FBUF_FLAG_PRIMARY 0x0001
++#define V4L2_FBUF_FLAG_OVERLAY 0x0002
++#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004
++#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008
++#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010
++#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020
++#define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040
++
++struct v4l2_clip {
++ struct v4l2_rect c;
++ struct v4l2_clip *next;
++};
++
++struct v4l2_window {
++ struct v4l2_rect w;
++ enum v4l2_field field;
++ __u32 chromakey;
++ struct v4l2_clip *clips;
++ __u32 clipcount;
++ void *bitmap;
++ __u8 global_alpha;
++};
++
++/*
++ * C A P T U R E P A R A M E T E R S
++ */
++struct v4l2_captureparm {
++ __u32 capability; /* Supported modes */
++ __u32 capturemode; /* Current mode */
++ struct v4l2_fract timeperframe; /* Time per frame in .1us units */
++ __u32 extendedmode; /* Driver-specific extensions */
++ __u32 readbuffers; /* # of buffers for read */
++ __u32 reserved[4];
++};
++
++/* Flags for 'capability' and 'capturemode' fields */
++#define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */
++#define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */
++
++struct v4l2_outputparm {
++ __u32 capability; /* Supported modes */
++ __u32 outputmode; /* Current mode */
++ struct v4l2_fract timeperframe; /* Time per frame in seconds */
++ __u32 extendedmode; /* Driver-specific extensions */
++ __u32 writebuffers; /* # of buffers for write */
++ __u32 reserved[4];
++};
++
++/*
++ * I N P U T I M A G E C R O P P I N G
++ */
++struct v4l2_cropcap {
++ enum v4l2_buf_type type;
++ struct v4l2_rect bounds;
++ struct v4l2_rect defrect;
++ struct v4l2_fract pixelaspect;
++};
++
++struct v4l2_crop {
++ enum v4l2_buf_type type;
++ struct v4l2_rect c;
++};
++
++/*
++ * A N A L O G V I D E O S T A N D A R D
++ */
++
++typedef __u64 v4l2_std_id;
++
++/* one bit for each */
++#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
++#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
++#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
++#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
++#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
++#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
++#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
++#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
++
++#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
++#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
++#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
++#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
++
++#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000)
++#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000)
++#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
++#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000)
++
++#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
++#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
++#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
++#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
++#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
++#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
++#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
++#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
++
++/* ATSC/HDTV */
++#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
++#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
++
++/* FIXME:
++ Although std_id is 64 bits, there is an issue on PPC32 architecture that
++ makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding
++ this value to 32 bits.
++ As, currently, the max value is for V4L2_STD_ATSC_16_VSB (30 bits wide),
++ it should work fine. However, if needed to add more than two standards,
++ v4l2-common.c should be fixed.
++ */
++
++/* some merged standards */
++#define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC)
++#define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B)
++#define V4L2_STD_GH (V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H)
++#define V4L2_STD_DK (V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK)
++
++/* some common needed stuff */
++#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\
++ V4L2_STD_PAL_B1 |\
++ V4L2_STD_PAL_G)
++#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |\
++ V4L2_STD_PAL_D1 |\
++ V4L2_STD_PAL_K)
++#define V4L2_STD_PAL (V4L2_STD_PAL_BG |\
++ V4L2_STD_PAL_DK |\
++ V4L2_STD_PAL_H |\
++ V4L2_STD_PAL_I)
++#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\
++ V4L2_STD_NTSC_M_JP |\
++ V4L2_STD_NTSC_M_KR)
++#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\
++ V4L2_STD_SECAM_K |\
++ V4L2_STD_SECAM_K1)
++#define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\
++ V4L2_STD_SECAM_G |\
++ V4L2_STD_SECAM_H |\
++ V4L2_STD_SECAM_DK |\
++ V4L2_STD_SECAM_L |\
++ V4L2_STD_SECAM_LC)
++
++#define V4L2_STD_525_60 (V4L2_STD_PAL_M |\
++ V4L2_STD_PAL_60 |\
++ V4L2_STD_NTSC |\
++ V4L2_STD_NTSC_443)
++#define V4L2_STD_625_50 (V4L2_STD_PAL |\
++ V4L2_STD_PAL_N |\
++ V4L2_STD_PAL_Nc |\
++ V4L2_STD_SECAM)
++#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\
++ V4L2_STD_ATSC_16_VSB)
++
++#define V4L2_STD_UNKNOWN 0
++#define V4L2_STD_ALL (V4L2_STD_525_60 |\
++ V4L2_STD_625_50)
++
++struct v4l2_standard {
++ __u32 index;
++ v4l2_std_id id;
++ __u8 name[24];
++ struct v4l2_fract frameperiod; /* Frames, not fields */
++ __u32 framelines;
++ __u32 reserved[4];
++};
++
++/*
++ * V I D E O T I M I N G S D V P R E S E T
++ */
++struct v4l2_dv_preset {
++ __u32 preset;
++ __u32 reserved[4];
++};
++
++/*
++ * D V P R E S E T S E N U M E R A T I O N
++ */
++struct v4l2_dv_enum_preset {
++ __u32 index;
++ __u32 preset;
++ __u8 name[32]; /* Name of the preset timing */
++ __u32 width;
++ __u32 height;
++ __u32 reserved[4];
++};
++
++/*
++ * D V P R E S E T V A L U E S
++ */
++#define V4L2_DV_INVALID 0
++#define V4L2_DV_480P59_94 1 /* BT.1362 */
++#define V4L2_DV_576P50 2 /* BT.1362 */
++#define V4L2_DV_720P24 3 /* SMPTE 296M */
++#define V4L2_DV_720P25 4 /* SMPTE 296M */
++#define V4L2_DV_720P30 5 /* SMPTE 296M */
++#define V4L2_DV_720P50 6 /* SMPTE 296M */
++#define V4L2_DV_720P59_94 7 /* SMPTE 274M */
++#define V4L2_DV_720P60 8 /* SMPTE 274M/296M */
++#define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */
++#define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */
++#define V4L2_DV_1080I25 11 /* BT.1120 */
++#define V4L2_DV_1080I50 12 /* SMPTE 296M */
++#define V4L2_DV_1080I60 13 /* SMPTE 296M */
++#define V4L2_DV_1080P24 14 /* SMPTE 296M */
++#define V4L2_DV_1080P25 15 /* SMPTE 296M */
++#define V4L2_DV_1080P30 16 /* SMPTE 296M */
++#define V4L2_DV_1080P50 17 /* BT.1120 */
++#define V4L2_DV_1080P60 18 /* BT.1120 */
++
++/*
++ * D V B T T I M I N G S
++ */
++
++/* BT.656/BT.1120 timing data */
++struct v4l2_bt_timings {
++ __u32 width; /* width in pixels */
++ __u32 height; /* height in lines */
++ __u32 interlaced; /* Interlaced or progressive */
++ __u32 polarities; /* Positive or negative polarity */
++ __u64 pixelclock; /* Pixel clock in HZ. Ex. 74.25MHz->74250000 */
++ __u32 hfrontporch; /* Horizpontal front porch in pixels */
++ __u32 hsync; /* Horizontal Sync length in pixels */
++ __u32 hbackporch; /* Horizontal back porch in pixels */
++ __u32 vfrontporch; /* Vertical front porch in pixels */
++ __u32 vsync; /* Vertical Sync length in lines */
++ __u32 vbackporch; /* Vertical back porch in lines */
++ __u32 il_vfrontporch; /* Vertical front porch for bottom field of
++ * interlaced field formats
++ */
++ __u32 il_vsync; /* Vertical sync length for bottom field of
++ * interlaced field formats
++ */
++ __u32 il_vbackporch; /* Vertical back porch for bottom field of
++ * interlaced field formats
++ */
++ __u32 reserved[16];
++} __attribute__ ((packed));
++
++/* Interlaced or progressive format */
++#define V4L2_DV_PROGRESSIVE 0
++#define V4L2_DV_INTERLACED 1
++
++/* Polarities. If bit is not set, it is assumed to be negative polarity */
++#define V4L2_DV_VSYNC_POS_POL 0x00000001
++#define V4L2_DV_HSYNC_POS_POL 0x00000002
++
++
++/* DV timings */
++struct v4l2_dv_timings {
++ __u32 type;
++ union {
++ struct v4l2_bt_timings bt;
++ __u32 reserved[32];
++ };
++} __attribute__ ((packed));
++
++/* Values for the type field */
++#define V4L2_DV_BT_656_1120 0 /* BT.656/1120 timing type */
++
++/*
++ * V I D E O I N P U T S
++ */
++struct v4l2_input {
++ __u32 index; /* Which input */
++ __u8 name[32]; /* Label */
++ __u32 type; /* Type of input */
++ __u32 audioset; /* Associated audios (bitfield) */
++ __u32 tuner; /* Associated tuner */
++ v4l2_std_id std;
++ __u32 status;
++ __u32 capabilities;
++ __u32 reserved[3];
++};
++
++/* Values for the 'type' field */
++#define V4L2_INPUT_TYPE_TUNER 1
++#define V4L2_INPUT_TYPE_CAMERA 2
++
++/* field 'status' - general */
++#define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */
++#define V4L2_IN_ST_NO_SIGNAL 0x00000002
++#define V4L2_IN_ST_NO_COLOR 0x00000004
++
++/* field 'status' - sensor orientation */
++/* If sensor is mounted upside down set both bits */
++#define V4L2_IN_ST_HFLIP 0x00000010 /* Frames are flipped horizontally */
++#define V4L2_IN_ST_VFLIP 0x00000020 /* Frames are flipped vertically */
++
++/* field 'status' - analog */
++#define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */
++#define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */
++
++/* field 'status' - digital */
++#define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */
++#define V4L2_IN_ST_NO_EQU 0x00020000 /* No equalizer lock */
++#define V4L2_IN_ST_NO_CARRIER 0x00040000 /* Carrier recovery failed */
++
++/* field 'status' - VCR and set-top box */
++#define V4L2_IN_ST_MACROVISION 0x01000000 /* Macrovision detected */
++#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */
++#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */
++
++/* capabilities flags */
++#define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
++#define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
++#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */
++
++/*
++ * V I D E O O U T P U T S
++ */
++struct v4l2_output {
++ __u32 index; /* Which output */
++ __u8 name[32]; /* Label */
++ __u32 type; /* Type of output */
++ __u32 audioset; /* Associated audios (bitfield) */
++ __u32 modulator; /* Associated modulator */
++ v4l2_std_id std;
++ __u32 capabilities;
++ __u32 reserved[3];
++};
++/* Values for the 'type' field */
++#define V4L2_OUTPUT_TYPE_MODULATOR 1
++#define V4L2_OUTPUT_TYPE_ANALOG 2
++#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
++
++/* capabilities flags */
++#define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
++#define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
++#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */
++
++/*
++ * C O N T R O L S
++ */
++struct v4l2_control {
++ __u32 id;
++ __s32 value;
++};
++
++struct v4l2_ext_control {
++ __u32 id;
++ __u32 size;
++ __u32 reserved2[1];
++ union {
++ __s32 value;
++ __s64 value64;
++ char *string;
++ };
++} __attribute__ ((packed));
++
++struct v4l2_ext_controls {
++ __u32 ctrl_class;
++ __u32 count;
++ __u32 error_idx;
++ __u32 reserved[2];
++ struct v4l2_ext_control *controls;
++};
++
++/* Values for ctrl_class field */
++#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
++#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
++#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */
++#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */
++
++#define V4L2_CTRL_ID_MASK (0x0fffffff)
++#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
++#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
++
++enum v4l2_ctrl_type {
++ V4L2_CTRL_TYPE_INTEGER = 1,
++ V4L2_CTRL_TYPE_BOOLEAN = 2,
++ V4L2_CTRL_TYPE_MENU = 3,
++ V4L2_CTRL_TYPE_BUTTON = 4,
++ V4L2_CTRL_TYPE_INTEGER64 = 5,
++ V4L2_CTRL_TYPE_CTRL_CLASS = 6,
++ V4L2_CTRL_TYPE_STRING = 7,
++};
++
++/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
++struct v4l2_queryctrl {
++ __u32 id;
++ enum v4l2_ctrl_type type;
++ __u8 name[32]; /* Whatever */
++ __s32 minimum; /* Note signedness */
++ __s32 maximum;
++ __s32 step;
++ __s32 default_value;
++ __u32 flags;
++ __u32 reserved[2];
++};
++
++/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */
++struct v4l2_querymenu {
++ __u32 id;
++ __u32 index;
++ __u8 name[32]; /* Whatever */
++ __u32 reserved;
++};
++
++/* Control flags */
++#define V4L2_CTRL_FLAG_DISABLED 0x0001
++#define V4L2_CTRL_FLAG_GRABBED 0x0002
++#define V4L2_CTRL_FLAG_READ_ONLY 0x0004
++#define V4L2_CTRL_FLAG_UPDATE 0x0008
++#define V4L2_CTRL_FLAG_INACTIVE 0x0010
++#define V4L2_CTRL_FLAG_SLIDER 0x0020
++#define V4L2_CTRL_FLAG_WRITE_ONLY 0x0040
++
++/* Query flag, to be ORed with the control ID */
++#define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000
++
++/* User-class control IDs defined by V4L2 */
++#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
++#define V4L2_CID_USER_BASE V4L2_CID_BASE
++/* IDs reserved for driver specific controls */
++#define V4L2_CID_PRIVATE_BASE 0x08000000
++
++#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1)
++#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0)
++#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1)
++#define V4L2_CID_SATURATION (V4L2_CID_BASE+2)
++#define V4L2_CID_HUE (V4L2_CID_BASE+3)
++#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5)
++#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6)
++#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7)
++#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)
++#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)
++#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10)
++#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) /* Deprecated */
++#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)
++#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)
++#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)
++#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)
++#define V4L2_CID_GAMMA (V4L2_CID_BASE+16)
++#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* Deprecated */
++#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)
++#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)
++#define V4L2_CID_GAIN (V4L2_CID_BASE+19)
++#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
++#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
++
++/* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
++#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
++#define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
++
++#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24)
++enum v4l2_power_line_frequency {
++ V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0,
++ V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1,
++ V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2,
++};
++#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25)
++#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
++#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
++#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28)
++#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29)
++#define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30)
++#define V4L2_CID_COLORFX (V4L2_CID_BASE+31)
++enum v4l2_colorfx {
++ V4L2_COLORFX_NONE = 0,
++ V4L2_COLORFX_BW = 1,
++ V4L2_COLORFX_SEPIA = 2,
++ V4L2_COLORFX_NEGATIVE = 3,
++ V4L2_COLORFX_EMBOSS = 4,
++ V4L2_COLORFX_SKETCH = 5,
++ V4L2_COLORFX_SKY_BLUE = 6,
++ V4L2_COLORFX_GRASS_GREEN = 7,
++ V4L2_COLORFX_SKIN_WHITEN = 8,
++ V4L2_COLORFX_VIVID = 9,
++};
++#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
++#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
++
++#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
++#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
++
++#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36)
++
++#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37)
++#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38)
++
++/* last CID + 1 */
++#define V4L2_CID_LASTP1 (V4L2_CID_BASE+39)
++
++/* MPEG-class control IDs defined by V4L2 */
++#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
++#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1)
++
++/* MPEG streams */
++#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0)
++enum v4l2_mpeg_stream_type {
++ V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */
++ V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */
++ V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */
++ V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */
++ V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */
++ V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */
++};
++#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1)
++#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2)
++#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3)
++#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4)
++#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5)
++#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6)
++#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7)
++enum v4l2_mpeg_stream_vbi_fmt {
++ V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */
++ V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */
++};
++
++/* MPEG audio */
++#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100)
++enum v4l2_mpeg_audio_sampling_freq {
++ V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
++ V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
++ V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
++};
++#define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101)
++enum v4l2_mpeg_audio_encoding {
++ V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
++ V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
++ V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
++ V4L2_MPEG_AUDIO_ENCODING_AAC = 3,
++ V4L2_MPEG_AUDIO_ENCODING_AC3 = 4,
++};
++#define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102)
++enum v4l2_mpeg_audio_l1_bitrate {
++ V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0,
++ V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1,
++ V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2,
++ V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
++ V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
++ V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
++ V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
++ V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
++ V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
++ V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
++ V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
++ V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
++ V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
++ V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
++};
++#define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103)
++enum v4l2_mpeg_audio_l2_bitrate {
++ V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0,
++ V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1,
++ V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2,
++ V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3,
++ V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4,
++ V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5,
++ V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
++ V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
++ V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
++ V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
++ V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
++ V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
++ V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
++ V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
++};
++#define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104)
++enum v4l2_mpeg_audio_l3_bitrate {
++ V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0,
++ V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1,
++ V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2,
++ V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3,
++ V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4,
++ V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5,
++ V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6,
++ V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
++ V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
++ V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
++ V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
++ V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
++ V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
++ V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
++};
++#define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105)
++enum v4l2_mpeg_audio_mode {
++ V4L2_MPEG_AUDIO_MODE_STEREO = 0,
++ V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
++ V4L2_MPEG_AUDIO_MODE_DUAL = 2,
++ V4L2_MPEG_AUDIO_MODE_MONO = 3,
++};
++#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106)
++enum v4l2_mpeg_audio_mode_extension {
++ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0,
++ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1,
++ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
++ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
++};
++#define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107)
++enum v4l2_mpeg_audio_emphasis {
++ V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0,
++ V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
++ V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2,
++};
++#define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108)
++enum v4l2_mpeg_audio_crc {
++ V4L2_MPEG_AUDIO_CRC_NONE = 0,
++ V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
++};
++#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109)
++#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_MPEG_BASE+110)
++#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+111)
++enum v4l2_mpeg_audio_ac3_bitrate {
++ V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17,
++ V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18,
++};
++
++/* MPEG video */
++#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200)
++enum v4l2_mpeg_video_encoding {
++ V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0,
++ V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1,
++ V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2,
++};
++#define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201)
++enum v4l2_mpeg_video_aspect {
++ V4L2_MPEG_VIDEO_ASPECT_1x1 = 0,
++ V4L2_MPEG_VIDEO_ASPECT_4x3 = 1,
++ V4L2_MPEG_VIDEO_ASPECT_16x9 = 2,
++ V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
++};
++#define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202)
++#define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203)
++#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204)
++#define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205)
++#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206)
++enum v4l2_mpeg_video_bitrate_mode {
++ V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
++ V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
++};
++#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
++#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
++#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
++#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210)
++#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211)
++
++/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
++#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
++#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0)
++enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
++ V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
++ V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1,
++};
++#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1)
++#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2)
++enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
++ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0,
++ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
++ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2,
++ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3,
++ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
++};
++#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3)
++enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
++ V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0,
++ V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
++};
++#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4)
++enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
++ V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
++ V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1,
++};
++#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5)
++#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6)
++enum v4l2_mpeg_cx2341x_video_median_filter_type {
++ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0,
++ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1,
++ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2,
++ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
++ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4,
++};
++#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7)
++#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8)
++#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9)
++#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)
++#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11)
++
++/* Camera class control IDs */
++#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900)
++#define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1)
++
++#define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1)
++enum v4l2_exposure_auto_type {
++ V4L2_EXPOSURE_AUTO = 0,
++ V4L2_EXPOSURE_MANUAL = 1,
++ V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
++ V4L2_EXPOSURE_APERTURE_PRIORITY = 3
++};
++#define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2)
++#define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3)
++
++#define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4)
++#define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5)
++#define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6)
++#define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7)
++
++#define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8)
++#define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9)
++
++#define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10)
++#define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11)
++#define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12)
++
++#define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+13)
++#define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+14)
++#define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE+15)
++
++#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
++
++#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17)
++#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18)
++
++/* FM Modulator class control IDs */
++#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
++#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
++
++#define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1)
++#define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2)
++#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3)
++#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5)
++#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6)
++
++#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64)
++#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65)
++#define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66)
++
++#define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80)
++#define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81)
++#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82)
++#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83)
++#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84)
++
++#define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96)
++#define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97)
++#define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98)
++
++#define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112)
++enum v4l2_preemphasis {
++ V4L2_PREEMPHASIS_DISABLED = 0,
++ V4L2_PREEMPHASIS_50_uS = 1,
++ V4L2_PREEMPHASIS_75_uS = 2,
++};
++#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113)
++#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114)
++
++/*
++ * T U N I N G
++ */
++struct v4l2_tuner {
++ __u32 index;
++ __u8 name[32];
++ enum v4l2_tuner_type type;
++ __u32 capability;
++ __u32 rangelow;
++ __u32 rangehigh;
++ __u32 rxsubchans;
++ __u32 audmode;
++ __s32 signal;
++ __s32 afc;
++ __u32 reserved[4];
++};
++
++struct v4l2_modulator {
++ __u32 index;
++ __u8 name[32];
++ __u32 capability;
++ __u32 rangelow;
++ __u32 rangehigh;
++ __u32 txsubchans;
++ __u32 reserved[4];
++};
++
++/* Flags for the 'capability' field */
++#define V4L2_TUNER_CAP_LOW 0x0001
++#define V4L2_TUNER_CAP_NORM 0x0002
++#define V4L2_TUNER_CAP_STEREO 0x0010
++#define V4L2_TUNER_CAP_LANG2 0x0020
++#define V4L2_TUNER_CAP_SAP 0x0020
++#define V4L2_TUNER_CAP_LANG1 0x0040
++#define V4L2_TUNER_CAP_RDS 0x0080
++#define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100
++#define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200
++
++/* Flags for the 'rxsubchans' field */
++#define V4L2_TUNER_SUB_MONO 0x0001
++#define V4L2_TUNER_SUB_STEREO 0x0002
++#define V4L2_TUNER_SUB_LANG2 0x0004
++#define V4L2_TUNER_SUB_SAP 0x0004
++#define V4L2_TUNER_SUB_LANG1 0x0008
++#define V4L2_TUNER_SUB_RDS 0x0010
++
++/* Values for the 'audmode' field */
++#define V4L2_TUNER_MODE_MONO 0x0000
++#define V4L2_TUNER_MODE_STEREO 0x0001
++#define V4L2_TUNER_MODE_LANG2 0x0002
++#define V4L2_TUNER_MODE_SAP 0x0002
++#define V4L2_TUNER_MODE_LANG1 0x0003
++#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004
++
++struct v4l2_frequency {
++ __u32 tuner;
++ enum v4l2_tuner_type type;
++ __u32 frequency;
++ __u32 reserved[8];
++};
++
++struct v4l2_hw_freq_seek {
++ __u32 tuner;
++ enum v4l2_tuner_type type;
++ __u32 seek_upward;
++ __u32 wrap_around;
++ __u32 spacing;
++ __u32 reserved[7];
++};
++
++/*
++ * R D S
++ */
++
++struct v4l2_rds_data {
++ __u8 lsb;
++ __u8 msb;
++ __u8 block;
++} __attribute__ ((packed));
++
++#define V4L2_RDS_BLOCK_MSK 0x7
++#define V4L2_RDS_BLOCK_A 0
++#define V4L2_RDS_BLOCK_B 1
++#define V4L2_RDS_BLOCK_C 2
++#define V4L2_RDS_BLOCK_D 3
++#define V4L2_RDS_BLOCK_C_ALT 4
++#define V4L2_RDS_BLOCK_INVALID 7
++
++#define V4L2_RDS_BLOCK_CORRECTED 0x40
++#define V4L2_RDS_BLOCK_ERROR 0x80
++
++/*
++ * A U D I O
++ */
++struct v4l2_audio {
++ __u32 index;
++ __u8 name[32];
++ __u32 capability;
++ __u32 mode;
++ __u32 reserved[2];
++};
++
++/* Flags for the 'capability' field */
++#define V4L2_AUDCAP_STEREO 0x00001
++#define V4L2_AUDCAP_AVL 0x00002
++
++/* Flags for the 'mode' field */
++#define V4L2_AUDMODE_AVL 0x00001
++
++struct v4l2_audioout {
++ __u32 index;
++ __u8 name[32];
++ __u32 capability;
++ __u32 mode;
++ __u32 reserved[2];
++};
++
++/*
++ * M P E G S E R V I C E S
++ *
++ * NOTE: EXPERIMENTAL API
++ */
++#if 1
++#define V4L2_ENC_IDX_FRAME_I (0)
++#define V4L2_ENC_IDX_FRAME_P (1)
++#define V4L2_ENC_IDX_FRAME_B (2)
++#define V4L2_ENC_IDX_FRAME_MASK (0xf)
++
++struct v4l2_enc_idx_entry {
++ __u64 offset;
++ __u64 pts;
++ __u32 length;
++ __u32 flags;
++ __u32 reserved[2];
++};
++
++#define V4L2_ENC_IDX_ENTRIES (64)
++struct v4l2_enc_idx {
++ __u32 entries;
++ __u32 entries_cap;
++ __u32 reserved[4];
++ struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES];
++};
++
++
++#define V4L2_ENC_CMD_START (0)
++#define V4L2_ENC_CMD_STOP (1)
++#define V4L2_ENC_CMD_PAUSE (2)
++#define V4L2_ENC_CMD_RESUME (3)
++
++/* Flags for V4L2_ENC_CMD_STOP */
++#define V4L2_ENC_CMD_STOP_AT_GOP_END (1 << 0)
++
++struct v4l2_encoder_cmd {
++ __u32 cmd;
++ __u32 flags;
++ union {
++ struct {
++ __u32 data[8];
++ } raw;
++ };
++};
++
++#endif
++
++
++/*
++ * D A T A S E R V I C E S ( V B I )
++ *
++ * Data services API by Michael Schimek
++ */
++
++/* Raw VBI */
++struct v4l2_vbi_format {
++ __u32 sampling_rate; /* in 1 Hz */
++ __u32 offset;
++ __u32 samples_per_line;
++ __u32 sample_format; /* V4L2_PIX_FMT_* */
++ __s32 start[2];
++ __u32 count[2];
++ __u32 flags; /* V4L2_VBI_* */
++ __u32 reserved[2]; /* must be zero */
++};
++
++/* VBI flags */
++#define V4L2_VBI_UNSYNC (1 << 0)
++#define V4L2_VBI_INTERLACED (1 << 1)
++
++/* Sliced VBI
++ *
++ * This implements is a proposal V4L2 API to allow SLICED VBI
++ * required for some hardware encoders. It should change without
++ * notice in the definitive implementation.
++ */
++
++struct v4l2_sliced_vbi_format {
++ __u16 service_set;
++ /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
++ service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
++ (equals frame lines 313-336 for 625 line video
++ standards, 263-286 for 525 line standards) */
++ __u16 service_lines[2][24];
++ __u32 io_size;
++ __u32 reserved[2]; /* must be zero */
++};
++
++/* Teletext World System Teletext
++ (WST), defined on ITU-R BT.653-2 */
++#define V4L2_SLICED_TELETEXT_B (0x0001)
++/* Video Program System, defined on ETS 300 231*/
++#define V4L2_SLICED_VPS (0x0400)
++/* Closed Caption, defined on EIA-608 */
++#define V4L2_SLICED_CAPTION_525 (0x1000)
++/* Wide Screen System, defined on ITU-R BT1119.1 */
++#define V4L2_SLICED_WSS_625 (0x4000)
++
++#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525)
++#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625)
++
++struct v4l2_sliced_vbi_cap {
++ __u16 service_set;
++ /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
++ service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
++ (equals frame lines 313-336 for 625 line video
++ standards, 263-286 for 525 line standards) */
++ __u16 service_lines[2][24];
++ enum v4l2_buf_type type;
++ __u32 reserved[3]; /* must be 0 */
++};
++
++struct v4l2_sliced_vbi_data {
++ __u32 id;
++ __u32 field; /* 0: first field, 1: second field */
++ __u32 line; /* 1-23 */
++ __u32 reserved; /* must be 0 */
++ __u8 data[48];
++};
++
++/*
++ * Sliced VBI data inserted into MPEG Streams
++ */
++
++/*
++ * V4L2_MPEG_STREAM_VBI_FMT_IVTV:
++ *
++ * Structure of payload contained in an MPEG 2 Private Stream 1 PES Packet in an
++ * MPEG-2 Program Pack that contains V4L2_MPEG_STREAM_VBI_FMT_IVTV Sliced VBI
++ * data
++ *
++ * Note, the MPEG-2 Program Pack and Private Stream 1 PES packet header
++ * definitions are not included here. See the MPEG-2 specifications for details
++ * on these headers.
++ */
++
++/* Line type IDs */
++#define V4L2_MPEG_VBI_IVTV_TELETEXT_B (1)
++#define V4L2_MPEG_VBI_IVTV_CAPTION_525 (4)
++#define V4L2_MPEG_VBI_IVTV_WSS_625 (5)
++#define V4L2_MPEG_VBI_IVTV_VPS (7)
++
++struct v4l2_mpeg_vbi_itv0_line {
++ __u8 id; /* One of V4L2_MPEG_VBI_IVTV_* above */
++ __u8 data[42]; /* Sliced VBI data for the line */
++} __attribute__ ((packed));
++
++struct v4l2_mpeg_vbi_itv0 {
++ __le32 linemask[2]; /* Bitmasks of VBI service lines present */
++ struct v4l2_mpeg_vbi_itv0_line line[35];
++} __attribute__ ((packed));
++
++struct v4l2_mpeg_vbi_ITV0 {
++ struct v4l2_mpeg_vbi_itv0_line line[36];
++} __attribute__ ((packed));
++
++#define V4L2_MPEG_VBI_IVTV_MAGIC0 "itv0"
++#define V4L2_MPEG_VBI_IVTV_MAGIC1 "ITV0"
++
++struct v4l2_mpeg_vbi_fmt_ivtv {
++ __u8 magic[4];
++ union {
++ struct v4l2_mpeg_vbi_itv0 itv0;
++ struct v4l2_mpeg_vbi_ITV0 ITV0;
++ };
++} __attribute__ ((packed));
++
++/*
++ * A G G R E G A T E S T R U C T U R E S
++ */
++
++/**
++ * struct v4l2_plane_pix_format - additional, per-plane format definition
++ * @sizeimage: maximum size in bytes required for data, for which
++ * this plane will be used
++ * @bytesperline: distance in bytes between the leftmost pixels in two
++ * adjacent lines
++ */
++struct v4l2_plane_pix_format {
++ __u32 sizeimage;
++ __u16 bytesperline;
++ __u16 reserved[7];
++} __attribute__ ((packed));
++
++/**
++ * struct v4l2_pix_format_mplane - multiplanar format definition
++ * @width: image width in pixels
++ * @height: image height in pixels
++ * @pixelformat: little endian four character code (fourcc)
++ * @field: field order (for interlaced video)
++ * @colorspace: supplemental to pixelformat
++ * @plane_fmt: per-plane information
++ * @num_planes: number of planes for this format
++ */
++struct v4l2_pix_format_mplane {
++ __u32 width;
++ __u32 height;
++ __u32 pixelformat;
++ enum v4l2_field field;
++ enum v4l2_colorspace colorspace;
++
++ struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES];
++ __u8 num_planes;
++ __u8 reserved[11];
++} __attribute__ ((packed));
++
++/**
++ * struct v4l2_format - stream data format
++ * @type: type of the data stream
++ * @pix: definition of an image format
++ * @pix_mp: definition of a multiplanar image format
++ * @win: definition of an overlaid image
++ * @vbi: raw VBI capture or output parameters
++ * @sliced: sliced VBI capture or output parameters
++ * @raw_data: placeholder for future extensions and custom formats
++ */
++struct v4l2_format {
++ enum v4l2_buf_type type;
++ union {
++ struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */
++ struct v4l2_pix_format_mplane pix_mp; /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE */
++ struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */
++ struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */
++ struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */
++ __u8 raw_data[200]; /* user-defined */
++ } fmt;
++};
++
++/* Stream type-dependent parameters
++ */
++struct v4l2_streamparm {
++ enum v4l2_buf_type type;
++ union {
++ struct v4l2_captureparm capture;
++ struct v4l2_outputparm output;
++ __u8 raw_data[200]; /* user-defined */
++ } parm;
++};
++
++/*
++ * E V E N T S
++ */
++
++#define V4L2_EVENT_ALL 0
++#define V4L2_EVENT_VSYNC 1
++#define V4L2_EVENT_EOS 2
++#define V4L2_EVENT_PRIVATE_START 0x08000000
++
++/* Payload for V4L2_EVENT_VSYNC */
++struct v4l2_event_vsync {
++ /* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */
++ __u8 field;
++} __attribute__ ((packed));
++
++struct v4l2_event {
++ __u32 type;
++ union {
++ struct v4l2_event_vsync vsync;
++ __u8 data[64];
++ } u;
++ __u32 pending;
++ __u32 sequence;
++ struct timespec timestamp;
++ __u32 reserved[9];
++};
++
++struct v4l2_event_subscription {
++ __u32 type;
++ __u32 reserved[7];
++};
++
++/*
++ * A D V A N C E D D E B U G G I N G
++ *
++ * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS!
++ * FOR DEBUGGING, TESTING AND INTERNAL USE ONLY!
++ */
++
++/* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */
++
++#define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */
++#define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver name */
++#define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */
++#define V4L2_CHIP_MATCH_AC97 3 /* Match against anciliary AC97 chip */
++
++struct v4l2_dbg_match {
++ __u32 type; /* Match type */
++ union { /* Match this chip, meaning determined by type */
++ __u32 addr;
++ char name[32];
++ };
++} __attribute__ ((packed));
++
++struct v4l2_dbg_register {
++ struct v4l2_dbg_match match;
++ __u32 size; /* register size in bytes */
++ __u64 reg;
++ __u64 val;
++} __attribute__ ((packed));
++
++/* VIDIOC_DBG_G_CHIP_IDENT */
++struct v4l2_dbg_chip_ident {
++ struct v4l2_dbg_match match;
++ __u32 ident; /* chip identifier as specified in <media/v4l2-chip-ident.h> */
++ __u32 revision; /* chip revision, chip specific */
++} __attribute__ ((packed));
++
++/*
++ * I O C T L C O D E S F O R V I D E O D E V I C E S
++ *
++ */
++#define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability)
++#define VIDIOC_RESERVED _IO('V', 1)
++#define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc)
++#define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format)
++#define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format)
++#define VIDIOC_REQBUFS _IOWR('V', 8, struct v4l2_requestbuffers)
++#define VIDIOC_QUERYBUF _IOWR('V', 9, struct v4l2_buffer)
++#define VIDIOC_G_FBUF _IOR('V', 10, struct v4l2_framebuffer)
++#define VIDIOC_S_FBUF _IOW('V', 11, struct v4l2_framebuffer)
++#define VIDIOC_OVERLAY _IOW('V', 14, int)
++#define VIDIOC_QBUF _IOWR('V', 15, struct v4l2_buffer)
++#define VIDIOC_DQBUF _IOWR('V', 17, struct v4l2_buffer)
++#define VIDIOC_STREAMON _IOW('V', 18, int)
++#define VIDIOC_STREAMOFF _IOW('V', 19, int)
++#define VIDIOC_G_PARM _IOWR('V', 21, struct v4l2_streamparm)
++#define VIDIOC_S_PARM _IOWR('V', 22, struct v4l2_streamparm)
++#define VIDIOC_G_STD _IOR('V', 23, v4l2_std_id)
++#define VIDIOC_S_STD _IOW('V', 24, v4l2_std_id)
++#define VIDIOC_ENUMSTD _IOWR('V', 25, struct v4l2_standard)
++#define VIDIOC_ENUMINPUT _IOWR('V', 26, struct v4l2_input)
++#define VIDIOC_G_CTRL _IOWR('V', 27, struct v4l2_control)
++#define VIDIOC_S_CTRL _IOWR('V', 28, struct v4l2_control)
++#define VIDIOC_G_TUNER _IOWR('V', 29, struct v4l2_tuner)
++#define VIDIOC_S_TUNER _IOW('V', 30, struct v4l2_tuner)
++#define VIDIOC_G_AUDIO _IOR('V', 33, struct v4l2_audio)
++#define VIDIOC_S_AUDIO _IOW('V', 34, struct v4l2_audio)
++#define VIDIOC_QUERYCTRL _IOWR('V', 36, struct v4l2_queryctrl)
++#define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu)
++#define VIDIOC_G_INPUT _IOR('V', 38, int)
++#define VIDIOC_S_INPUT _IOWR('V', 39, int)
++#define VIDIOC_G_OUTPUT _IOR('V', 46, int)
++#define VIDIOC_S_OUTPUT _IOWR('V', 47, int)
++#define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output)
++#define VIDIOC_G_AUDOUT _IOR('V', 49, struct v4l2_audioout)
++#define VIDIOC_S_AUDOUT _IOW('V', 50, struct v4l2_audioout)
++#define VIDIOC_G_MODULATOR _IOWR('V', 54, struct v4l2_modulator)
++#define VIDIOC_S_MODULATOR _IOW('V', 55, struct v4l2_modulator)
++#define VIDIOC_G_FREQUENCY _IOWR('V', 56, struct v4l2_frequency)
++#define VIDIOC_S_FREQUENCY _IOW('V', 57, struct v4l2_frequency)
++#define VIDIOC_CROPCAP _IOWR('V', 58, struct v4l2_cropcap)
++#define VIDIOC_G_CROP _IOWR('V', 59, struct v4l2_crop)
++#define VIDIOC_S_CROP _IOW('V', 60, struct v4l2_crop)
++#define VIDIOC_G_JPEGCOMP _IOR('V', 61, struct v4l2_jpegcompression)
++#define VIDIOC_S_JPEGCOMP _IOW('V', 62, struct v4l2_jpegcompression)
++#define VIDIOC_QUERYSTD _IOR('V', 63, v4l2_std_id)
++#define VIDIOC_TRY_FMT _IOWR('V', 64, struct v4l2_format)
++#define VIDIOC_ENUMAUDIO _IOWR('V', 65, struct v4l2_audio)
++#define VIDIOC_ENUMAUDOUT _IOWR('V', 66, struct v4l2_audioout)
++#define VIDIOC_G_PRIORITY _IOR('V', 67, enum v4l2_priority)
++#define VIDIOC_S_PRIORITY _IOW('V', 68, enum v4l2_priority)
++#define VIDIOC_G_SLICED_VBI_CAP _IOWR('V', 69, struct v4l2_sliced_vbi_cap)
++#define VIDIOC_LOG_STATUS _IO('V', 70)
++#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls)
++#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls)
++#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls)
++#if 1
++#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum)
++#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum)
++#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx)
++#define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd)
++#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd)
++#endif
++
++#if 1
++/* Experimental, meant for debugging, testing and internal use.
++ Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
++ You must be root to use these ioctls. Never use these in applications! */
++#define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_dbg_register)
++#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register)
++
++/* Experimental, meant for debugging, testing and internal use.
++ Never use this ioctl in applications! */
++#define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident)
++#endif
++
++#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek)
++#define VIDIOC_ENUM_DV_PRESETS _IOWR('V', 83, struct v4l2_dv_enum_preset)
++#define VIDIOC_S_DV_PRESET _IOWR('V', 84, struct v4l2_dv_preset)
++#define VIDIOC_G_DV_PRESET _IOWR('V', 85, struct v4l2_dv_preset)
++#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset)
++#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
++#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
++#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)
++#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription)
++#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
++
++#define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */
++
++#endif /* __LINUX_VIDEODEV2_H */
diff --git a/source/x/x11/patch/xf86-video-vesa.patch b/source/x/x11/patch/xf86-video-vesa.patch
deleted file mode 100644
index 17d7e8297..000000000
--- a/source/x/x11/patch/xf86-video-vesa.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
diff --git a/source/x/x11/patch/xf86-video-voodoo.patch b/source/x/x11/patch/xf86-video-voodoo.patch
index 17d7e8297..0c7b5a07a 100644
--- a/source/x/x11/patch/xf86-video-voodoo.patch
+++ b/source/x/x11/patch/xf86-video-voodoo.patch
@@ -5,3 +5,6 @@ done
grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
sed -i "s/miInitializeBackingStore(pScreen);//g" $file
done
+
+zcat $CWD/patch/xf86-video-voodoo/0001-don-t-use-PCITAG-in-struct-anymore.patch.gz \
+ | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/x/x11/patch/xf86-video-voodoo/0001-don-t-use-PCITAG-in-struct-anymore.patch b/source/x/x11/patch/xf86-video-voodoo/0001-don-t-use-PCITAG-in-struct-anymore.patch
new file mode 100644
index 000000000..1b3f31b31
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-voodoo/0001-don-t-use-PCITAG-in-struct-anymore.patch
@@ -0,0 +1,26 @@
+From 9172ae566a0e85313fc80ab62b4455393eefe593 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 22 Sep 2014 10:56:02 +1000
+Subject: [PATCH] don't use PCITAG in struct anymore
+
+---
+ src/voodoo.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/voodoo.h b/src/voodoo.h
+index bfed497..c3eb64e 100644
+--- a/src/voodoo.h
++++ b/src/voodoo.h
+@@ -23,7 +23,9 @@ typedef struct {
+
+ Bool Voodoo2; /* Set if Voodoo2 */
+ pciVideoPtr PciInfo; /* PCI data */
++#ifndef XSERVER_LIBPCIACCESS
+ PCITAG PciTag;
++#endif
+ CARD32 PhysBase;
+
+ CARD32 Width; /* Current width */
+--
+2.3.5
+
diff --git a/source/x/x11/patch/xf86-video-xgixp.patch b/source/x/x11/patch/xf86-video-xgixp.patch
index 17d7e8297..08bf4eba3 100644
--- a/source/x/x11/patch/xf86-video-xgixp.patch
+++ b/source/x/x11/patch/xf86-video-xgixp.patch
@@ -1,7 +1,11 @@
-# Remove obsolete references to mibstore.h and miInitializeBackingStore():
-grep -r -l '#include "mibstore.h"' * | while read file ; do
- sed -i "s/#include \"mibstore.h\"//g" $file
-done
-grep -r -l 'miInitializeBackingStore(pScreen);' | while read file ; do
- sed -i "s/miInitializeBackingStore(pScreen);//g" $file
-done
+zcat $CWD/patch/xf86-video-xgixp/0001-Remove-mibstore.h.patch.gz \
+ | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xf86-video-xgixp/0002-Remove-symbol-lists-as-they-are-not-used-any-more.patch.gz \
+ | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xf86-video-xgixp/0003-shadow-shadowInit-shadowAdd-Remove.patch.gz \
+ | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xf86-video-xgixp/0004-Stop-using-deprecated-xf86PciInfo.h.patch.gz \
+ | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xf86-video-xgixp/0005-Update-for-new-damage-API.patch.gz \
+ | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/source/x/x11/patch/xf86-video-xgixp/0001-Remove-mibstore.h.patch b/source/x/x11/patch/xf86-video-xgixp/0001-Remove-mibstore.h.patch
new file mode 100644
index 000000000..650df0631
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-xgixp/0001-Remove-mibstore.h.patch
@@ -0,0 +1,37 @@
+From a84753dd495bcfd724406cae470e17d0c561d0c3 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Tue, 25 Sep 2012 08:55:05 -0400
+Subject: [PATCH 1/5] Remove mibstore.h
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ src/xgi_driver.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/xgi_driver.c b/src/xgi_driver.c
+index 580a03a..8ce071b 100644
+--- a/src/xgi_driver.c
++++ b/src/xgi_driver.c
+@@ -53,8 +53,6 @@
+
+ /* initialise a SW cursor */
+ #include "mipointer.h"
+-/* implementing backing store */
+-#include "mibstore.h"
+
+ /* colormap initialization */
+ #include "micmap.h"
+@@ -2041,10 +2039,6 @@ pScrn->pScreen = pScreen;
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FB Manager init failed \n");
+ }
+
+- /* If backing store is to be supported (as is usually the case), initialise it. */
+- miInitializeBackingStore(pScreen);
+- XGIDebug(DBG_FUNCTION, "[DBG] Jong 06142006-After miInitializeBackingStore()\n");
+-
+ xf86SetBackingStore(pScreen);
+ XGIDebug(DBG_FUNCTION, "[DBG] Jong 06142006-After xf86SetBackingStore()\n");
+
+--
+2.3.5
+
diff --git a/source/x/x11/patch/xf86-video-xgixp/0002-Remove-symbol-lists-as-they-are-not-used-any-more.patch b/source/x/x11/patch/xf86-video-xgixp/0002-Remove-symbol-lists-as-they-are-not-used-any-more.patch
new file mode 100644
index 000000000..3460782f2
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-xgixp/0002-Remove-symbol-lists-as-they-are-not-used-any-more.patch
@@ -0,0 +1,176 @@
+From e881cbb7cc4aa2d3a4477fd3e0681dc35075457a Mon Sep 17 00:00:00 2001
+From: Egbert Eich <eich@freedesktop.org>
+Date: Fri, 19 Jul 2013 12:10:57 +0200
+Subject: [PATCH 2/5] Remove symbol lists as they are not used any more
+
+Remove symbol lists once used by the old Metrolink module
+loader to ensure that all symbols used by the driver are
+present.
+This module loader has been dropped ages ago, the function
+calls into this module loader to perform this verification
+has been dropped from this driver howver the symbol lists
+have survived - not referenced from anywhere any more.
+
+Reviewed-by: <wharms@bfs.de>
+Signed-off-by: Egbert Eich <eich@freedesktop.org>
+---
+ src/xgi_driver.c | 143 -------------------------------------------------------
+ 1 file changed, 143 deletions(-)
+
+diff --git a/src/xgi_driver.c b/src/xgi_driver.c
+index 8ce071b..c98fcf7 100644
+--- a/src/xgi_driver.c
++++ b/src/xgi_driver.c
+@@ -149,149 +149,6 @@ static void xg47_setup_fb_wrap(ReadMemoryProcPtr *read_ptr,
+ WriteMemoryProcPtr *write_ptr, DrawablePtr pDraw);
+ static void xg47_finish_fb_wrap(DrawablePtr pDraw);
+
+-
+-static const char *vgahwSymbols[] = {
+- "vgaHWBlankScreen",
+- "vgaHWddc1SetSpeedWeak",
+- "vgaHWFreeHWRec",
+- "vgaHWGetHWRec",
+- "vgaHWGetIOBase",
+- "vgaHWGetIndex",
+- "vgaHWInit",
+- "vgaHWLock",
+- "vgaHWMapMem",
+- "vgaHWProtect",
+- "vgaHWRestore",
+- "vgaHWSave",
+- "vgaHWSaveScreen",
+- "vgaHWSetMmioFuncs",
+- "vgaHWUnlock",
+- NULL
+-};
+-
+-static const char *ddcSymbols[] = {
+- "xf86DoEDID_DDC1",
+- "xf86DoEDID_DDC2",
+- "xf86PrintEDID",
+- "xf86SetDDCproperties",
+- NULL
+-};
+-
+-static const char *i2cSymbols[] = {
+- "xf86CreateI2CBusRec",
+- "xf86I2CBusInit",
+- NULL
+-};
+-
+-static const char *fbSymbols[] = {
+-#if X_BYTE_ORDER == X_BIG_ENDIAN
+- "wfbPictureInit",
+- "wfbScreenInit",
+-#else
+- "fbPictureInit",
+- "fbScreenInit",
+-#endif
+- NULL
+-};
+-
+-static const char *xaaSymbols[] = {
+- "XAACreateInfoRec",
+- "XAAestroyInfoRec",
+- "XAAFillSolidRects",
+- "XAAGetCopyROP",
+- "XAAGetPatternROP",
+- "XAAInit",
+- "XAAScreenIndex",
+- "XAAStippleScanlineFuncLSBFirst",
+- "XAAOverlayFBfuncs",
+- "XAACachePlanarMonoStipple",
+- "XAAHelpPatternROP",
+- NULL
+-};
+-
+-static const char *ramdacSymbols[] = {
+- "xf86CreateCursorInfoRec",
+- "xf86DestroyCursorInfoRec",
+- "xf86InitCursor",
+- NULL
+-};
+-
+-static const char *drmSymbols[] = {
+- "drmGetInterruptFromBusID",
+- "drmCtlInstHandler",
+- "drmCtlUninstHandler",
+- "drmCommandNone",
+- "drmCommandRead",
+- "drmCommandWrite",
+- "drmCommandWriteRead",
+- "drmFreeVersion",
+- "drmGetLibVersion",
+- "drmGetVersion",
+- "drmMap",
+- "drmUnmap",
+- NULL
+-};
+-
+-static const char *driSymbols[] = {
+- "DRICloseScreen",
+- "DRICreateInfoRec",
+- "DRIDestroyInfoRec",
+- "DRIFinishScreenInit",
+- "DRIGetContext",
+- "DRIGetDeviceInfo",
+- "DRIGetSAREAPrivate",
+- "DRILock",
+- "DRIQueryVersion",
+- "DRIScreenInit",
+- "DRIUnlock",
+- "DRICreatePCIBusID",
+- NULL
+-};
+-
+-static const char *vbeSymbols[] = {
+- "VBEInit",
+- "VBEDPMSSet",
+- "vbeDoEDID",
+- "vbeFree",
+- NULL
+-};
+-
+-static const char *int10Symbols[] = {
+- "xf86ExecX86int10",
+- "xf86FreeInt10",
+- "xf86InitInt10",
+- NULL
+-};
+-
+-static const char *shadowSymbols[] = {
+- "shadowInit",
+- NULL
+-};
+-
+-static const char *fbdevHWSymbols[] = {
+- "fbdevHWInit",
+- "fbdevHWUseBuildinMode",
+- "fbdevHWGetLineLength",
+- "fbdevHWGetVidmem",
+- "fbdevHWDPMSSet",
+- /* colormap */
+- "fbdevHWLoadPaletteWeak",
+- /* ScrnInfo hooks */
+- "fbdevHWAdjustFrameWeak",
+- "fbdevHWEnterVT",
+- "fbdevHWLeaveVT",
+- "fbdevHWModeInit",
+- "fbdevHWRestore",
+- "fbdevHWSave",
+- "fbdevHWSwitchModeWeak",
+- "fbdevHWValidModeWeak",
+- "fbdevHWMapMMIO",
+- "fbdevHWMapVidmem",
+- "fbdevHWUnmapMMIO",
+- "fbdevHWUnmapVidmem",
+- NULL
+-};
+-
+ #ifdef XSERVER_LIBPCIACCESS
+ #define XGI_DEVICE_MATCH(d, i) \
+ { 0x18ca, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) }
+--
+2.3.5
+
diff --git a/source/x/x11/patch/xf86-video-xgixp/0003-shadow-shadowInit-shadowAdd-Remove.patch b/source/x/x11/patch/xf86-video-xgixp/0003-shadow-shadowInit-shadowAdd-Remove.patch
new file mode 100644
index 000000000..5e6f1d75d
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-xgixp/0003-shadow-shadowInit-shadowAdd-Remove.patch
@@ -0,0 +1,79 @@
+From e5789dfd027424996711f366e036a933d1b98c3f Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Tue, 29 Jul 2014 09:37:18 -0400
+Subject: [PATCH 3/5] shadow: shadowInit -> shadowAdd/Remove
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ src/xgi.h | 1 +
+ src/xgi_driver.c | 26 +++++++++++++++++++++++++-
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/src/xgi.h b/src/xgi.h
+index 8cbe77d..e122f1c 100644
+--- a/src/xgi.h
++++ b/src/xgi.h
+@@ -534,6 +534,7 @@ typedef struct {
+ RefreshAreaFuncPtr RefreshArea;
+ CloseScreenProcPtr CloseScreen;
+ ScreenBlockHandlerProcPtr BlockHandler;
++ CreateScreenResourcesProcPtr CreateScreenResources;
+ xf86PointerMovedProc *PointerMoved;
+
+ struct xgi_regs savedReg;
+diff --git a/src/xgi_driver.c b/src/xgi_driver.c
+index c98fcf7..637e360 100644
+--- a/src/xgi_driver.c
++++ b/src/xgi_driver.c
+@@ -1702,6 +1702,25 @@ Bool XGIFBManagerInit(ScreenPtr pScreen)
+ return ret;
+ }
+
++static Bool
++XGICreateScreenResources(ScreenPtr pScreen)
++{
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
++ XGIPtr pXGI = XGIPTR(pScrn);
++ Bool ret;
++
++ pScreen->CreateScreenResources = pXGI->CreateScreenResources;
++ ret = pScreen->CreateScreenResources(pScreen);
++ pXGI->CreateScreenResources = pScreen->CreateScreenResources;
++ pScreen->CreateScreenResources = XGICreateScreenResources;
++
++ if (ret)
++ ret = shadowAdd(pScreen, pScreen->GetScreenPixmap(pScreen),
++ XGIShadowUpdate, NULL, 0, 0);
++
++ return ret;
++}
++
+ /* Called at the start of each server generation. */
+ Bool XGIScreenInit(SCREEN_INIT_ARGS_DECL)
+ {
+@@ -2011,7 +2030,10 @@ pScrn->pScreen = pScreen;
+ {
+ pXGI->RefreshArea = XGIRefreshArea;
+ }
+- shadowInit(pScreen, XGIShadowUpdate, 0);
++ if (!shadowSetup(pScreen))
++ return FALSE;
++ pXGI->CreateScreenResources = pScreen->CreateScreenResources;
++ pScreen->CreateScreenResources = XGICreateScreenResources;
+ }
+ XGIDebug(DBG_FUNCTION, "[DBG] Jong 06142006-After pXGI->isShadowFB\n");
+
+@@ -2272,8 +2294,10 @@ static Bool XGICloseScreen(CLOSE_SCREEN_ARGS_DECL)
+
+ if (pXGI->pShadow)
+ {
++ shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen));
+ free(pXGI->pShadow);
+ pXGI->pShadow = NULL;
++ pScreen->CreateScreenResources = pXGI->CreateScreenResources;
+ }
+
+ if (pXGI->pDgaModes)
+--
+2.3.5
+
diff --git a/source/x/x11/patch/xf86-video-xgixp/0004-Stop-using-deprecated-xf86PciInfo.h.patch b/source/x/x11/patch/xf86-video-xgixp/0004-Stop-using-deprecated-xf86PciInfo.h.patch
new file mode 100644
index 000000000..5fe7b2484
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-xgixp/0004-Stop-using-deprecated-xf86PciInfo.h.patch
@@ -0,0 +1,27 @@
+From cb0ebfa54639619c11ea8277ab7573a5db7484f9 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Tue, 29 Jul 2014 09:37:44 -0400
+Subject: [PATCH 4/5] Stop using deprecated xf86PciInfo.h
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ src/xgi_driver.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/xgi_driver.c b/src/xgi_driver.c
+index 637e360..b440e85 100644
+--- a/src/xgi_driver.c
++++ b/src/xgi_driver.c
+@@ -43,9 +43,6 @@
+ #include <xf86RandR12.h>
+ #include "vbe.h"
+
+-/* PCI vendor/device definitions */
+-#include "xf86PciInfo.h"
+-
+ /* fbdevhw & vgahw */
+ #include "fbdevhw.h"
+ #include "vgaHW.h"
+--
+2.3.5
+
diff --git a/source/x/x11/patch/xf86-video-xgixp/0005-Update-for-new-damage-API.patch b/source/x/x11/patch/xf86-video-xgixp/0005-Update-for-new-damage-API.patch
new file mode 100644
index 000000000..d299b2ef5
--- /dev/null
+++ b/source/x/x11/patch/xf86-video-xgixp/0005-Update-for-new-damage-API.patch
@@ -0,0 +1,26 @@
+From e36331f3f2641900efe8363fe3dc15877a72c027 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 8 Oct 2014 10:34:45 +0200
+Subject: [PATCH 5/5] Update for new damage API
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ src/xgi_shadow.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/xgi_shadow.c b/src/xgi_shadow.c
+index 80f3645..c146ce4 100644
+--- a/src/xgi_shadow.c
++++ b/src/xgi_shadow.c
+@@ -86,7 +86,7 @@ void XGIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
+
+ void XGIShadowUpdate (ScreenPtr pScreen, shadowBufPtr pBuf)
+ {
+- RegionPtr pRegion = &pBuf->damage;
++ RegionPtr pRegion = DamageRegion(pBuf->pDamage);
+ ScrnInfoPtr pScrn;
+ pScrn = xf86ScreenToScrn(pScreen);
+
+--
+2.3.5
+
diff --git a/source/x/x11/patch/xinit.patch b/source/x/x11/patch/xinit.patch
new file mode 100644
index 000000000..dc996d964
--- /dev/null
+++ b/source/x/x11/patch/xinit.patch
@@ -0,0 +1,2 @@
+# LP is truly a one-man disaster...
+zcat $CWD/patch/xinit/xinit.remove.systemd.kludge.diff.gz | patch -p1 || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/x/x11/patch/xinit/xinit.remove.systemd.kludge.diff b/source/x/x11/patch/xinit/xinit.remove.systemd.kludge.diff
new file mode 100644
index 000000000..f51e4628d
--- /dev/null
+++ b/source/x/x11/patch/xinit/xinit.remove.systemd.kludge.diff
@@ -0,0 +1,19 @@
+--- ./startx.cpp.orig 2014-09-11 12:31:42.000000000 -0500
++++ ./startx.cpp 2015-03-29 23:35:06.133875707 -0500
+@@ -192,10 +192,12 @@
+ XCOMM When starting the defaultserver start X on the current tty to avoid
+ XCOMM the startx session being seen as inactive:
+ XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
+- tty=$(tty)
+- if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
+- tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
+- vtarg="vt$tty_num"
++ if [ -x /usr/lib/systemd/systemd -o -x /lib/systemd/systemd ]; then
++ tty=$(tty)
++ if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
++ tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
++ vtarg="vt$tty_num"
++ fi
+ fi
+ #endif
+
diff --git a/source/x/x11/patch/xorg-server.patch b/source/x/x11/patch/xorg-server.patch
index c0c4810fd..1e43b86e4 100644
--- a/source/x/x11/patch/xorg-server.patch
+++ b/source/x/x11/patch/xorg-server.patch
@@ -1,2 +1,2 @@
zcat $CWD/patch/xorg-server/x11.startwithblackscreen.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
-zcat $CWD/patch/xorg-server/xorg-server.CVE-2013-4396.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/x/x11/patch/xorg-server/xorg-server.CVE-2013-4396.diff b/source/x/x11/patch/xorg-server/xorg-server.CVE-2013-4396.diff
deleted file mode 100644
index 14c31782f..000000000
--- a/source/x/x11/patch/xorg-server/xorg-server.CVE-2013-4396.diff
+++ /dev/null
@@ -1,73 +0,0 @@
-From 7bddc2ba16a2a15773c2ea8947059afa27727764 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <alan.coopersmith at oracle.com>
-Date: Mon, 16 Sep 2013 21:47:16 -0700
-Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()
- [CVE-2013-4396]
-
-Save a pointer to the passed in closure structure before copying it
-and overwriting the *c pointer to point to our copy instead of the
-original. If we hit an error, once we free(c), reset c to point to
-the original structure before jumping to the cleanup code that
-references *c.
-
-Since one of the errors being checked for is whether the server was
-able to malloc(c->nChars * itemSize), the client can potentially pass
-a number of characters chosen to cause the malloc to fail and the
-error path to be taken, resulting in the read from freed memory.
-
-Since the memory is accessed almost immediately afterwards, and the
-X server is mostly single threaded, the odds of the free memory having
-invalid contents are low with most malloc implementations when not using
-memory debugging features, but some allocators will definitely overwrite
-the memory there, leading to a likely crash.
-
-Reported-by: Pedro Ribeiro <pedrib at gmail.com>
-Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
-Reviewed-by: Julien Cristau <jcristau at debian.org>
----
- dix/dixfonts.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/dix/dixfonts.c b/dix/dixfonts.c
-index feb765d..2e34d37 100644
---- a/dix/dixfonts.c
-+++ b/dix/dixfonts.c
-@@ -1425,6 +1425,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
- GC *pGC;
- unsigned char *data;
- ITclosurePtr new_closure;
-+ ITclosurePtr old_closure;
-
- /* We're putting the client to sleep. We need to
- save some state. Similar problem to that handled
-@@ -1436,12 +1437,14 @@ doImageText(ClientPtr client, ITclosurePtr c)
- err = BadAlloc;
- goto bail;
- }
-+ old_closure = c;
- *new_closure = *c;
- c = new_closure;
-
- data = malloc(c->nChars * itemSize);
- if (!data) {
- free(c);
-+ c = old_closure;
- err = BadAlloc;
- goto bail;
- }
-@@ -1452,6 +1455,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
- if (!pGC) {
- free(c->data);
- free(c);
-+ c = old_closure;
- err = BadAlloc;
- goto bail;
- }
-@@ -1464,6 +1468,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
- FreeScratchGC(pGC);
- free(c->data);
- free(c);
-+ c = old_closure;
- err = BadAlloc;
- goto bail;
- }
diff --git a/source/x/x11/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch b/source/x/x11/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch
new file mode 100644
index 000000000..83f673030
--- /dev/null
+++ b/source/x/x11/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch
@@ -0,0 +1,49 @@
+--- b/Xi/exevents.c 2013-12-27 19:38:52.000000000 +0200
++++ a/Xi/exevents.c 2014-03-04 19:44:15.228721619 +0200
+@@ -665,7 +665,8 @@
+ DeepCopyFeedbackClasses(from, to);
+
+ if ((dce->flags & DEVCHANGE_KEYBOARD_EVENT))
+- DeepCopyKeyboardClasses(from, to);
++ /* We need to copy to MASTER_KEYBOARD. Didn't worked with 'to'. */
++ DeepCopyKeyboardClasses(from, GetMaster(from, MASTER_KEYBOARD));
+ if ((dce->flags & DEVCHANGE_POINTER_EVENT))
+ DeepCopyPointerClasses(from, to);
+ }
+--- b/dix/getevents.c 2013-12-27 19:38:52.000000000 +0200
++++ a/dix/getevents.c 2014-03-04 19:46:50.126336327 +0200
+@@ -706,12 +706,19 @@
+ {
+ DeviceIntPtr master;
+
+- master =
+- GetMaster(dev,
+- (type & DEVCHANGE_POINTER_EVENT) ? MASTER_POINTER :
+- MASTER_KEYBOARD);
++ /* Don't guess the master upon the event type. Use MASTER_ATTACHED,
++ * otherwise we'll never get a DeviceChangedEvent(reason:SlaveSwith). */
++ master = GetMaster(dev, MASTER_ATTACHED);
++ /* Need to track the slave event type. Other we'le never get a
++ * DeviceChangedEvent(reason:SlaveSwith) for the 'keyboard' if the
++ * 'pointer' has been touched before. */
++ int slave_type = (type & DEVCHANGE_KEYBOARD_EVENT) |
++ (type & DEVCHANGE_POINTER_EVENT);
+
+- if (master && master->last.slave != dev) {
++ if (master &&
++ ((master->last.slave != dev) ||
++ (master->last.slave == dev && master->last.slave_type != slave_type))) {
++ master->last.slave_type = slave_type;
+ CreateClassesChangedEvent(events, master, dev,
+ type | DEVCHANGE_SLAVE_SWITCH);
+ if (IsPointerDevice(master)) {
+--- b/include/inputstr.h 2013-12-27 19:38:52.000000000 +0200
++++ a/include/inputstr.h 2014-03-04 19:47:28.074051116 +0200
+@@ -577,6 +577,7 @@
+ double valuators[MAX_VALUATORS];
+ int numValuators;
+ DeviceIntPtr slave;
++ int slave_type;
+ ValuatorMask *scroll;
+ int num_touches; /* size of the touches array */
+ DDXTouchPointInfoPtr touches;
diff --git a/source/x/x11/post-install/xf86-input-libinput.post-install b/source/x/x11/post-install/xf86-input-libinput.post-install
new file mode 100644
index 000000000..baeffe2e8
--- /dev/null
+++ b/source/x/x11/post-install/xf86-input-libinput.post-install
@@ -0,0 +1,4 @@
+# Add default configuration file:
+mkdir -p $PKG/usr/share/X11/xorg.conf.d
+cp -a conf/99-libinput.conf $PKG/usr/share/X11/xorg.conf.d/
+
diff --git a/source/x/x11/post-install/xf86-input-wacom.post-install b/source/x/x11/post-install/xf86-input-wacom.post-install
index d2b17ecc5..f6d9f8538 100644
--- a/source/x/x11/post-install/xf86-input-wacom.post-install
+++ b/source/x/x11/post-install/xf86-input-wacom.post-install
@@ -1,5 +1,10 @@
# I'm not sure we need this any more, so let's wait for a bug report
# https://wiki.archlinux.org/index.php/Wacom_Tablet
mkdir -p $PKG/lib/udev/rules.d
+rm -f $PKG/lib/udev/rules.d/*wacom.rules
cat $CWD/post-install/xf86-input-wacom/60-wacom.rules > \
$PKG/lib/udev/rules.d/60-wacom.rules
+
+# We don't need this right now:
+rm -rf $PKG/usr/lib*/systemd
+
diff --git a/source/x/x11/post-install/xf86-input-wacom/60-wacom.rules b/source/x/x11/post-install/xf86-input-wacom/60-wacom.rules
index 59224786a..aa96d4bef 100644
--- a/source/x/x11/post-install/xf86-input-wacom/60-wacom.rules
+++ b/source/x/x11/post-install/xf86-input-wacom/60-wacom.rules
@@ -1,6 +1,17 @@
-# From https://wiki.archlinux.org/index.php/Wacom_Tablet
ACTION!="add|change", GOTO="wacom_end"
- # Match all wacom tablets with a serial ID starting with WACf or FUJ*
- ATTRS{id}=="WACf*" ENV{NAME}="Serial Wacom Tablet", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
- ATTRS{id}=="FUJ*" ENV{NAME}="Serial Wacom Tablet", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
+
+# Match all serial wacom tablets with a serial ID starting with WACf
+# Notes: We assign NAME though we shouldn't, but currently the server requires it
+# We assign the lot to subsystem pnp too because server reads NAME from
+# the parent device. Once all that's fixed, as simple SUBSYSTEM="tty"
+# will do and the ENV{NAME} can be removed.
+SUBSYSTEM=="tty|pnp", SUBSYSTEMS=="pnp", ATTRS{id}=="WACf*", ENV{ID_MODEL}="Serial Wacom Tablet $attr{id}", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1", ENV{NAME}="Serial Wacom Tablet $attr{id}"
+SUBSYSTEM=="tty|pnp", SUBSYSTEMS=="pnp", ATTRS{id}=="FUJ*", ENV{ID_MODEL}="Serial Wacom Tablet $attr{id}", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1", ENV{NAME}="Serial Wacom Tablet $attr{id}"
+
+# comment out the next line if your distribution does not provide systemd
+# If a /dev/ttySx device with the WACf name is detected, start the
+# wacom-inputattach service with the kernel name as parameter
+#SUBSYSTEM=="tty|pnp", KERNEL=="ttyS[0-9]*", ATTRS{id}=="WACf*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="wacom-inputattach@%k.service"
+
LABEL="wacom_end"
+
diff --git a/source/x/x11/post-install/xf86-video-intel.post-install b/source/x/x11/post-install/xf86-video-intel.post-install
new file mode 100644
index 000000000..10d5630db
--- /dev/null
+++ b/source/x/x11/post-install/xf86-video-intel.post-install
@@ -0,0 +1,2 @@
+install -D -m 0755 tools/dri3info $PKG/usr/bin/dri3info || exit 1
+strip --strip-unneeded $PKG/usr/bin/dri3info
diff --git a/source/x/x11/slack-desc/dri3proto b/source/x/x11/slack-desc/dri3proto
new file mode 100644
index 000000000..9f9b4a22c
--- /dev/null
+++ b/source/x/x11/slack-desc/dri3proto
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+dri3proto: dri3proto (C prototypes for X11 Direct Rendering Infrastructure 3)
+dri3proto:
+dri3proto: dri3proto is part of X11.
+dri3proto:
+dri3proto: For more information about the X.Org Foundation (the providers of the
+dri3proto: X.Org implementation of the X Window System), see their website:
+dri3proto:
+dri3proto: http://www.x.org
+dri3proto:
+dri3proto:
+dri3proto:
diff --git a/source/x/x11/slack-desc/glamor-egl b/source/x/x11/slack-desc/glamor-egl
new file mode 100644
index 000000000..542e8f9ce
--- /dev/null
+++ b/source/x/x11/slack-desc/glamor-egl
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+glamor-egl: glamor-egl (GL-based rendering acceleration library)
+glamor-egl:
+glamor-egl: The Glamor EGL package contains a GL-based rendering acceleration
+glamor-egl: library for X server.
+glamor-egl:
+glamor-egl:
+glamor-egl:
+glamor-egl:
+glamor-egl:
+glamor-egl:
+glamor-egl:
diff --git a/source/l/phonon-xine/slack-desc b/source/x/x11/slack-desc/libXpresent
index 59ee7f0b6..d5602d63d 100644
--- a/source/l/phonon-xine/slack-desc
+++ b/source/x/x11/slack-desc/libXpresent
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-phonon-xine: phonon-xine (xine backend for phonon)
-phonon-xine:
-phonon-xine: This package provides an additional xine backend for the phonon
-phonon-xine: multimedia framework used in KDE.
-phonon-xine:
-phonon-xine: For more information, visit:
-phonon-xine: https://projects.kde.org/projects/kdesupport/phonon/phonon-xine
-phonon-xine:
-phonon-xine:
-phonon-xine:
-phonon-xine:
+libXpresent: libXpresent (library for the Present extension to the X11 protocol)
+libXpresent:
+libXpresent: libXpresent is part of X11.
+libXpresent:
+libXpresent: For more information about the X.Org Foundation (the providers of the
+libXpresent: X.Org implementation of the X Window System), see their website:
+libXpresent:
+libXpresent: http://www.x.org
+libXpresent:
+libXpresent:
+libXpresent:
diff --git a/source/xfce/xfwm4-themes/slack-desc b/source/x/x11/slack-desc/libxshmfence
index dca6ee94c..4a4a5de1a 100644
--- a/source/xfce/xfwm4-themes/slack-desc
+++ b/source/x/x11/slack-desc/libxshmfence
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-xfwm4-themes: xfwm4-themes (themes for the Xfce window manager)
-xfwm4-themes:
-xfwm4-themes: This package contains a wide variety of themes for xfwm4, the window
-xfwm4-themes: manager of the Xfce4 project. If the default theme is not to your
-xfwm4-themes: liking, you'll probably find the eyecandy you're looking for here.
-xfwm4-themes:
-xfwm4-themes:
-xfwm4-themes:
-xfwm4-themes:
-xfwm4-themes:
-xfwm4-themes:
+libxshmfence: libxshmfence (The X Shared Memory Fence Library)
+libxshmfence:
+libxshmfence: libxshmfence is part of X11.
+libxshmfence:
+libxshmfence: For more information about the X.Org Foundation (the providers of the
+libxshmfence: X.Org implementation of the X Window System), see their website:
+libxshmfence:
+libxshmfence: http://www.x.org
+libxshmfence:
+libxshmfence:
+libxshmfence:
diff --git a/source/x/x11/slack-desc/presentproto b/source/x/x11/slack-desc/presentproto
new file mode 100644
index 000000000..8443306bf
--- /dev/null
+++ b/source/x/x11/slack-desc/presentproto
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+presentproto: presentproto (X.Org Present protocol specification)
+presentproto:
+presentproto: X.Org Present protocol specification and Xlib/Xserver headers
+presentproto:
+presentproto:
+presentproto:
+presentproto:
+presentproto:
+presentproto:
+presentproto:
+presentproto:
diff --git a/source/x/x11/slack-desc/xcb-util-errors b/source/x/x11/slack-desc/xcb-util-errors
new file mode 100644
index 000000000..ecf868d67
--- /dev/null
+++ b/source/x/x11/slack-desc/xcb-util-errors
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xcb-util-errors: xcb-util-errors (XCB error debugging library)
+xcb-util-errors:
+xcb-util-errors: xcb-util-errors is a utility library that gives human readable names
+xcb-util-errors: to error codes and event codes and also to major and minor numbers.
+xcb-util-errors: The necessary information is drawn from xcb-proto's protocol
+xcb-util-errors: descriptions. This library is especially useful when working with
+xcb-util-errors: extensions and is mostly useful for debugging.
+xcb-util-errors:
+xcb-util-errors:
+xcb-util-errors:
+xcb-util-errors:
diff --git a/source/x/x11/slack-desc/xf86-input-libinput b/source/x/x11/slack-desc/xf86-input-libinput
new file mode 100644
index 000000000..5e17c4cd4
--- /dev/null
+++ b/source/x/x11/slack-desc/xf86-input-libinput
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xf86-input-libinput: xf86-input-libinput (libinput-based X driver)
+xf86-input-libinput:
+xf86-input-libinput: This is an X driver based on libinput.
+xf86-input-libinput:
+xf86-input-libinput: For more information about the X.Org Foundation (the providers of the
+xf86-input-libinput: X.Org implementation of the X Window System), see their website:
+xf86-input-libinput:
+xf86-input-libinput: http://www.x.org
+xf86-input-libinput:
+xf86-input-libinput:
+xf86-input-libinput:
diff --git a/source/x/x11/slack-desc/xf86-video-amdgpu b/source/x/x11/slack-desc/xf86-video-amdgpu
new file mode 100644
index 000000000..e17681407
--- /dev/null
+++ b/source/x/x11/slack-desc/xf86-video-amdgpu
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xf86-video-amdgpu: xf86-video-amdgpu (AMD GPU driver for the Xorg X server)
+xf86-video-amdgpu:
+xf86-video-amdgpu: xf86-video-amdgpu is part of X11.
+xf86-video-amdgpu:
+xf86-video-amdgpu: For more information about the X.Org Foundation (the providers of the
+xf86-video-amdgpu: X.Org implementation of the X Window System), see their website:
+xf86-video-amdgpu:
+xf86-video-amdgpu: http://www.x.org
+xf86-video-amdgpu:
+xf86-video-amdgpu:
+xf86-video-amdgpu:
diff --git a/source/x/x11/src/get-xf86-video-intel.sh b/source/x/x11/src/get-xf86-video-intel.sh
new file mode 100755
index 000000000..c4e8b8c0a
--- /dev/null
+++ b/source/x/x11/src/get-xf86-video-intel.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Copyright 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Pull a stable branch + patches
+BRANCH=${1:-master}
+
+# Clear download area:
+rm -rf xf86-video-intel
+
+# Clone repository:
+git clone git://git.freedesktop.org/git/xorg/driver/xf86-video-intel/
+
+# checkout $BRANCH:
+( cd xf86-video-intel
+ git checkout $BRANCH || exit 1
+)
+
+HEADISAT="$( cd xf86-video-intel && git log -1 --format=%h )"
+DATE="$( cd xf86-video-intel && git log -1 --format=%ad --date=format:%Y%m%d )"
+# Cleanup. We're not packing up the whole git repo.
+( cd xf86-video-intel && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null )
+mv xf86-video-intel xf86-video-intel-git_${DATE}_${HEADISAT}
+tar cf xf86-video-intel-git_${DATE}_${HEADISAT}.tar xf86-video-intel-git_${DATE}_${HEADISAT}
+xz -9 -f xf86-video-intel-git_${DATE}_${HEADISAT}.tar
+rm -rf xf86-video-intel-git_${DATE}_${HEADISAT}
+echo
+echo "xf86-video-intel branch $BRANCH with HEAD at $HEADISAT packaged as xf86-video-intel-git_${DATE}_${HEADISAT}.tar.xz"
+echo
diff --git a/source/x/x11/src/get-xf86-video-nouveau.sh b/source/x/x11/src/get-xf86-video-nouveau.sh
index 9a21febde..4e495dd2a 100755
--- a/source/x/x11/src/get-xf86-video-nouveau.sh
+++ b/source/x/x11/src/get-xf86-video-nouveau.sh
@@ -1,27 +1,46 @@
+#!/bin/sh
+
+# Copyright 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
# Pull a stable branch + patches
-BRANCH=master
+BRANCH=${1:-master}
+
+# Clear download area:
+rm -rf xf86-video-nouveau
-#rm -rf xf86-video-nouveau
-if [ -d xf86-video-nouveau ]; then
- cd xf86-video-nouveau
- git pull -f
- cd ..
-else
- git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/
-fi
+# Clone repository:
+git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/
-# use master branch
-#( cd xf86-video-nouveau
-# git checkout $BRANCH || exit 1
-#)
+# checkout $BRANCH:
+( cd xf86-video-nouveau
+ git checkout $BRANCH || exit 1
+)
-HEADISAT="$(cat xf86-video-nouveau/.git/packed-refs | grep refs/remotes/origin/$BRANCH | cut -b1-7)"
+HEADISAT="$( cd xf86-video-nouveau && git log -1 --format=%h )"
+DATE="$( cd xf86-video-nouveau && git log -1 --format=%ad --date=format:%Y%m%d )"
# Cleanup. We're not packing up the whole git repo.
( cd xf86-video-nouveau && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null )
-DATE=$(date +%Y%m%d)
mv xf86-video-nouveau xf86-video-nouveau-git_${DATE}_${HEADISAT}
tar cf xf86-video-nouveau-git_${DATE}_${HEADISAT}.tar xf86-video-nouveau-git_${DATE}_${HEADISAT}
-xz -9 xf86-video-nouveau-git_${DATE}_${HEADISAT}.tar
+xz -9 -f xf86-video-nouveau-git_${DATE}_${HEADISAT}.tar
rm -rf xf86-video-nouveau-git_${DATE}_${HEADISAT}
echo
echo "xf86-video-nouveau branch $BRANCH with HEAD at $HEADISAT packaged as xf86-video-nouveau-git_${DATE}_${HEADISAT}.tar.xz"
diff --git a/source/x/x11/src/get-xf86-video-openchrome.sh b/source/x/x11/src/get-xf86-video-openchrome.sh
new file mode 100755
index 000000000..4959465b4
--- /dev/null
+++ b/source/x/x11/src/get-xf86-video-openchrome.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Copyright 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Pull a stable branch + patches
+BRANCH=${1:-master}
+
+# Clear download area:
+rm -rf xf86-video-openchrome
+
+# Clone repository:
+git clone git://anongit.freedesktop.org/git/openchrome/xf86-video-openchrome/
+
+# checkout $BRANCH:
+( cd xf86-video-openchrome
+ git checkout $BRANCH || exit 1
+)
+
+HEADISAT="$( cd xf86-video-openchrome && git log -1 --format=%h )"
+DATE="$( cd xf86-video-openchrome && git log -1 --format=%ad --date=format:%Y%m%d )"
+# Cleanup. We're not packing up the whole git repo.
+( cd xf86-video-openchrome && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null )
+mv xf86-video-openchrome xf86-video-openchrome-git_${DATE}_${HEADISAT}
+tar cf xf86-video-openchrome-git_${DATE}_${HEADISAT}.tar xf86-video-openchrome-git_${DATE}_${HEADISAT}
+xz -9 -f xf86-video-openchrome-git_${DATE}_${HEADISAT}.tar
+rm -rf xf86-video-openchrome-git_${DATE}_${HEADISAT}
+echo
+echo "xf86-video-openchrome branch $BRANCH with HEAD at $HEADISAT packaged as xf86-video-openchrome-git_${DATE}_${HEADISAT}.tar.xz"
+echo
diff --git a/source/x/x11/src/xf86-input-wacom.url b/source/x/x11/src/xf86-input-wacom.url
new file mode 100644
index 000000000..6bb92bba2
--- /dev/null
+++ b/source/x/x11/src/xf86-input-wacom.url
@@ -0,0 +1 @@
+https://sourceforge.net/projects/linuxwacom/files
diff --git a/source/x/x11/x11.SlackBuild b/source/x/x11/x11.SlackBuild
index 6da53346f..d2d75e4f0 100755
--- a/source/x/x11/x11.SlackBuild
+++ b/source/x/x11/x11.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2007-2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2007-2014 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +26,10 @@
# ./x11.SlackBuild lib libX11
# Upgrade packages as they are built.
-# This is default. To not upgrade, pass UPGRADE_PACKAGES=no (or anything else).
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
pkgbase() {
@@ -58,7 +61,7 @@ TMP=${TMP:-/tmp}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -275,6 +278,8 @@ mkdir -p $SLACK_X_BUILD_DIR
/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
if [ "$UPGRADE_PACKAGES" = "yes" ]; then
/sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
fi
fi
fi
@@ -329,6 +334,8 @@ mkdir -p $SLACK_X_BUILD_DIR
/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
if [ "$UPGRADE_PACKAGES" = "yes" ]; then
/sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
fi
fi
)
diff --git a/source/x/xdg-user-dirs/xdg-user-dirs.SlackBuild b/source/x/xdg-user-dirs/xdg-user-dirs.SlackBuild
index 0b5b65dc9..c6cd23327 100755
--- a/source/x/xdg-user-dirs/xdg-user-dirs.SlackBuild
+++ b/source/x/xdg-user-dirs/xdg-user-dirs.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for xdg-user-dirs
# Copyright 2010 Robby Workman, Northport, Alabama, USA
+# Copyright 2014 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=xdg-user-dirs
-VERSION=${VERSION:-0.14}
+VERSION=${VERSION:-0.15}
BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
@@ -84,6 +85,13 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
mv $PKG/etc/xdg/user-dirs.conf $PKG/etc/xdg/user-dirs.conf.new
mv $PKG/etc/xdg/user-dirs.defaults $PKG/etc/xdg/user-dirs.defaults.new
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* INSTALL NEWS README* TODO \
diff --git a/source/x/xdg-utils/xdg-utils-cvs_checkout.sh b/source/x/xdg-utils/xdg-utils-cvs_checkout.sh
deleted file mode 100755
index 74d7ba0e6..000000000
--- a/source/x/xdg-utils/xdg-utils-cvs_checkout.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-
-MODULE=$(basename $0 -cvs_checkout.sh)
-DATE=$(date +%Y%m%d)
-
-set -x
-
-rm -rf $MODULE
-
-cvs -z3 -d:pserver:anonymous@cvs.freedesktop.org:/cvs/portland checkout -P portland/$MODULE
-pushd portland
-find . -name CVS -exec rm -rf "{}" \; 2> /dev/null
-tar cjf ../$MODULE-${DATE}cvs.tar.bz2 $MODULE
-popd
-
-rm -rf portland
diff --git a/source/x/xdg-utils/xdg-utils.SlackBuild b/source/x/xdg-utils/xdg-utils.SlackBuild
index eabc72605..43dd6145c 100755
--- a/source/x/xdg-utils/xdg-utils.SlackBuild
+++ b/source/x/xdg-utils/xdg-utils.SlackBuild
@@ -26,9 +26,9 @@
PKGNAM=xdg-utils
-VERSION=1.1.0-rc1
+VERSION=1.1.1
ARCH=noarch
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
PKG_VERSION=${VERSION/-/_}
@@ -44,11 +44,9 @@ mkdir -p $TMP $PKG
cd $TMP || exit 1
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
cd $PKGNAM-$VERSION || exit 1
-zcat $CWD/xdg-utils.mate.diff.gz | patch -p1 --verbose || exit 1
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -60,6 +58,7 @@ find . \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
+ --mandir=/usr/man \
|| exit 1
make $NUMJOBS || make || exit 1
diff --git a/source/x/xdg-utils/xdg-utils.info b/source/x/xdg-utils/xdg-utils.info
deleted file mode 100644
index 6b5eaf5fa..000000000
--- a/source/x/xdg-utils/xdg-utils.info
+++ /dev/null
@@ -1,2 +0,0 @@
-HOMEPAGE="http://portland.freedesktop.org/wiki/"
-DOWNLOAD="http://portland.freedesktop.org/download/xdg-utils-1.0.2.tgz"
diff --git a/source/x/xdg-utils/xdg-utils.mate.diff b/source/x/xdg-utils/xdg-utils.mate.diff
deleted file mode 100644
index c2480e322..000000000
--- a/source/x/xdg-utils/xdg-utils.mate.diff
+++ /dev/null
@@ -1,43 +0,0 @@
---- ./scripts/xdg-open.orig 2011-01-01 04:03:14.000000000 -0600
-+++ ./scripts/xdg-open 2013-06-09 21:15:55.612892954 -0500
-@@ -308,6 +308,7 @@
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
-+ elif [ x"$DESKTOP_SESSION" == x"mate" ]; then DE=mate;
- else DE=""
- fi
- }
-@@ -371,6 +372,21 @@
- fi
- }
-
-+open_mate()
-+{
-+ if gvfs-open --help 2>/dev/null 1>&2; then
-+ gvfs-open "$1"
-+ else
-+ mate-open "$1"
-+ fi
-+
-+ if [ $? -eq 0 ]; then
-+ exit_success
-+ else
-+ exit_failure_operation_failed
-+ fi
-+}
-+
- open_xfce()
- {
- exo-open "$1"
-@@ -539,6 +555,10 @@
- open_gnome "$url"
- ;;
-
-+ mate)
-+ open_mate "$url"
-+ ;;
-+
- xfce)
- open_xfce "$url"
- ;;
diff --git a/source/x/xdg-utils/xdg-utils.url b/source/x/xdg-utils/xdg-utils.url
new file mode 100644
index 000000000..ed2683487
--- /dev/null
+++ b/source/x/xdg-utils/xdg-utils.url
@@ -0,0 +1,2 @@
+http://www.freedesktop.org/wiki/Software/xdg-utils/
+http://portland.freedesktop.org/download/
diff --git a/source/x/xterm/xterm.SlackBuild b/source/x/xterm/xterm.SlackBuild
index 392d3053a..cc992591f 100755
--- a/source/x/xterm/xterm.SlackBuild
+++ b/source/x/xterm/xterm.SlackBuild
@@ -30,7 +30,7 @@ NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -41,8 +41,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/source/xap/MPlayer/MPlayer.SlackBuild b/source/xap/MPlayer/MPlayer.SlackBuild
index f76652074..7a9cfbe1d 100755
--- a/source/xap/MPlayer/MPlayer.SlackBuild
+++ b/source/xap/MPlayer/MPlayer.SlackBuild
@@ -23,13 +23,13 @@
# SUCH DAMAGE.
# -----------------------------------------------------------------------------
#
-# Slackware SlackBuild script
+# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers <alien@slackware.com>
# For: MPlayer
# Descr: a movie player for LINUX
# URL: http://www.mplayerhq.hu/
-# Needs:
+# Needs:
# Changelog:
# 1.0rc1-1: 05/Nov/2006 by Eric Hameleers <alien@slackware.com>
# * Initial build.
@@ -85,21 +85,27 @@
# * Update to the latest 1.1 branch, and the same ffmpeg that was
# shipped with the 1.1.1 tarball. The official 1.1.1 release
# did not start a new repo branch, so this is the latest.
-#
+# 20150308-1: 09/mar/2015 by pprkut@slackware.com
+# * Update to latest version from trunk, together with ffmpeg 2.6,
+# which was released roughly around that date as well.
+# 20140403-1: 03/apr/2015 by volkerdi@slackware.com
+# * Update to latest version from trunk and ffmpeg-2.6.1.
+#
# Run 'sh MPlayer.SlackBuild' to build a Slackware package.
# The package (.txz) plus descriptive .txt file are created in /tmp .
-# Install using 'installpkg'.
+# Install using 'installpkg'.
#
# -----------------------------------------------------------------------------
# Set initial variables:
PRGNAM=MPlayer
-VERSION=${VERSION:-20130819}
-BRANCH=${BRANCH:-1.1} # leave empty if you want to build MPlayer trunk
-FFMPEG=${FFMPEG:-20130505}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-20160125}
+BRANCH=${BRANCH:-1.2} # leave empty if you want to build MPlayer trunk
+FFMPEG=${FFMPEG:-2.8.6}
+BUILD=${BUILD:-3}
TAG=${TAG:-}
+NUMJOBS=${NUMJOBS:-" -j7 "}
# Show the branch version in the package name if we build from a branch:
[ -n "$BRANCH" ] && PKGVERSION=${BRANCH}_${VERSION} || PKGVERSION=${VERSION}
@@ -117,7 +123,7 @@ fi
FFURI=git://git.videolan.org/ffmpeg.git
DEFSKIN=${DEFSKIN:-"Blue"} # Download more skins at the following url:
-SKINVER=${SKINVER:-"1.8"} # http://www.mplayerhq.hu/design7/dload.html
+SKINVER=${SKINVER:-"1.11"} # http://www.mplayerhq.hu/design7/dload.html
# Available languages: all cs de en es fr hu it pl ru zh_CN
LANGUAGES="en,de,es,fr"
@@ -126,7 +132,7 @@ LANGUAGES="en,de,es,fr"
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -153,9 +159,7 @@ CODECSDIR=/usr/lib${LIBDIRSUFFIX}/codecs
# ---------------------------------------------------------------------------
# -- PATENT ALERT! --
-# MPlayer source contains an internal copy of 'libdvdcss' for reading DVD's.
-# This is considered illegal software in some countries.
-# Also, MPLayer can be built with MP3 (lame) and AMR audio encoders
+# MPLayer can be built with MP3 (lame) and AMR audio encoders
# (needed for FLV and .3GP videos) but these libraries are 'contaminated'
# with patents from Fraunhofer and GGP.
# Also, the AAC encoder has patent issues.
@@ -166,12 +170,6 @@ CODECSDIR=/usr/lib${LIBDIRSUFFIX}/codecs
# incorporate patented code. So here you go. My Slackware package was
# built with "USE_PATENTS=NO" i.e. without using
# the lame mp3, faac, AMR and dvdcss libraries.
-# This also means that this creates a version of MPlayer that is unable
-# to play encrypted DVD's (which is most DVD's on the market). If it is
-# allowed in your country to use libdvdcss, this is not a big problem though.
-# Install a libdvdcss package and it will be picked up automatically by
-# MPlayer's internal libdvdread library, so that MPlayer will again be able
-# to play encrypted DVD's.
# ---------------------------------------------------------------------------
USE_PATENTS=${USE_PATENTS:-"NO"}
@@ -187,13 +185,10 @@ OSDFONTS="LiberationSans-Regular.ttf \
Arialuni.ttf arial.ttf \
DejaVuSans.ttf Vera.ttf"
-# We will work with a stripped-down source tarball, not containing libdvdcss:
-[ "$USE_PATENTS" != "YES" ] && EXTRA="_nolibdvdcss" || EXTRA=""
-
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
-SOURCE[0]="$SRCDIR/${PRGNAM}${EXTRA}-${VERSION}.tar.xz"
+SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}.tar.xz"
SRCURL[0]=""
# The default skin to use (we need to add at least one)
@@ -229,32 +224,21 @@ src_checkout() {
&& cd MPlayer-${VERSION} \
&& svn checkout --revision $REV ${MPURI}/${MPBRANCH} . \
&& svn propget svn:externals | sed -e 's/[[:space:]].*$//g' | xargs svn up --revision $REV \
- && find . -type d -name '.svn' -depth | xargs rm -rf \
- && ([ "$USE_PATENTS" != "YES" ] && rm -rf libdvdcss || true) \
&& chown -R root:root . \
&& cd .. \
- && tar -${TARCOMP}cf ${2} MPlayer-${VERSION}
+ && tar --exclude-vcs -${TARCOMP}cf ${2} MPlayer-${VERSION}
rm -rf MPlayer-${VERSION}
;;
2) # ffmpeg-${FFMPEG}
mkdir ffmpeg_temp_checkout_$$ \
&& cd ffmpeg_temp_checkout_$$
- if [ "$FFMPEG" = "HEAD" ]; then
- # Checkout without downloading version history (fast!):
- echo "Checking out HEAD from '$FFURI':"
- git clone --depth=1 ${FFURI} ffmpeg
- else
- # Checkout code from a certain branch and/or date; this will take a
- # long time because we have to clone the complete git-repository first:
- echo "Checking out branch 'master' at date $FFMPEG from '$FFURI':"
- git clone ${FFURI} ffmpeg \
- && cd ffmpeg \
- && git checkout master \
- && git checkout $(git rev-list -n 1 --before="`date -d $FFMPEG`" master) \
- && cd ..
- fi
+ echo "Checking out tag n$FFMPEG from '$FFURI':"
+ git clone ${FFURI} ffmpeg \
+ && cd ffmpeg \
+ && git checkout n$FFMPEG \
+ && cd ..
chown -R root:root . \
- && tar --exclude .git -${TARCOMP}cf ${2} ffmpeg
+ && tar --exclude-vcs -${TARCOMP}cf ${2} ffmpeg
cd ..
rm -rf ffmpeg_temp_checkout_$$
;;
@@ -323,36 +307,28 @@ echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"
-# Warn about libdvdread requirement:
-if [ "$USE_PATENTS" != "YES" ]; then
- cat <<"EOT"
-**
-** Removing internal DECSS library.
-** If you want to play encrypted DVD's you need to install libdvdcss separately.
-**
-** If you do not want to remove libdvdcss, then
-** edit this SlackBuild script and change the line:
-** USE_PATENTS=${USE_PATENTS:-"NO"}
-** to:
-** USE_PATENTS="YES"
-**
-EOT
- sleep 2
-fi
-
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE[0]}
-# Extract the ffmpeg source inside the MPlayer directory:
-( cd ${PRGNAM}-${VERSION} && tar -xvf ${SOURCE[2]} )
+
+cd ${PRGNAM}-${VERSION}
+ # remove MPlayer's copy of libswscale
+ rm -rf ffmpeg
+
+ # Extract the ffmpeg source inside the MPlayer directory:
+ tar -xvf ${SOURCE[2]}
+
+ # in case we build with an official tarball
+ if [ -e "ffmpeg-$FFMPEG" ]; then
+ mv "ffmpeg-$FFMPEG" ffmpeg
+ fi
+
+cd ..
chown -R root:root *
chmod -R u+w,go+r-w,a+X-s *
cd ${PRGNAM}-${VERSION}
-# Apply patch to fix subtitles:
-zcat $SRCDIR/subreader-fix-srt-parsing.patch.gz | patch -p1 --verbose || exit 1
-
# Determine what X we're running (the modular X returns the prefix
# in the next command, while older versions stay silent):
XPREF=$(pkg-config --variable=prefix x11) || true
@@ -360,14 +336,22 @@ XPREF=$(pkg-config --variable=prefix x11) || true
# Remove support for patent encumbered and possibly illegal code:
if [ "$USE_PATENTS" != "YES" ]; then
- DO_PATENTED="--disable-libdvdcss-internal \
- --disable-mp3lame --disable-mp3lame-lavc \
+ DO_PATENTED="--disable-mp3lame --disable-mp3lame-lavc \
--disable-libopencore_amrnb \
--disable-libopencore_amrwb"
else
DO_PATENTED=""
fi
+# fix building against samba 4
+zcat $SRCDIR/include-samba-4.0.patch.gz | patch -p1 --verbose || exit 1
+
+# fix building against openjpeg 2
+sed -i "s|lopenjpeg|lopenmj2|" ./configure
+
+# fix flac playback with embedded album art:
+zcat $SRCDIR/MPlayer.demux_lavf.flac.diff.gz | patch -p1 --verbose || exit 1
+
echo Building ...
# MPlayer wants to automatically determine compiler flags,
# so we don't provide CFLAGS.
@@ -377,10 +361,13 @@ echo Building ...
--confdir=/etc/mplayer \
--enable-gui \
--enable-menu \
+ --enable-vdpau \
--disable-arts \
+ --disable-ossaudio \
--disable-bitmap-font \
--codecsdir=${CODECSDIR} \
--language="${LANGUAGES}" \
+ --extra-cflags="-I/usr/include/openmj2-2.1/" \
${EXTRACONFIGUREOPTIONS} \
${DO_PATENTED} \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
@@ -388,7 +375,7 @@ echo Building ...
if [ ! -f VERSION ]; then
echo $VERSION > VERSION
fi
-make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# Build the html documentation (not all languages are available):
@@ -396,7 +383,7 @@ if [ "$LANGUAGES" = "all" ]; then
# make html-chunked
make html-single
else
- for i in $(echo $LANGUAGES | tr , ' ') ; do
+ for i in $(echo $LANGUAGES | tr , ' ') ; do
# make html-chunked-$i ;
make html-single-$i ;
done
@@ -511,21 +498,3 @@ md5sum ${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${PKGVERSI
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txt
-# Warn about libdvdcss requirement (again):
-if [ "$USE_PATENTS" != "YES" ]; then
- cat <<"EOT"
-**
-** Internal DECSS library was not built.
-** If you want to play encrypted DVD's you need to install libdvdcss separately.
-**
-** If you do not care about patent issues,
-** and want to keep support for internal libdvdcss, then
-** edit this SlackBuild script and change the line:
-** USE_PATENTS=${USE_PATENTS:-"NO"}
-** to:
-** USE_PATENTS="YES"
-**
-EOT
-
-fi
-
diff --git a/source/xap/MPlayer/MPlayer.demux_lavf.flac.diff b/source/xap/MPlayer/MPlayer.demux_lavf.flac.diff
new file mode 100644
index 000000000..7077d630f
--- /dev/null
+++ b/source/xap/MPlayer/MPlayer.demux_lavf.flac.diff
@@ -0,0 +1,10 @@
+--- ./libmpdemux/demux_lavf.c.orig 2016-01-24 19:46:50.000000000 -0600
++++ ./libmpdemux/demux_lavf.c 2016-03-13 15:11:45.083055246 -0500
+@@ -222,6 +222,7 @@
+ "cdxl",
+ "dxa",
+ "flv",
++ "flac",
+ "gxf",
+ "nut",
+ "nuv",
diff --git a/source/xap/MPlayer/include-samba-4.0.patch b/source/xap/MPlayer/include-samba-4.0.patch
new file mode 100644
index 000000000..2ed272b6a
--- /dev/null
+++ b/source/xap/MPlayer/include-samba-4.0.patch
@@ -0,0 +1,12 @@
+diff -rupN a/stream/stream_smb.c b/stream/stream_smb.c
+--- a/stream/stream_smb.c 2013-03-16 13:38:34.000000000 +0000
++++ b/stream/stream_smb.c 2013-10-31 20:05:32.473947926 +0000
+@@ -18,7 +18,7 @@
+
+ #include "config.h"
+
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <unistd.h>
+
+ #include "mp_msg.h"
diff --git a/source/xap/MPlayer/slack-desc b/source/xap/MPlayer/slack-desc
index 71686a3c9..033b41706 100644
--- a/source/xap/MPlayer/slack-desc
+++ b/source/xap/MPlayer/slack-desc
@@ -6,9 +6,9 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-MPlayer: MPlayer (MPEG-4 digital video technology)
+MPlayer: MPlayer (Linux movie player)
MPlayer:
-MPlayer: MPlayer is a movie player for LINUX. It plays most MPEG, VOB, AVI,
+MPlayer: MPlayer is a movie player for Linux. It plays most MPEG, VOB, AVI,
MPlayer: Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo,
MPlayer: YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim,
MPlayer: and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx,
diff --git a/source/xap/MPlayer/subreader-fix-srt-parsing.patch b/source/xap/MPlayer/subreader-fix-srt-parsing.patch
deleted file mode 100644
index 84f2de4d9..000000000
--- a/source/xap/MPlayer/subreader-fix-srt-parsing.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From d98e61ea438db66323734ad1b6bea66411a3c97b Mon Sep 17 00:00:00 2001
-From: wm4 <wm4@nowhere>
-Date: Tue, 30 Apr 2013 00:09:31 +0200
-Subject: [PATCH] subreader: fix out of bound write access when parsing .srt
-
-This broke .srt subtitles on gcc-4.8. The breakage was relatively
-subtle: it set all hour components to 0, while everything else was
-parsed successfully.
-
-But the problem is really that sscanf wrote 1 byte past the sep
-variable (or more, for invalid/specially prepared input). The %[..]
-format specifier is unbounded. Fix that by letting sscanf drop the
-parsed contents with "*", and also make it skip only one input
-character by adding "1" (=> "%*1[...").
-
-The out of bound write could easily lead to security issues.
-
-Also, this change makes .srt subtitle parsing slightly more strict.
-Strictly speaking this is an unrelated change, but do it anyway. It's
-more correct.
----
- sub/subreader.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
- (foutrelis: adjusted variable names in first hunk to apply to mplayer)
-
-diff --git a/sub/subreader.c b/sub/subreader.c
-index 23da4c7..0f1b6c9 100644
---- a/sub/subreader.c
-+++ b/sub/subreader.c
-@@ -386,14 +386,14 @@ static subtitle *sub_ass_read_line_subviewer(stream_t *st, subtitle *current,
- int h1, m1, s1, ms1, h2, m2, s2, ms2, j = 0;
-
- while (!current->text[0]) {
-- char line[LINE_LEN + 1], full_line[LINE_LEN + 1], sep;
-+ char line[LINE_LEN + 1], full_line[LINE_LEN + 1];
- int i;
-
- /* Parse SubRip header */
- if (!stream_read_line(st, line, LINE_LEN, utf16))
- return NULL;
-- if (sscanf(line, "%d:%d:%d%[,.:]%d --> %d:%d:%d%[,.:]%d",
-- &h1, &m1, &s1, &sep, &ms1, &h2, &m2, &s2, &sep, &ms2) < 10)
-+ if (sscanf(line, "%d:%d:%d%*1[,.:]%d --> %d:%d:%d%*1[,.:]%d",
-+ &h1, &m1, &s1, &ms1, &h2, &m2, &s2, &ms2) < 8)
- continue;
-
- current->start = a1 * 360000 + a2 * 6000 + a3 * 100 + a4 / 10;
-@@ -450,7 +450,7 @@ static subtitle *sub_read_line_subviewer(stream_t *st,subtitle *current,
- return sub_ass_read_line_subviewer(st, current, args);
- while (!current->text[0]) {
- if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL;
-- if ((len=sscanf (line, "%d:%d:%d%[,.:]%d --> %d:%d:%d%[,.:]%d",&a1,&a2,&a3,(char *)&i,&a4,&b1,&b2,&b3,(char *)&i,&b4)) < 10)
-+ if ((len=sscanf (line, "%d:%d:%d%*1[,.:]%d --> %d:%d:%d%*1[,.:]%d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4)) < 8)
- continue;
- current->start = a1*360000+a2*6000+a3*100+a4/10;
- current->end = b1*360000+b2*6000+b3*100+b4/10;
---
-1.8.1.6
-
diff --git a/source/xap/audacious-plugins/audacious-plugins.SlackBuild b/source/xap/audacious-plugins/audacious-plugins.SlackBuild
index 20139dff6..8a1e844f6 100755
--- a/source/xap/audacious-plugins/audacious-plugins.SlackBuild
+++ b/source/xap/audacious-plugins/audacious-plugins.SlackBuild
@@ -30,7 +30,7 @@ NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -41,8 +41,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
ARCHOPTS="--disable-sse2"
elif [ "$ARCH" = "s390" ]; then
@@ -82,7 +82,8 @@ CXXFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--mandir=/usr/man \
- --enable-amidiplug \
+ --disable-aac \
+ --with-ffmpeg=none \
--program-prefix= \
--program-suffix= \
${ARCHOPTS} \
diff --git a/source/xap/audacious-plugins/slack-desc b/source/xap/audacious-plugins/slack-desc
index 2c8227339..8c8684247 100644
--- a/source/xap/audacious-plugins/slack-desc
+++ b/source/xap/audacious-plugins/slack-desc
@@ -11,7 +11,7 @@ audacious-plugins:
audacious-plugins: This is a collection of plugins for Audacious to support additional
audacious-plugins: media formats.
audacious-plugins:
-audacious-plugins: The webpage for Audacious is: http://www.audacious-media-player.org.
+audacious-plugins: The webpage for Audacious is: http://www.audacious-media-player.org
audacious-plugins:
audacious-plugins:
audacious-plugins:
diff --git a/source/xap/audacious/audacious.SlackBuild b/source/xap/audacious/audacious.SlackBuild
index 83662aec6..d7c3d43c8 100755
--- a/source/xap/audacious/audacious.SlackBuild
+++ b/source/xap/audacious/audacious.SlackBuild
@@ -30,7 +30,7 @@ NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -41,8 +41,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
ARCHOPTS="--disable-sse2"
elif [ "$ARCH" = "s390" ]; then
diff --git a/source/xap/audacious/slack-desc b/source/xap/audacious/slack-desc
index 6574e8059..c0f307f63 100644
--- a/source/xap/audacious/slack-desc
+++ b/source/xap/audacious/slack-desc
@@ -15,5 +15,5 @@ audacious: MPEG audio, Ogg Vorbis, RIFF wav, most module formats, and a few
audacious: other formats. Audacious can be extended through plugins to play a
audacious: number of other audio and video formats.
audacious:
-audacious: The webpage for Audacious is: http://www.audacious-media-player.org.
+audacious: The webpage for Audacious is: http://www.audacious-media-player.org
audacious:
diff --git a/source/xap/blueman/0001-Notification-Also-check-if-notification-daemon-suppo.patch b/source/xap/blueman/0001-Notification-Also-check-if-notification-daemon-suppo.patch
new file mode 100644
index 000000000..fd244f3f6
--- /dev/null
+++ b/source/xap/blueman/0001-Notification-Also-check-if-notification-daemon-suppo.patch
@@ -0,0 +1,44 @@
+From fe902c8827fccae8df93d9deff53e22917d69369 Mon Sep 17 00:00:00 2001
+From: Sander Sweers <infirit@gmail.com>
+Date: Mon, 16 May 2016 16:22:14 +0200
+Subject: [PATCH 1/2] Notification: Also check if notification daemon supports
+ body
+
+This is the absolute minimum we require from the notification daemon. With
+this we fix the when no daemon is available (not running or installed).
+See [1] what prompted this change.
+
+[1] https://github.com/blueman-project/blueman/issues/519#issuecomment-218976647
+---
+ blueman/gui/Notification.py | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/blueman/gui/Notification.py b/blueman/gui/Notification.py
+index 41fdd69..6f3d3dc 100644
+--- a/blueman/gui/Notification.py
++++ b/blueman/gui/Notification.py
+@@ -161,10 +161,18 @@ class Notification(object):
+ def actions_supported():
+ return "actions" in Notify.get_server_caps()
+
++ @staticmethod
++ def body_supported():
++ return "body" in Notify.get_server_caps()
++
+ def __new__(cls, summary, message, timeout=-1, actions=None, actions_cb=None, pixbuf=None, status_icon=None):
+- if not Config('org.blueman.general')['notification-daemon'] or (actions and not cls.actions_supported()):
+- # Use fallback as user does not want to use a notification daemon or we have to show actions and the
+- # notification daemon does not provide them
++ forced_fallback = not Config('org.blueman.general')['notification-daemon']
++
++ if forced_fallback or not cls.body_supported() or (actions and not cls.actions_supported()):
++ # Use fallback in the case:
++ # * user does not want to use a notification daemon
++ # * the notification daemon is not available
++ # * we have to show actions and the notification daemon does not provide them
+ klass = _NotificationDialog
+ else:
+ klass = _NotificationBubble
+--
+2.8.3
+
diff --git a/source/xap/blueman/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch b/source/xap/blueman/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch
new file mode 100644
index 000000000..17820a106
--- /dev/null
+++ b/source/xap/blueman/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch
@@ -0,0 +1,27 @@
+From 2b4c3aecff94c1093de41285bba34b40bc69ddaf Mon Sep 17 00:00:00 2001
+From: Sander Sweers <infirit@gmail.com>
+Date: Mon, 2 May 2016 14:49:13 +0200
+Subject: [PATCH 2/2] NetConf: Treat UnicodeDecodeError as if there was no file
+
+This is unfortunate but most people will not even notice we created a new
+state file.
+---
+ blueman/main/NetConf.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blueman/main/NetConf.py b/blueman/main/NetConf.py
+index d62dc14..4d7efd8 100644
+--- a/blueman/main/NetConf.py
++++ b/blueman/main/NetConf.py
+@@ -222,7 +222,7 @@ class NetConf(object):
+ NetConf.default_inst = obj
+ f.close()
+ return obj
+- except IOError:
++ except (IOError, UnicodeDecodeError):
+ n = cls()
+ try:
+ n.store()
+--
+2.8.3
+
diff --git a/source/xap/blueman/blueman-open b/source/xap/blueman/blueman-open
deleted file mode 100644
index 0cfa688fa..000000000
--- a/source/xap/blueman/blueman-open
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/bin/sh
-# Blueman Mount Script for Slackware
-# by Zarren Spry & Robby Workman
-# Based on http://kde-apps.org/content/show.php/kde4+bluetooth+files+open?content=108869
-
-# Set to 0 if you want more debugging messages
-DEBUG=1
-
-device_addr="$1"
-device_name="$(hcitool name $device_addr)"
-own_name="$(basename $0)"
-basedir="${basedir:-$HOME/obexfs}"
-mountpoint="${basedir}/${device_addr}"
-browser=${browser:-"xdg-open"}
-
-# If we're running in kde, use kdialog
-if [ "$KDE_FULL_SESSION" = "true" ]; then
- if which kdialog 1>/dev/null 2>/dev/null; then
- messagetype="kdialog"
- fi
-# If not, then see if libnotify is available
-# Even if it is, there may not be a notification daemon running, but there's
-# no good way to check for this, so oh well...
-elif which notify-send 1>/dev/null 2>/dev/null; then
- messagetype="libnotify"
-# If no libnotify, then use kdialog if it's installed
-elif which kdialog 1>/dev/null 2>/dev/null; then
- messagetype="kdialog"
-# If all else fails, just don't do notifications
-else
- messagetype=""
-fi
-
-# Mount function
-mount_device ()
-{
- [ ! -z $DEBUG ] && logger -i -t $own_name "Attempting to mount device $device_name to $mountpoint..."
- [ ! -z $DEBUG ] && logger -i -t $own_name "Execute: obexfs -b $device_addr $mountpoint"
-
- mkdir -p $mountpoint
- obexfs -b $device_addr $mountpoint 2>&1
-
- if [ $? != 0 ]; then
- MSG_TXT="Failed to mount $device_name to $mountpoint. $dbg_msg"
- FAILZOR=definitely
- if [ ! -z $DEBUG ]; then
- logger -i -t $own_name "Failed to mount $device_name to $mountpoint."
- fi
- else
- MSG_TXT="Successfully mounted $device_name to $mountpoint"
- if [ ! -z $DEBUG ]; then
- logger -i -t $own_name "Successfully mounted $device_name to $mountpoint."
- fi
- fi
-
- if [ $messagetype == "kdialog" ]; then
- kdialog --passivepopup "$MSG_TXT" 2
- elif [ $messagetype == "libnotify" ]; then
- notify-send --expire-time=20000 --icon=blueman "$MSG_TXT"
- fi
-
- [ "$FAILZOR" = "definitely" ] && exit 1
-
- [ ! -z $DEBUG ] && logger -i -t $own_name "Opening $mountpoint with $browser..."
- $browser $mountpoint 2>&1
-
-}
-
-# Unmount function
-umount_device ()
-{
- if grep -qw $mountpoint /proc/mounts 2>/dev/null ; then
- [ ! -z $DEBUG ] && logger -i -t $own_name \
- "$mountpoint has something mounted on it already - unmounting it..."
-
- fusermount -u $mountpoint 1>/dev/null 2>/dev/null
-
- if [ $? != 0 ]; then
- [ ! -z $DEBUG ] && logger -i -t $own_name "Failed to unmount $mountpoint with fusermount..."
- umount -f $mountpoint 1>/dev/null 2>/dev/null
- if [ $? != 0 ]; then
- [ ! -z $DEBUG ] && \
- logger -i -t $own_name \
- "Failed to unmount $mountpoint with umount - try it manually as root and then start over."
- FAILZOR=definitely
- MSG_TXT="Failed to unmount $mountpoint with fusermount and umount - try it as root first."
- else
- break
- fi
- else
- [ ! -z $DEBUG ] && logger -i -t $own_name "Successfully unmounted $device_name."
- fi
- else
- [ ! -z $DEBUG ] && logger -i -t $own_name "$mountpoint has nothing mounted on it - continuing..."
- fi
-
- if [ $messagetype == "kdialog" ]; then
- kdialog --passivepopup "$MSG_TXT" 3
- elif [ $messagetype == "libnotify" ]; then
- notify-send --expire-time=20000 --icon=blueman "$MSG_TXT"
- fi
- [ "$FAILZOR" = "definitely" ] && exit 1
-}
-
-MSG_TXT="Attempting to mount $device_name - please wait..."
-if [ $messagetype == "kdialog" ]; then
- kdialog --passivepopup "$MSG_TXT" 4
-elif [ $messagetype == "libnotify" ]; then
- notify-send --expire-time=20000 --icon=blueman "$MSG_TXT"
-fi
-
-umount_device
-mount_device
-
diff --git a/source/xap/blueman/blueman-use_blueman-open_for_obexfs.diff b/source/xap/blueman/blueman-use_blueman-open_for_obexfs.diff
deleted file mode 100644
index 542ee6e5d..000000000
--- a/source/xap/blueman/blueman-use_blueman-open_for_obexfs.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur blueman-1.21.orig/blueman/Constants.py.in blueman-1.21/blueman/Constants.py.in
---- blueman-1.21.orig/blueman/Constants.py.in 2009-09-20 05:01:26.000000000 -0500
-+++ blueman-1.21/blueman/Constants.py.in 2009-12-13 16:26:29.643850538 -0600
-@@ -10,7 +10,7 @@
- POLKIT = "@polkit_val@" == "yes"
- HAL_ENABLED = "@hal_en@" == "yes"
-
--DEF_BROWSE_COMMAND = "nautilus --browser obex://[%d]"
-+DEF_BROWSE_COMMAND = "/usr/libexec/blueman-open %d"
-
- import os
- import gettext
diff --git a/source/xap/blueman/blueman.SlackBuild b/source/xap/blueman/blueman.SlackBuild
index 5559f0db3..810b8cc21 100755
--- a/source/xap/blueman/blueman.SlackBuild
+++ b/source/xap/blueman/blueman.SlackBuild
@@ -2,8 +2,8 @@
# Slackware build script for blueman
-# Copyright 2009 Robby Workman, Northport, Alabama, USA
-# Copyright 2010 Patrick Volkerding, Sebeka, MN, USA
+# Copyright 2009,2015 Robby Workman, Tuscaloosa, Alabama, USA
+# Copyright 2010,2015 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,12 +25,12 @@
PKGNAM=blueman
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -43,8 +43,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -62,7 +62,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
-cd $PKGNAM-$VERSION
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -70,13 +70,12 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Use blueman-open, a modified version of this, to browse obexfs shares:
-# http://www.kde-apps.org/content/show.php/kde4+bluetooth+files+open?content=108869
-zcat $CWD/blueman-use_blueman-open_for_obexfs.diff.gz | patch -p1 || exit 1
+zcat $CWD/0001-Notification-Also-check-if-notification-daemon-suppo.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch.gz | patch -p1 --verbose || exit 1
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./autogen.sh \
+./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
@@ -85,43 +84,32 @@ CXXFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/$PKGNAM-$VERSION \
--disable-static \
--with-dhcp-config=/etc/dhcpd.conf \
- --disable-hal \
--enable-polkit \
- --build=$ARCH-slackware-linux
+ --enable-thunar-sendto \
+ --enable-settings-integration \
+ --disable-schemas-compile \
+ --build=$ARCH-slackware-linux || exit 1
+
+# --with-no-runtime-deps-check
+
+# I think there's a built-in fallback, but just in case:
+sed -i "s,nautilus,thunar,g" blueman/Constants.py*
+
+# https://github.com/blueman-project/blueman/issues/435
+sed -i "s,#!/usr/bin/env python,#!/usr/bin/python2.7,g" module/_blueman.pyx apps/*
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# Add the blueman-open script to /usr/libexec for browsing obexfs shares
-# I don't want to put this in PATH and have someone accidentally run it
-mkdir -p $PKG/usr/libexec
-cat $CWD/blueman-open > $PKG/usr/libexec/blueman-open
-chmod 0755 $PKG/usr/libexec/blueman-open
-
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null || true
-)
-
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
-
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a \
- AUTHORS COPYING* INSTALL NEWS README* \
- $PKG/usr/doc/$PKGNAM-$VERSION
-
-# If there's a ChangeLog, installing at least part of the recent history
-# is useful, but don't let it get totally out of control:
-if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
- cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
- touch -r ChangeLog $DOCSDIR/ChangeLog
-fi
+# Remove the AppIndicator.py plugin (we don't have libappindicator3
+# nor will we be getting it in the foreseeable future)
+rm $PKG/usr/lib${LIBDIRSUFFIX}/python*/site-packages/blueman/plugins/applet/AppIndicator.py*
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
@@ -129,4 +117,3 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -p -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/xap/blueman/doinst.sh b/source/xap/blueman/doinst.sh
index 17b18ef35..808893690 100644
--- a/source/xap/blueman/doinst.sh
+++ b/source/xap/blueman/doinst.sh
@@ -21,3 +21,9 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
fi
fi
+if [ -e usr/share/glib-2.0/schemas ]; then
+ if [ -x /usr/bin/glib-compile-schemas ]; then
+ /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1
+ fi
+fi
+
diff --git a/source/xap/blueman/slack-desc b/source/xap/blueman/slack-desc
index d9b80088d..a906f3ff3 100644
--- a/source/xap/blueman/slack-desc
+++ b/source/xap/blueman/slack-desc
@@ -16,4 +16,4 @@ blueman: - Connecting to input and audio devices
blueman: - Sending/Receiving/Browsing files via OBEX
blueman: - Pairing
blueman:
-blueman: Homepage: http://blueman-project.org
+blueman: Homepage: https://github.com/blueman-project/blueman
diff --git a/source/xap/ddd/ddd.SlackBuild b/source/xap/ddd/ddd.SlackBuild
index fda06cc5e..5bd702099 100755
--- a/source/xap/ddd/ddd.SlackBuild
+++ b/source/xap/ddd/ddd.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2013, 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,12 +27,12 @@
PKGNAM=ddd
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-4}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
@@ -84,6 +84,9 @@ chmod -R u+w,go+r-w,a-s .
# http://savannah.gnu.org/bugs/?26726
zcat $CWD/strclass.C.diff.gz | patch -p0 --verbose || exit 1
+# Fix machine code window with gdb > 7.1:
+zcat $CWD/machine_code_window_fix.diff.gz | patch -p1 --verbose || exit 1
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/xap/ddd/machine_code_window_fix.diff b/source/xap/ddd/machine_code_window_fix.diff
new file mode 100644
index 000000000..f63b43c62
--- /dev/null
+++ b/source/xap/ddd/machine_code_window_fix.diff
@@ -0,0 +1,13 @@
+diff --git a/ddd/GDBAgent.C b/ddd/GDBAgent.C
+index 7fc1379..87652d2 100644
+--- a/ddd/GDBAgent.C
++++ b/ddd/GDBAgent.C
+@@ -3200,7 +3200,7 @@ string GDBAgent::disassemble_command(string start, const char *end) const
+ {
+ string end_( end );
+ normalize_address(end_);
+- cmd += ' ';
++ cmd += ',';
+ cmd += end_;
+ }
+ return cmd;
diff --git a/source/xap/electricsheep/electricsheep.SlackBuild b/source/xap/electricsheep/electricsheep.SlackBuild
index 69ab99d02..8ff65c768 100755
--- a/source/xap/electricsheep/electricsheep.SlackBuild
+++ b/source/xap/electricsheep/electricsheep.SlackBuild
@@ -34,7 +34,7 @@
PRGNAM=electricsheep
VERSION=${VERSION:-20090306}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -206,11 +206,12 @@ cd client
--mandir=/usr/man \
--build=$ARCH-slackware-linux \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
- make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+ make -j 7 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
cd ..
# Then the flam3 (fractal flames) renderer:
cd flam3
+ cat $SRCDIR/flam3-3.0.1-libpng15.patch | patch -p1 --verbose || exit 1
LDFLAGS="$SLKLDFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" \
@@ -220,7 +221,7 @@ cd flam3
--mandir=/usr/man \
--build=$ARCH-slackware-linux \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
- make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+ make -j 7 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
cd ..
diff --git a/source/xap/electricsheep/flam3-3.0.1-libpng15.patch b/source/xap/electricsheep/flam3-3.0.1-libpng15.patch
new file mode 100644
index 000000000..48046cc17
--- /dev/null
+++ b/source/xap/electricsheep/flam3-3.0.1-libpng15.patch
@@ -0,0 +1,74 @@
+--- src/png.c
++++ src/png.c
+@@ -142,7 +142,7 @@
+ }
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ if (png_image) {
+- for (y = 0 ; y < info_ptr->height ; y++)
++ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++)
+ free (png_image[y]);
+ free (png_image);
+ }
+@@ -161,19 +161,19 @@
+ png_set_sig_bytes (png_ptr, SIG_CHECK_SIZE);
+ png_read_info (png_ptr, info_ptr);
+
+- if (8 != info_ptr->bit_depth) {
++ if (8 != png_get_bit_depth(png_ptr, info_ptr)) {
+ fprintf(stderr, "bit depth type must be 8, not %d.\n",
+- info_ptr->bit_depth);
++ png_get_bit_depth(png_ptr, info_ptr));
+ return 0;
+ }
+
+- *width = info_ptr->width;
+- *height = info_ptr->height;
++ *width = png_get_image_width(png_ptr, info_ptr);
++ *height = png_get_image_height(png_ptr, info_ptr);
+ p = q = malloc(4 * *width * *height);
+- png_image = (png_byte **)malloc (info_ptr->height * sizeof (png_byte*));
++ png_image = (png_byte **)malloc (png_get_image_height(png_ptr, info_ptr) * sizeof (png_byte*));
+
+- linesize = info_ptr->width;
+- switch (info_ptr->color_type) {
++ linesize = png_get_image_width(png_ptr, info_ptr);
++ switch (png_get_color_type(png_ptr, info_ptr)) {
+ case PNG_COLOR_TYPE_RGB:
+ linesize *= 3;
+ break;
+@@ -182,21 +182,21 @@
+ break;
+ default:
+ fprintf(stderr, "color type must be RGB or RGBA not %d.\n",
+- info_ptr->color_type);
++ png_get_color_type(png_ptr, info_ptr));
+ return 0;
+ }
+
+- for (y = 0 ; y < info_ptr->height ; y++) {
++ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++) {
+ png_image[y] = malloc (linesize);
+ }
+ png_read_image (png_ptr, png_image);
+ png_read_end (png_ptr, info_ptr);
+
+- for (y = 0 ; y < info_ptr->height ; y++) {
++ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++) {
+ unsigned char *s = png_image[y];
+- for (x = 0 ; x < info_ptr->width ; x++) {
++ for (x = 0 ; x < png_get_image_width(png_ptr, info_ptr) ; x++) {
+
+- switch (info_ptr->color_type) {
++ switch (png_get_color_type(png_ptr, info_ptr)) {
+ case PNG_COLOR_TYPE_RGB:
+ p[0] = s[0];
+ p[1] = s[1];
+@@ -217,7 +217,7 @@
+ }
+ }
+
+- for (y = 0 ; y < info_ptr->height ; y++)
++ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++)
+ free (png_image[y]);
+ free (png_image);
+ png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp)NULL);
diff --git a/source/xap/fluxbox/fluxbox.SlackBuild b/source/xap/fluxbox/fluxbox.SlackBuild
index 25eedf3eb..07b5e0cec 100755
--- a/source/xap/fluxbox/fluxbox.SlackBuild
+++ b/source/xap/fluxbox/fluxbox.SlackBuild
@@ -79,10 +79,10 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--docdir=/usr/doc/fluxbox-$VERSION \
--enable-xinerama \
- --enable-shape \
--enable-slit \
--enable-nls \
- --enable-timed-cache \
+ --enable-timedcache \
+ --enable-xext \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
diff --git a/source/xap/fvwm/fvwm.SlackBuild b/source/xap/fvwm/fvwm.SlackBuild
index b04223c75..ddd373d93 100755
--- a/source/xap/fvwm/fvwm.SlackBuild
+++ b/source/xap/fvwm/fvwm.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2011, 2012, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,12 +23,12 @@
PKGNAM=fvwm
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-6}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -37,8 +37,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -61,7 +61,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
-cd $PKGNAM-$VERSION
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -77,9 +77,10 @@ CFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
--disable-bidi \
+ --disable-gtk \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
diff --git a/source/xap/fvwm/slack-desc b/source/xap/fvwm/slack-desc
index 2d2a9ef5f..d616afa4d 100644
--- a/source/xap/fvwm/slack-desc
+++ b/source/xap/fvwm/slack-desc
@@ -14,6 +14,6 @@ fvwm: consumption, provide a 3-D look to window frames, and provide a simple
fvwm: virtual desktop.
fvwm:
fvwm: Homepage: http://www.fvwm.org
-fvwm:
+fvwm: Development: https://github.com/fvwmorg/fvwm
fvwm:
fvwm:
diff --git a/source/xap/geeqie/geeqie.SlackBuild b/source/xap/geeqie/geeqie.SlackBuild
index 2c0851b4d..6dffa6fe5 100755
--- a/source/xap/geeqie/geeqie.SlackBuild
+++ b/source/xap/geeqie/geeqie.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2010, 2011, 2012 Patrick Volkerding, Sebeka, MN, USA
+# Copyright 2010, 2011, 2012, 2015, 2016 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,15 +22,25 @@
# Modified by the SlackBuilds.org project
-
PKGNAM=geeqie
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
+CWD=$(pwd)
+# Download the geeqie Git head if there's no tarball:
+if ! /bin/ls $CWD/geeqie*tar* 1> /dev/null 2> /dev/null ; then
+ git clone git://www.geeqie.org/geeqie.git
+ mv geeqie geeqie-$(date +%Y%m%d)git
+ tar --exclude-vcs -cf geeqie-$(date +%Y%m%d)git.tar geeqie-$(date +%Y%m%d)git
+ xz -9 geeqie-$(date +%Y%m%d)git.tar
+ rm -r $CWD/geeqie-$(date +%Y%m%d)git
+fi
+
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -39,8 +49,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i686"
elif [ "$ARCH" = "s390" ]; then
@@ -51,7 +61,6 @@ else
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64"
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
rm -rf $PKG
@@ -59,8 +68,9 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
cd $PKGNAM-$VERSION || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -68,6 +78,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+autoreconf -f -i ; intltoolize
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/xap/geeqie/slack-desc b/source/xap/geeqie/slack-desc
index 7371d160b..16a0d9923 100644
--- a/source/xap/geeqie/slack-desc
+++ b/source/xap/geeqie/slack-desc
@@ -12,7 +12,7 @@ geeqie: Geeqie is an interactive GTK based image viewer that supports multiple
geeqie: image formats, zooming, panning, thumbnails, and sorting images into
geeqie: collections.
geeqie:
-geeqie: Homepage: http://geeqie.sourceforge.net
+geeqie: Homepage: http://www.geeqie.org
geeqie:
geeqie:
geeqie:
diff --git a/source/xap/gftp/gftp.SlackBuild b/source/xap/gftp/gftp.SlackBuild
index 9a293b64c..c125b39fa 100755
--- a/source/xap/gftp/gftp.SlackBuild
+++ b/source/xap/gftp/gftp.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=gftp
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
diff --git a/source/xap/gimp/gimp.SlackBuild b/source/xap/gimp/gimp.SlackBuild
index 458485851..157a86e4b 100755
--- a/source/xap/gimp/gimp.SlackBuild
+++ b/source/xap/gimp/gimp.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,7 +28,7 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -43,8 +43,8 @@ PKG=$TMP/package-gimp
rm -rf $PKG
mkdir -p $TMP $PKG
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -80,6 +80,7 @@ CFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/gimp-$VERSION \
--disable-static \
--with-libcurl \
+ --with-lcms=lcms2 \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
diff --git a/source/xap/gkrellm/gkrellm.SlackBuild b/source/xap/gkrellm/gkrellm.SlackBuild
index 14c071725..f01e4f349 100755
--- a/source/xap/gkrellm/gkrellm.SlackBuild
+++ b/source/xap/gkrellm/gkrellm.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,14 +20,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=2.3.5
-PKGVER=2.3.5
-BUILD=${BUILD:-2}
+VERSION=2.3.7
+PKGVER=2.3.7
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -49,7 +49,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf gkrellm-$VERSION
-tar xvf $CWD/gkrellm-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/gkrellm-$VERSION.tar.?z* || exit 1
cd gkrellm-$VERSION || exit 1
# Fix library paths (works for all ARCHs):
sed -i -e "s#lib/gkrellm2#lib${LIBDIRSUFFIX}/gkrellm2#g" $(grep -lr 'lib/gkrellm2' *)
diff --git a/source/xap/gnuchess/eboard.png16.diff b/source/xap/gnuchess/eboard.png16.diff
new file mode 100644
index 000000000..f5743cdd9
--- /dev/null
+++ b/source/xap/gnuchess/eboard.png16.diff
@@ -0,0 +1,16 @@
+--- ./cimg.cc.orig 2008-02-22 09:51:22.000000000 -0600
++++ ./cimg.cc 2015-03-23 11:10:46.570421240 -0500
+@@ -94,11 +94,11 @@
+ ct == PNG_COLOR_TYPE_GRAY_ALPHA)
+ png_set_gray_to_rgb(pngp);
+
+- alloc(pngp->width,pngp->height);
++ alloc(png_get_image_width(pngp, infp), png_get_image_height(pngp, infp));
+ if (!ok) { fclose(f); return; }
+ ok = 0;
+
+- for(i=0;i<pngp->height;i++) {
++ for(i=0;i<png_get_image_height(pngp, infp);i++) {
+ png_read_row(pngp, (png_bytep) (&data[i*rowlen]), NULL);
+ }
+
diff --git a/source/xap/gnuchess/gnuchess.SlackBuild b/source/xap/gnuchess/gnuchess.SlackBuild
index 46bc29e0d..4e2fa415e 100755
--- a/source/xap/gnuchess/gnuchess.SlackBuild
+++ b/source/xap/gnuchess/gnuchess.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,16 +21,16 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERGNUCHESS=6.0.3
+VERGNUCHESS=6.2.2
VERSJENG=11.2
VEREBOARD=1.1.1
-VERXBOARD=4.7.1
-BUILD=${BUILD:-2}
+VERXBOARD=4.8.0
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -39,8 +39,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -71,6 +71,7 @@ find . \
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --mandir=/usr/man \
--infodir=/usr/info \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
@@ -112,6 +113,7 @@ tar xvf $CWD/eboard-$VEREBOARD.tar.bz2 || exit 1
cd eboard-$VEREBOARD || exit 1
zcat $CWD/eboard.assert.diff.gz | patch -p1 --verbose || exit 1
zcat $CWD/eboard.ldl.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/eboard.png16.diff.gz | patch -p1 --verbose || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -136,7 +138,7 @@ cd $TMP
rm -rf xboard-$VERXBOARD
tar xvf $CWD/xboard-$VERXBOARD.tar.?z* || exit 1
cd xboard-$VERXBOARD || exit 1
-zcat $CWD/xboard.conf.in.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xboard.conf.diff.gz | patch -p1 --verbose || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/source/xap/gnuchess/xboard.conf.in.diff b/source/xap/gnuchess/xboard.conf.diff
index 488813800..160ce4fa1 100644
--- a/source/xap/gnuchess/xboard.conf.in.diff
+++ b/source/xap/gnuchess/xboard.conf.diff
@@ -1,14 +1,12 @@
---- ./xboard.conf.in.orig 2013-02-20 23:59:30.000000000 -0600
-+++ ./xboard.conf.in 2013-03-19 21:39:17.377182426 -0500
-@@ -67,12 +67,12 @@
+--- ./xboard.conf.orig 2015-03-20 13:32:54.035406604 -0500
++++ ./xboard.conf 2015-03-20 13:35:24.433417456 -0500
+@@ -73,11 +73,11 @@
;
; Engines & adjudicatons in engine-engine games
;
--firstChessProgram fairymax
---secondChessProgram fairymax
--firstChessProgramNames {fairymax
+-firstChessProgram gnuchess
-+-secondChessProgram gnuchess
+-firstChessProgramNames {"GNU Chess" -fcp gnuchess
+fairymax
"Fruit 2.1" -fcp fruit -fUCI
diff --git a/source/xap/gnuplot/gnuplot.SlackBuild b/source/xap/gnuplot/gnuplot.SlackBuild
index b6203229f..862ae88bf 100755
--- a/source/xap/gnuplot/gnuplot.SlackBuild
+++ b/source/xap/gnuplot/gnuplot.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,12 +22,12 @@
PKGNAM=gnuplot
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -36,8 +36,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -76,11 +76,11 @@ CFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--infodir=/usr/info \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --with-png \
--with-gd \
+ --with-caca \
--datadir=/usr/share/gnuplot \
--with-readline=builtin \
- --build=${ARCH}-slackware-linux
+ --build=${ARCH}-slackware-linux || exit 1
#
# I think most people would rather not have a Qt dependency here.
@@ -89,11 +89,12 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+make install-info DESTDIR=$PKG || exit 1
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-# Compress and if needed symlink the man pages:
+# Compress and if needed symlink the man pages: || exit 1
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
for manpagedir in $(find . -type d -name "man*") ; do
diff --git a/source/xap/gparted/com.slackware.pkexec.gparted.policy b/source/xap/gparted/com.slackware.pkexec.gparted.policy
new file mode 100644
index 000000000..2981762ef
--- /dev/null
+++ b/source/xap/gparted/com.slackware.pkexec.gparted.policy
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <action id="com.slackware.pkexec.gparted">
+ <message>Authentication is required to run the GParted Partition Editor</message>
+ <icon_name>gparted</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gparted</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+</policyconfig>
+
diff --git a/source/xap/gparted/doinst.sh b/source/xap/gparted/doinst.sh
new file mode 100644
index 000000000..4e8ba7071
--- /dev/null
+++ b/source/xap/gparted/doinst.sh
@@ -0,0 +1,4 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/source/xap/gparted/gparted.SlackBuild b/source/xap/gparted/gparted.SlackBuild
new file mode 100755
index 000000000..7a78ab016
--- /dev/null
+++ b/source/xap/gparted/gparted.SlackBuild
@@ -0,0 +1,132 @@
+#!/bin/sh
+#
+# Slackware build script for GParted
+#
+# Copyright 2009-2015 Erik W. Hanson, Minneapolis, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=gparted
+VERSION=${VERSION:-$(echo $(basename $(echo $PRGNAM-*.tar.xz | cut -f 2 -d -) .tar.xz) | cut -f 2 -d -)}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sed -i "s:@gksuprog@ @installdir@/gparted %f:@installdir@/gparted_polkit %f:g" \
+ gparted.desktop.in.in
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-doc \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/share/polkit-1/actions
+cat $CWD/com.slackware.pkexec.gparted.policy > $PKG/usr/share/polkit-1/actions/com.slackware.pkexec.gparted.policy
+
+cat $CWD/gparted_polkit > $PKG/usr/sbin/gparted_polkit
+chmod 0755 $PKG/usr/sbin/gparted_polkit
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a AUTHORS COPYING* ChangeLog NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source/xap/gparted/gparted_polkit b/source/xap/gparted/gparted_polkit
new file mode 100644
index 000000000..76bd7b5e6
--- /dev/null
+++ b/source/xap/gparted/gparted_polkit
@@ -0,0 +1,6 @@
+#!/bin/bash
+if [ $(which pkexec) ]; then
+ pkexec --disable-internal-agent "/usr/sbin/gparted" "$@"
+else
+ /usr/sbin/gparted "$@"
+fi
diff --git a/source/xap/gparted/slack-desc b/source/xap/gparted/slack-desc
new file mode 100644
index 000000000..85f3617b8
--- /dev/null
+++ b/source/xap/gparted/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+gparted: gparted (Graphical partition editor)
+gparted:
+gparted: With GParted you can resize, copy, and move partitions without data
+gparted: loss, enabling you to:
+gparted:
+gparted: * Grow or shrink your C: drive
+gparted: * Create space for new operating systems
+gparted: * Attempt data rescue from lost partitions
+gparted:
+gparted: http://gparted.sourceforge.net/
+gparted:
diff --git a/source/xap/gucharmap/gucharmap.SlackBuild b/source/xap/gucharmap/gucharmap.SlackBuild
index 56fe66c67..7d493cb6f 100755
--- a/source/xap/gucharmap/gucharmap.SlackBuild
+++ b/source/xap/gucharmap/gucharmap.SlackBuild
@@ -22,12 +22,12 @@
VERSION=${VERSION:-$(echo gucharmap-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -36,8 +36,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/xap/gv/gv-xft.patch b/source/xap/gv/gv-xft.patch
new file mode 100644
index 000000000..eb0520a55
--- /dev/null
+++ b/source/xap/gv/gv-xft.patch
@@ -0,0 +1,404 @@
+diff -rc gv-3.7.4/configure gv-xft-3.7.4/configure
+*** gv-3.7.4/configure 2013-03-17 12:20:09.000000000 +0100
+--- gv-xft-3.7.4/configure 2014-05-02 14:22:59.879439785 +0200
+***************
+*** 13604,13616 ****
+ true
+ fi
+
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawInitializeWidgetSet in -lXaw3d" >&5
+! $as_echo_n "checking for XawInitializeWidgetSet in -lXaw3d... " >&6; }
+ if test "${ac_cv_lib_Xaw3d_XawInitializeWidgetSet+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+! LIBS="-lXaw3d $X_LIBS $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+--- 13604,13616 ----
+ true
+ fi
+
+! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawInitializeWidgetSet in -l$XAW3DLIB" >&5
+! $as_echo_n "checking for XawInitializeWidgetSet in -l$XAW3DLIB ... " >&6; }
+ if test "${ac_cv_lib_Xaw3d_XawInitializeWidgetSet+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+! LIBS="-l$XAW3DLIB $X_LIBS $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+***************
+*** 13645,13651 ****
+ #define HAVE_LIBXAW3D 1
+ _ACEOF
+
+! LIBS="-lXaw3d $LIBS"
+
+ else
+ as_fn_error "Unable to find a valid Xaw3d library. Please install it and rerun configure." "$LINENO" 5
+--- 13645,13651 ----
+ #define HAVE_LIBXAW3D 1
+ _ACEOF
+
+! LIBS="-l$XAW3DLIB $LIBS"
+
+ else
+ as_fn_error "Unable to find a valid Xaw3d library. Please install it and rerun configure." "$LINENO" 5
+Seulement dans gv-xft-3.7.4: debian
+diff -rc gv-3.7.4/src/FileSel.c gv-xft-3.7.4/src/FileSel.c
+*** gv-3.7.4/src/FileSel.c 2012-04-01 16:43:24.000000000 +0200
+--- gv-xft-3.7.4/src/FileSel.c 2014-05-02 18:09:53.530875424 +0200
+***************
+*** 1853,1859 ****
+ SET_Arg(XtNallowMarks, False);
+ SET_Arg(XtNjustify, XtJustifyLeft);
+ *listP = ADD_Widget_Arg("list",vlistWidgetClass,*aaaP);
+-
+ ENDMESSAGE(CreateList)
+ }
+
+--- 1853,1858 ----
+diff -rc gv-3.7.4/src/main.c gv-xft-3.7.4/src/main.c
+*** gv-3.7.4/src/main.c 2012-04-01 16:43:24.000000000 +0200
+--- gv-xft-3.7.4/src/main.c 2014-05-02 20:26:04.052136882 +0200
+***************
+*** 62,67 ****
+--- 62,70 ----
+ #include INC_XAW(Scrollbar.h)
+ #include INC_XAW(XawInit.h)
+ #include INC_XMU(Editres.h)
++ #ifdef HAVE_XAW3DXFT
++ #include <X11/Xaw3dxft/Xaw3dXft.h>
++ #endif
+ #ifdef HAVE_LIBXINERAMA
+ #include INC_EXT(Xinerama.h)
+ #endif
+***************
+*** 323,328 ****
+--- 326,348 ----
+
+ int main(int argc, char *argv[])
+ {
++ #ifdef HAVE_XAW3DXFT
++ XftInitFtLibrary();
++ Xaw3dXftSetDefaultFontName("Liberation-10");
++ Xaw3dXftSetHilitColor("#332211");
++ Xaw3dXftSetInsensitiveTwist("#a00000");
++ Xaw3dXftMenuSpacing = 0;
++ Xaw3dXftEncoding = -1;
++ Xaw3dXftStringHilight = 0;
++ Xaw3dXftStringUsePixmap = 0;
++ Xaw3dXftNoHilitReverse = 1;
++ Xaw3dXftButtonInverse = 0;
++ Xaw3dXftButtonDashed = 1;
++ Xaw3dXftShowTips = 1;
++ Xaw3dXftTextBgHilight = 1;
++ Xaw3dXftTextBgHilightColor = 0x332211;
++ #endif
++
+ MAINBEGINMESSAGE(main)
+ gv_safe_gs_workdir = GV_LIBDIR "/safe-gs-workdir";
+ gv_safe_gs_tempdir = 0;
+Seulement dans gv-xft-3.7.4/src: main.c~
+diff -rc gv-3.7.4/src/misc_private.c gv-xft-3.7.4/src/misc_private.c
+*** gv-3.7.4/src/misc_private.c 2012-03-29 18:03:49.000000000 +0200
+--- gv-xft-3.7.4/src/misc_private.c 2014-05-02 15:52:46.514612158 +0200
+***************
+*** 44,49 ****
+--- 44,52 ----
+ #include INC_XAW(Cardinals.h)
+ #include INC_X11(IntrinsicP.h)
+ #include INC_XAW(LabelP.h)
++ #ifdef HAVE_XAW3DXFT
++ #include <X11/Xaw3dxft/Xaw3dXft.h>
++ #endif
+ #include "GhostviewP.h"
+
+ #include "types.h"
+***************
+*** 111,119 ****
+--- 114,127 ----
+
+ #ifdef HAVE_XAW3D_INTERNATIONAL
+ if( vw->simple.international == True ) {
++ #ifdef HAVE_XAW3DXFT
++ Xaw3dXftDrawString(widget, Xaw3dXftDefaultFont,
++ x, y, text, (int)(strlen(text)));
++ #else
+ XmbDrawString(XtDisplay(widget), XtWindow(widget),
+ w->label.fontset, w->label.normal_GC,
+ x, y, text, (int)(strlen(text)));
++ #endif
+ } else {
+ #endif
+ if (w->label.encoding) {
+***************
+*** 121,129 ****
+--- 129,142 ----
+ w->label.normal_GC,
+ x, y,(XChar2b*)text, (int)(strlen(text)));
+ } else {
++ #ifdef HAVE_XAW3DXFT
++ Xaw3dXftDrawString(widget, Xaw3dXftDefaultFont,
++ x, y, text, (int)(strlen(text)));
++ #else
+ XDrawString(XtDisplay(widget), XtWindow(widget),
+ w->label.normal_GC,
+ x, y, text, (int)(strlen(text)));
++ #endif
+ }
+ #ifdef HAVE_XAW3D_INTERNATIONAL
+ }
+diff -rc gv-3.7.4/src/paths.h gv-xft-3.7.4/src/paths.h
+*** gv-3.7.4/src/paths.h 2012-04-01 16:43:24.000000000 +0200
+--- gv-xft-3.7.4/src/paths.h 2014-05-02 12:19:02.351201784 +0200
+***************
+*** 37,48 ****
+--- 37,56 ----
+ #if HAVE_GCC_VERSION(2,95)
+ #define INC_X11(aaa) <X11/aaa>
+ #define INC_XMU(aaa) <X11/Xmu/aaa>
++ #ifdef HAVE_XAW3DXFT
++ #define INC_XAW(aaa) <X11/Xaw3dxft/aaa>
++ #else
+ #define INC_XAW(aaa) <X11/Xaw3d/aaa>
++ #endif
+ #define INC_EXT(aaa) <X11/extensions/aaa>
+ #else
+ #define INC_X11(aaa) <X11/##aaa##>
+ #define INC_XMU(aaa) <X11/Xmu/##aaa##>
++ #ifdef HAVE_XAW3DXFT
++ #define INC_XAW(aaa) <X11/Xaw3dxft/##aaa##>
++ #else
+ #define INC_XAW(aaa) <X11/Xaw3d/##aaa##>
++ #endif
+ #define INC_EXT(aaa) <X11/extensions/##aaa##>
+ #endif
+
+diff -rc gv-3.7.4/src/Vlist.c gv-xft-3.7.4/src/Vlist.c
+*** gv-3.7.4/src/Vlist.c 2012-04-01 16:43:24.000000000 +0200
+--- gv-xft-3.7.4/src/Vlist.c 2014-05-02 18:31:38.121917171 +0200
+***************
+*** 49,55 ****
+ #include "VlistP.h"
+ #include "Frame.h"
+ #include INC_XMU(Converters.h)
+!
+ #define VLIST_MARK_LEFT_INDENT 4
+ #define VLIST_MARK_LABEL_INTERNAL_WIDTH 11
+ #define VLIST_MARK_LABEL_INDENT 4
+--- 49,57 ----
+ #include "VlistP.h"
+ #include "Frame.h"
+ #include INC_XMU(Converters.h)
+! #ifdef HAVE_XAW3DXFT
+! #include <X11/Xaw3dxft/Xaw3dXft.h>
+! #endif
+ #define VLIST_MARK_LEFT_INDENT 4
+ #define VLIST_MARK_LABEL_INTERNAL_WIDTH 11
+ #define VLIST_MARK_LABEL_INDENT 4
+***************
+*** 214,230 ****
+--- 216,243 ----
+ values.graphics_exposures = False;
+ vw->vlist.background_GC = XtGetGC((Widget)vw,(unsigned) GCForeground | GCGraphicsExposures,&values);
+
++ Dimension merde;
+ /* TODO: check if this works here in international mode, or if it has
+ * to be moved to Realize... */
+ #ifdef HAVE_XAW3D_INTERNATIONAL
+ if( vw->simple.international == True ) {
++ #ifdef HAVE_XAW3DXFT
++ vw->vlist.yofs = Xaw3dXftDefaultFont->ascent + 1;
++ vw->vlist.ydelta = Xaw3dXftDefaultFont->ascent + Xaw3dXftDefaultFont->descent;
++ #else
+ XFontSetExtents *ext = XExtentsOfFontSet(vw->label.fontset);
+ vw->vlist.yofs = (ext->max_ink_extent.y<0)?-ext->max_ink_extent.y:ext->max_ink_extent.y;
+ vw->vlist.ydelta = ext->max_ink_extent.height;
++ #endif
+ } else {
+ #endif
++ #ifdef HAVE_XAW3DXFT
++ vw->vlist.yofs = Xaw3dXftDefaultFont->ascent + 1;
++ vw->vlist.ydelta = Xaw3dXftDefaultFont->ascent + Xaw3dXftDefaultFont->descent;
++ #else
+ vw->vlist.yofs = vw->label.font->max_bounds.ascent;
+ vw->vlist.ydelta = vw->label.font->max_bounds.ascent + vw->label.font->max_bounds.descent;
++ #endif
+ #ifdef HAVE_XAW3D_INTERNATIONAL
+ }
+ #endif
+***************
+*** 339,353 ****
+--- 352,380 ----
+ len = strlen(s);
+ #ifdef HAVE_XAW3D_INTERNATIONAL
+ if( vw->simple.international == True )
++ #ifdef HAVE_XAW3DXFT
++ Xaw3dXftDrawString(w, Xaw3dXftDefaultFont,
++ vw->label.label_x,
++ vw->label.label_y + yofs + entry*ydelta,
++ s, len);
++ #else
+ XmbDrawString(XtDisplay(w), XtWindow(w), vw->label.fontset,
+ vw->label.normal_GC,
+ vw->label.label_x, vw->label.label_y + yofs + entry*ydelta,
+ s, len);
++ #endif
+ else
+ #endif
++ #ifdef HAVE_XAW3DXFT
++ Xaw3dXftDrawString(w, Xaw3dXftDefaultFont,
++ vw->label.label_x,
++ vw->label.label_y + yofs + entry*ydelta,
++ s, len);
++ #else
+ XDrawString(XtDisplay(w), XtWindow(w), vw->label.normal_GC,
+ vw->label.label_x, vw->label.label_y + yofs + entry*ydelta,
+ s, len);
++ #endif
+ }
+ ENDMESSAGE1(PaintEntryString)
+ }
+***************
+*** 404,416 ****
+ if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) {
+ if (erase) {
+ INFMESSAGE(clearing entry)
+! XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.background_GC,x,y,width,height);
+ } else {
+ INFMESSAGE(drawing entry)
+ XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),gc,x,y,width,height);
+ FrameDrawFrame(w,x,y,width,height,ss,sw,
+ vw->threeD.top_shadow_GC,
+ vw->threeD.bot_shadow_GC);
+ }
+ ret=1;
+ }
+--- 431,453 ----
+ if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) {
+ if (erase) {
+ INFMESSAGE(clearing entry)
+! #ifndef HAVE_XAW3DXFT
+! XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.background_GC,x,y,width,height);
+! #else
+! XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.background_GC,x,y-1,width,height+2);
+! #endif
+ } else {
+ INFMESSAGE(drawing entry)
++ #ifndef HAVE_XAW3DXFT
+ XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),gc,x,y,width,height);
+ FrameDrawFrame(w,x,y,width,height,ss,sw,
+ vw->threeD.top_shadow_GC,
+ vw->threeD.bot_shadow_GC);
++ #else
++ FrameDrawFrame(w,x,y-1,width,height+2,ss,sw,
++ vw->threeD.top_shadow_GC,
++ vw->threeD.bot_shadow_GC);
++ #endif
+ }
+ ret=1;
+ }
+***************
+*** 491,505 ****
+ if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) {
+ if (paint) {
+ INFMESSAGE(drawing mark)
+ XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.mark_background_GC,x,y,width,height);
+ FrameDrawFrame(w,x,y,width,height,ss,vw->vlist.mark_shadow_width,
+ vw->threeD.top_shadow_GC,
+ vw->threeD.bot_shadow_GC);
+ } else {
+ INFMESSAGE(clearing mark)
+ XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),
+ (entry == vw->vlist.highlighted) ? vw->vlist.highlighted_background_GC : vw->vlist.background_GC,
+! x,y,width,height);
+ }
+ }
+ }
+--- 528,552 ----
+ if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) {
+ if (paint) {
+ INFMESSAGE(drawing mark)
++ #ifndef HAVE_XAW3DXFT
+ XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.mark_background_GC,x,y,width,height);
+ FrameDrawFrame(w,x,y,width,height,ss,vw->vlist.mark_shadow_width,
+ vw->threeD.top_shadow_GC,
+ vw->threeD.bot_shadow_GC);
++ #else
++ FrameDrawFrame(w,x,y-1,width,height+2,ss,vw->vlist.mark_shadow_width,
++ vw->threeD.top_shadow_GC,
++ vw->threeD.bot_shadow_GC);
++ #endif
+ } else {
+ INFMESSAGE(clearing mark)
+ XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),
+ (entry == vw->vlist.highlighted) ? vw->vlist.highlighted_background_GC : vw->vlist.background_GC,
+! #ifndef HAVE_XAW3DXFT
+! x,y,width,height);
+! #else
+! x,y-1,width,height+2);
+! #endif
+ }
+ }
+ }
+***************
+*** 589,600 ****
+--- 636,657 ----
+ if (y + (vw->vlist.ydelta - vw->vlist.yofs) >= rectangle.y) {
+ #ifdef HAVE_XAW3D_INTERNATIONAL
+ if( vw->simple.international == True )
++ #ifdef HAVE_XAW3DXFT
++ Xaw3dXftDrawString(w, Xaw3dXftDefaultFont,
++ vw->label.label_x, y, s, len);
++ #else
+ XmbDrawString(XtDisplay(w), XtWindow(w), vw->label.fontset,
+ vw->label.normal_GC, vw->label.label_x, y, s, len);
++ #endif
+ else
+ #endif
++ #ifdef HAVE_XAW3DXFT
++ Xaw3dXftDrawString(w, Xaw3dXftDefaultFont,
++ vw->label.label_x, y, s, len);
++ #else
+ XDrawString(XtDisplay(w), XtWindow(w), vw->label.normal_GC,
+ vw->label.label_x, y, s, len);
++ #endif
+ }
+ if (nl)
+ s = nl + 1;
+***************
+*** 955,961 ****
+ int entriesvisible = -1;
+
+ if (vw->vlist.ydelta > 0) {
+! entriesvisible = height/vw->vlist.ydelta;
+ }
+ #if 0
+ printf("fitting %d entries of height %d in %d",
+--- 1012,1018 ----
+ int entriesvisible = -1;
+
+ if (vw->vlist.ydelta > 0) {
+! entriesvisible = height/(vw->vlist.ydelta);
+ }
+ #if 0
+ printf("fitting %d entries of height %d in %d",
+***************
+*** 968,974 ****
+--- 1025,1036 ----
+ entriesvisible,(int)(vw->vlist.entries),
+ entriesvisible/(float)(vw->vlist.entries));
+ #endif
++ #ifdef HAVE_XAW3DXFT
++ percent = 0.8 * entriesvisible/(float)(vw->vlist.entries);
++ #else
+ percent = entriesvisible/(float)(vw->vlist.entries);
++ #endif
++ if (percent>1.0) percent = 1.0;
+ INFMESSAGE(VlistVisibleLength)
+ IIMESSAGE(entriesvisible,vw->vlist.entries)
+ FMESSAGE(percent)
diff --git a/source/xap/gv/gv.SlackBuild b/source/xap/gv/gv.SlackBuild
index 751cefd8a..084699627 100755
--- a/source/xap/gv/gv.SlackBuild
+++ b/source/xap/gv/gv.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
PKGNAM=gv
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -58,6 +58,8 @@ rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}-$VERSION || exit 1
+zcat $CWD/gv-xft.patch.gz | patch -p1 --verbose || exit 1
+
# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
diff --git a/source/xap/hexchat/doinst.sh b/source/xap/hexchat/doinst.sh
new file mode 100644
index 000000000..3e5691a05
--- /dev/null
+++ b/source/xap/hexchat/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/source/xap/hexchat/hexchat.SlackBuild b/source/xap/hexchat/hexchat.SlackBuild
new file mode 100755
index 000000000..e6e25afcc
--- /dev/null
+++ b/source/xap/hexchat/hexchat.SlackBuild
@@ -0,0 +1,106 @@
+#!/bin/sh
+
+# Copyright 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=hexchat
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --enable-textfe \
+ --enable-openssl \
+ --disable-lua \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ COPYING* readme* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source/xap/hexchat/slack-desc b/source/xap/hexchat/slack-desc
new file mode 100644
index 000000000..eb15d816c
--- /dev/null
+++ b/source/xap/hexchat/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+hexchat: hexchat (GTK+ IRC client)
+hexchat:
+hexchat: HexChat is an IRC client for Windows and UNIX-like operating systems.
+hexchat:
+hexchat: Website: https://hexchat.github.io/
+hexchat:
+hexchat:
+hexchat:
+hexchat:
+hexchat:
+hexchat:
diff --git a/source/ap/foomatic-filters/doinst.sh b/source/xap/imagemagick/doinst.sh
index d7bcdf8bd..a78c00608 100644
--- a/source/ap/foomatic-filters/doinst.sh
+++ b/source/xap/imagemagick/doinst.sh
@@ -10,4 +10,8 @@ config() {
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/foomatic/filter.conf.new
+
+# Process all .new config files:
+for file in etc/ImageMagick*/*.new ; do
+ config $file
+done
diff --git a/source/xap/imagemagick/imagemagick.SlackBuild b/source/xap/imagemagick/imagemagick.SlackBuild
index aca05857d..49797da04 100755
--- a/source/xap/imagemagick/imagemagick.SlackBuild
+++ b/source/xap/imagemagick/imagemagick.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,20 +28,21 @@ BUILD=${BUILD:-1}
# This is a bit messy, so we'll explain it well. :-)
-# This is the base version number, which is needed to cd into the source tree
-BASEVER=6.8.6-10
-
# This is the version number used in the source tarball filename
-FILEVER=6.8.6-10
+FILEVER=6.9.4-9
+
+# This is the base version number, which is needed to cd into the source tree.
+# Normally this is the same as $FILEVER, but allow setting it here if needed.
+BASEVER=$FILEVER
# This is the version number used in the package, where a version number cannot
-# contain a '-'
-PKGVER=6.8.6_10
+# contain a '-'. We'll try to autogenerate this one.
+PKGVER=$(echo $FILEVER | tr - _)
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -50,8 +51,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -79,9 +80,12 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf ImageMagick-$BASEVER
-tar xvf $CWD/ImageMagick-$FILEVER.tar.?z* || exit 1
+tar xvf $CWD/ImageMagick-$FILEVER.tar.xz || exit 1
cd ImageMagick-$BASEVER || exit 1
+# Harden the default settings in policy.xml to prevent security issues:
+zcat $CWD/policy.xml.diff.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -109,6 +113,7 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-openmp \
--enable-static=no \
--enable-shared \
+ --with-gcc-arch=$ARCH \
--with-perl \
--with-rsvg \
--build=$ARCH-slackware-linux || exit 1
@@ -153,7 +158,27 @@ rmdir $PKG/usr/share/man
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-gzip -9 $PKG/usr/man/man?/*.?
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1 | grep -v '\.gz$') ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Move config files to .new:
+( cd $PKG/etc/ImageMagick*
+ for file in * ; do
+ mv ${file} ${file}.new
+ done
+)
mkdir -p $PKG/usr
mv $PKG/usr/share/doc $PKG/usr
@@ -164,12 +189,13 @@ cp -a \
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ DOCSDIR=$(echo $PKG/usr/doc/ImageMagick-*)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
diff --git a/source/xap/imagemagick/policy.xml.diff b/source/xap/imagemagick/policy.xml.diff
new file mode 100644
index 000000000..dc033c1cb
--- /dev/null
+++ b/source/xap/imagemagick/policy.xml.diff
@@ -0,0 +1,33 @@
+--- ./config/policy.xml.orig 2016-06-10 07:19:41.000000000 -0500
++++ ./config/policy.xml 2016-06-17 17:30:47.311584022 -0500
+@@ -49,6 +49,21 @@
+ exceeds policy maximum so memory limit is 1GB).
+ -->
+ <policymap>
++ <policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
++ <!-- SECURITY: disable potentially insecure coders: -->
++ <policy domain="coder" rights="none" pattern="EPHEMERAL" />
++ <policy domain="coder" rights="none" pattern="HTTPS" />
++ <policy domain="coder" rights="none" pattern="MVG" />
++ <policy domain="coder" rights="none" pattern="MSL" />
++ <policy domain="coder" rights="none" pattern="TEXT" />
++ <policy domain="coder" rights="none" pattern="SHOW" />
++ <policy domain="coder" rights="none" pattern="WIN" />
++ <policy domain="coder" rights="none" pattern="PLT" />
++ <!-- SECURITY: prevent indirect reads: -->
++ <policy domain="path" rights="none" pattern="@*" />
++ <!-- SECURITY: prevent pipe to shell: -->
++ <policy domain="path" rights="none" pattern="|*" />
++ <!-- Some examples: -->
+ <!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
+ <!-- <policy domain="resource" name="memory" value="2GiB"/> -->
+ <!-- <policy domain="resource" name="map" value="4GiB"/> -->
+@@ -61,8 +76,4 @@
+ <!-- <policy domain="resource" name="throttle" value="0"/> -->
+ <!-- <policy domain="resource" name="time" value="3600"/> -->
+ <!-- <policy domain="system" name="precision" value="6"/> -->
+- <!-- <policy domain="coder" rights="none" pattern="MVG" /> -->
+- <!-- <policy domain="delegate" rights="none" pattern="HTTPS" /> -->
+- <!-- <policy domain="path" rights="none" pattern="@*"/> -->
+- <policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
+ </policymap>
diff --git a/source/xap/mozilla-firefox/gold/gold b/source/xap/mozilla-firefox/gold/gold
new file mode 100755
index 000000000..8c86d3b06
--- /dev/null
+++ b/source/xap/mozilla-firefox/gold/gold
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/ld.gold "$@"
diff --git a/source/xap/mozilla-firefox/gold/ld b/source/xap/mozilla-firefox/gold/ld
new file mode 120000
index 000000000..78a06a2a1
--- /dev/null
+++ b/source/xap/mozilla-firefox/gold/ld
@@ -0,0 +1 @@
+gold \ No newline at end of file
diff --git a/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild b/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild
index 78f826750..a09c1bb7f 100755
--- a/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild
+++ b/source/xap/mozilla-firefox/mozilla-firefox.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,13 +23,8 @@
# Thanks to the folks at the Mozilla Foundation for permission to
# distribute this, and for all the great work! :-)
-VERSION=$(basename $(ls firefox-*.tar.bz2 | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
-RELEASEVER=$(echo $VERSION | cut -f 1 -d r | cut -f 1 -d b)
-# With esr releases we need to fix this
-if [ "${RELEASEVER}r" = "$VERSION" ]; then
- RELEASEVER=$(echo $RELEASEVER | cut -f 1 -d e)
- RELEASEVERMAJ=$(echo $RELEASEVER | cut -f 1 -d .)
-fi
+VERSION=$(basename $(ls firefox-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
+RELEASEVER=$(echo $VERSION | cut -f 1 -d r | cut -f 1 -d b | cut -f 1 -d e)
BUILD=${BUILD:-1}
# Specify this variable for a localized build.
@@ -43,7 +38,7 @@ MOZLOCALIZE=${MOZLOCALIZE:-}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -77,40 +72,55 @@ fi
# PGO is disabled by default:
PGO=${PGO:-no}
-# Try to be gentle to the compiler, no optimizations:
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS=""
LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+ # On IA32, use gold since GNU ld runs out of memory linking libxul.so:
+ PATH="$(pwd)/gold:$PATH"
+ export CC="gcc -B$(pwd)/gold"
+ export CXX="g++ -B$(pwd)/gold"
elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O"
+ SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O -fPIC"
+ SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+ OPTIMIZE=" --enable-optimize=-O2 "
elif [ "$ARCH" = "arm" ]; then
SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
elif [ "$ARCH" = "armel" ]; then
SLKCFLAGS="-O2 -march=armv4t"
LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+fi
+
+# Workaround to prevent unidentified crashes. Since this seems to be
+# fixed in recent betas, only use the fix for known crashing versions:
+if [ $VERSION = 43.0 \
+ -o $VERSION = 43.0.1 \
+ -o $VERSION = 43.0.2 \
+ -o $VERSION = 43.0.3 \
+ -o $VERSION = 43.0.4 ]; then
+ OPTIMIZE="$(echo "$OPTIMIZE" | sed 's/O2/Os/g')"
+ echo "Detected Firefox $VERSION... enabling crash workaround O2 -> Os."
+ sleep 1
fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-mozilla-firefox
-# If not specified, figure out if this is a beta, an esr
-# or a release (we start assuming this last):
+# If not specified, figure out if this is a beta or a release
MOZVERS=${MOZVERS:-release}
-if echo $VERSION | grep -q b ; then # we think it is a beta
- if bzgrep -q ^mozilla-beta/ $CWD/firefox-$VERSION.source.tar.bz2 ; then
- MOZVERS=beta
- fi
-elif echo $VERSION | grep -q esr ; then # we think it is an esr
- if bzgrep -q ^mozilla-esr$RELEASEVERMAJ/ $CWD/firefox-$VERSION.source.tar.bz2 ; then
- MOZVERS=esr$RELEASEVERMAJ
- fi
-fi
+if echo $VERSION | grep -q b ; then MOZVERS=beta ; fi
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -118,30 +128,26 @@ rm -rf $PKG
mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}
cd $TMP
-rm -rf mozilla-$MOZVERS
-tar xvf $CWD/firefox-$VERSION.source.tar.bz2 || exit 1
-cd mozilla-$MOZVERS || exit 1
+rm -rf firefox-$VERSION
+# Unpack this in a subdirectory to prevent changing permissions on /tmp:
+rm -rf firefox-unpack
+mkdir firefox-unpack
+cd firefox-unpack
+tar xvf $CWD/firefox-$VERSION.source.tar.?z* || exit 1
+mv * ..
+cd ..
+rm -rf firefox-unpack
+cd firefox-$VERSION || exit 1
# Fetch localization, if requested:
if [ ! -z $MOZLOCALIZE ]; then
LOC_TAG="FIREFOX_$( echo $VERSION | tr \. _ )_RELEASE"
rm -f $LOC_TAG.tar.bz2
- if echo $MOZVERS | grep -q esr ; then LOC_VERS=release ; else LOC_VERS=$MOZVERS ; fi
- wget https://hg.mozilla.org/releases/l10n/mozilla-$LOC_VERS/$MOZLOCALIZE/archive/$LOC_TAG.tar.bz2
+ wget https://hg.mozilla.org/releases/l10n/mozilla-$MOZVERS/$MOZLOCALIZE/archive/$LOC_TAG.tar.bz2
tar xvf $LOC_TAG.tar.bz2
mv $MOZLOCALIZE-$LOC_TAG $MOZLOCALIZE
fi
-# Fix a long standing bug that's prevented staying current on GTK+.
-# Thanks to the BLFS folks. :-)
-cat << EOF >> layout/build/Makefile.in
-
-ifdef MOZ_ENABLE_CANVAS
-EXTRA_DSO_LDOPTS += \$(XLDFLAGS) -lX11 -lXrender
-endif
-
-EOF
-
# Patch mimeTypes.rdf
# Uncomment this if you want to use the patch; otherwise, we overwrite the
# mimeTypes.rdf inside the package directory later
@@ -154,15 +160,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-if gcc --version | grep -q "gcc (GCC) 4.7.0" ; then
- # Enable compiling with gcc-4.7.0:
- sed -i '/fcntl.h/a#include <unistd.h>' \
- ipc/chromium/src/base/{file_util_linux,message_pump_libevent,process_util_posix}.cc &&
- sed -i '/sys\/time\.h/a#include <unistd.h>' ipc/chromium/src/base/time_posix.cc &&
- sed -i 's#\"PRIxPTR#\" PRIxPTR#' layout/base/tests/TestPoisonArea.cpp &&
- sed -i 's# ""##' browser/base/Makefile.in
-fi
-
# Our building options, in a configure-like display ;)
OPTIONS="\
--enable-official-branding \
@@ -174,37 +171,39 @@ OPTIONS="\
--enable-default-toolkit=cairo-gtk2 \
--enable-startup-notification \
--enable-crypto \
+ --enable-gstreamer=1.0 \
--enable-svg \
--enable-canvas \
--enable-logging \
--enable-xft \
--enable-webm \
- --enable-xinerama \
- --enable-optimize \
+ $OPTIMIZE \
--enable-reorder \
--enable-strip \
--enable-cpp-rtti \
- --enable-single-profile \
--disable-gnomevfs \
- --disable-ldap \
--disable-accessibility \
--disable-crashreporter \
--disable-debug \
--disable-pedantic \
- --disable-installer \
- --disable-mailnews \
- --disable-composer \
- --disable-profilesharing"
+ --disable-installer"
# Complains about missing APNG support in Slackware's libpng:
# --with-system-png \
# This option breaks mozilla-12.0:
# --enable-system-cairo \
+# NOTE: It probably reduces bugs to use the bundled library versions,
+# so in general we will not --enable-system-libraries.
+# But since system zlib has been used for a long time and isn't a moving
+# target, we'll leave that one as-is.
if [ ! -z $MOZLOCALIZE ]; then
OPTIONS=$OPTIONS" \
--enable-ui-locale=$MOZLOCALIZE
--with-l10n-base=.."
- # There's no dictionaries in localized builds
- sed -i "/@BINPATH@\/dictionaries\/\*/d" browser/installer/package-manifest.in || exit 1
+ # There are no dictionaries in localized builds
+ sed -i \
+ -e "/@BINPATH@\/dictionaries\/\*/d" \
+ -e "/@RESPATH@\/dictionaries\/\*/d" \
+ browser/installer/package-manifest.in || exit 1
fi
export MOZILLA_OFFICIAL="1"
@@ -226,7 +225,7 @@ echo ". \$topsrcdir/browser/config/mozconfig" > .mozconfig
# Mozilla devs enforce using an objdir for building
# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
mkdir obj
-echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj" >> .mozconfig
+echo "mk_add_options MOZ_OBJDIR=$(pwd)/obj" >> .mozconfig
if [ "$MOZLOCALIZE" ]; then
echo "mk_add_options MOZ_CO_LOCALES=\"$MOZLOCALIZE\"" >> .mozconfig
diff --git a/source/xap/mozilla-thunderbird/gold/gold b/source/xap/mozilla-thunderbird/gold/gold
new file mode 100755
index 000000000..8c86d3b06
--- /dev/null
+++ b/source/xap/mozilla-thunderbird/gold/gold
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/ld.gold "$@"
diff --git a/source/xap/mozilla-thunderbird/gold/ld b/source/xap/mozilla-thunderbird/gold/ld
new file mode 120000
index 000000000..78a06a2a1
--- /dev/null
+++ b/source/xap/mozilla-thunderbird/gold/ld
@@ -0,0 +1 @@
+gold \ No newline at end of file
diff --git a/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild b/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
index 24f58d6bf..d26fefedc 100755
--- a/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
+++ b/source/xap/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,84 +25,73 @@
# Thanks to the folks at the Mozilla Foundation for permission to
# distribute this, and for all the great work! :-)
-TARBALLVER=$(basename $(ls thunderbird-*.tar.bz2 | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
-# Strip the end from beta versions:
-VERSION=$(echo $TARBALLVER | cut -f 1 -d b)
-MAJORVER=$(echo $TARBALLVER | cut -f 1 -d .)
+VERSION=$(basename $(ls thunderbird-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
+RELEASEVER=$(echo $VERSION | cut -f 1 -d e | cut -f 1 -d b)
BUILD=${BUILD:-1}
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-mozilla-thunderbird
-
-# Figure out if this is a beta, or a release:
-if echo $TARBALLVER | grep -q b ; then # we think it is a beta
- if bzgrep -q comm-beta/ $CWD/thunderbird-$TARBALLVER.source.tar.bz2 ; then
- MOZVERS=${MOZVERS:-beta}
- else # blindly assume it is a release
- MOZVERS=${MOZVERS:-release}
- fi
-else # release, no "b" in the tarball version:
- if bzgrep -q comm-esr${MAJORVER}/ $CWD/thunderbird-$TARBALLVER.source.tar.bz2 ; then
- # Looks like we get this sometimes even when the tarball isn't labeled as esr...
- MOZVERS=${MOZVERS:-esr${MAJORVER}}
- else
- MOZVERS=${MOZVERS:-release}
- fi
-fi
+# Specify this variable for a localized build.
+# For example, to build a version of Thunderbird with Italian support, run
+# the build script like this:
+#
+# MOZLOCALIZE=it ./mozilla-firefox.SlackBuild
+#
+MOZLOCALIZE=${MOZLOCALIZE:-}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ armv7hl) export ARCH=armv7hl ;;
+ arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) export ARCH=$( uname -m ) ;;
esac
fi
-# Try to be gentle to the compiler, no optimizations:
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O"
+if [ "$ARCH" = "i586" ]; then
LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+ # On IA32, use gold since GNU ld runs out of memory linking libxul.so:
+ PATH="$(pwd)/gold:$PATH"
+ export CC="gcc -B$(pwd)/gold"
+ export CXX="g++ -B$(pwd)/gold"
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O -fPIC"
LIBDIRSUFFIX="64"
-elif [ "$ARCH" = "arm" ]; then
- SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "armel" ]; then
- SLKCFLAGS="-O2 -march=armv4t"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ OPTIMIZE=" --enable-optimize=-O2 "
+else
LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
fi
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mozilla-thunderbird
+
NUMJOBS=${NUMJOBS:-" -j7 "}
rm -rf $PKG
mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}
cd $TMP
-rm -rf comm-$MOZVERS
-tar xvf $CWD/thunderbird-$TARBALLVER.source.tar.bz2 || exit 1
-cd comm-$MOZVERS || exit 1
-
-# Fix a long standing bug that's prevented staying current on GTK+.
-# Thanks to the BLFS folks. :-)
-cat << EOF >> mozilla/layout/build/Makefile.in
-
-ifdef MOZ_ENABLE_CANVAS
-EXTRA_DSO_LDOPTS += \$(XLDFLAGS) -lX11 -lXrender
-endif
-
-EOF
+rm -rf thunderbird-$VERSION
+# Unpack this in a subdirectory to prevent changing permissions on /tmp:
+rm -rf thunderbird-unpack
+mkdir thunderbird-unpack
+cd thunderbird-unpack
+tar xvf $CWD/thunderbird-$VERSION.source.tar.?z* || exit 1
+mv * ..
+cd ..
+rm -rf thunderbird-unpack
+cd thunderbird-$VERSION || exit 1
+
+# Fetch localization, if requested:
+if [ ! -z $MOZLOCALIZE ]; then
+ LOC_TAG="THUNDERBIRD_$( echo $VERSION | tr \. _ )_RELEASE"
+ rm -f $LOC_TAG.tar.bz2
+ wget https://hg.mozilla.org/releases/l10n/mozilla-release/$MOZLOCALIZE/archive/$LOC_TAG.tar.bz2
+ tar xvf $LOC_TAG.tar.bz2
+ mv $MOZLOCALIZE-$LOC_TAG $MOZLOCALIZE
+fi
# Arch-dependent patches:
case "$ARCH" in
@@ -121,44 +110,15 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-if gcc --version | grep -q "gcc (GCC) 4.7.0" ; then
- # Enable compiling with gcc-4.7.0:
- sed -i '/fcntl.h/a#include <unistd.h>' \
- mozilla/ipc/chromium/src/base/{file_util_linux,message_pump_libevent,process_util_posix}.cc &&
- sed -i '/sys\/time\.h/a#include <unistd.h>' mozilla/ipc/chromium/src/base/time_posix.cc &&
- sed -i 's#\"PRIxPTR#\" PRIxPTR#g' mozilla/layout/base/tests/TestPoisonArea.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/base/search/src/nsMsgSearchAdapter.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/base/src/nsMsgFolderCompactor.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/compose/src/nsSmtpProtocol.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/imap/src/nsImapMailFolder.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/imap/src/nsImapProtocol.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/imap/src/nsImapServerResponseParser.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/local/src/nsPop3Protocol.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/mime/src/mimedrft.cpp &&
- sed -i 's#\"MSG_LINEBREAK#\" MSG_LINEBREAK#g' mailnews/mime/src/mimemult.cpp &&
- sed -i 's#\"MSG_LINEBREAK#\" MSG_LINEBREAK#g' mailnews/base/src/nsMsgFolderCompactor.cpp &&
- sed -i 's# ""##' mozilla/browser/base/Makefile.in
-fi
-
-# Mozilla devs enforce using an objdir for building
-# and launching configure with the absolute path
-# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
-mkdir obj
-cd obj
-export MOZILLA_DIR=$TMP/comm-$MOZVERS/mozilla &&
-export MOZILLA_OFFICIAL="1" &&
-export BUILD_OFFICIAL="1" &&
-export MOZ_PHOENIX="1" &&
-export CFLAGS="$SLKCFLAGS" &&
-export CXXFLAGS="$SLKCFLAGS" &&
-export MOZ_MAKE_FLAGS="$NUMJOBS" &&
-$TMP/comm-$MOZVERS/configure \
+# Our building options, in a configure-like display ;)
+OPTIONS="\
--enable-official-branding \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION \
--with-system-zlib \
--enable-application=mail \
+ --enable-calendar \
--enable-default-toolkit=cairo-gtk2 \
--enable-startup-notification \
--enable-crypto \
@@ -167,34 +127,60 @@ $TMP/comm-$MOZVERS/configure \
--enable-svg \
--enable-canvas \
--enable-xft \
- --enable-xinerama \
- --enable-optimize \
+ $OPTIMIZE \
--enable-reorder \
--enable-strip \
--enable-cpp-rtti \
- --enable-single-profile \
--disable-accessibility \
--disable-crashreporter \
--disable-debug \
--disable-tests \
- --disable-logging \
--disable-pedantic \
- --disable-installer \
- --disable-profilesharing
+ --host=$ARCH-slackware-linux \
+ --target=$ARCH-slackware-linux \
+ --build=$ARCH-slackware-linux"
# Complains about missing APNG support in Slackware's libpng:
#--with-system-png \
# Broken with 12.0:
#--enable-system-cairo \
+if [ ! -z $MOZLOCALIZE ]; then
+ OPTIONS=$OPTIONS" \
+ --enable-ui-locale=$MOZLOCALIZE
+ --with-l10n-base=.."
+ # There are no dictionaries in localized builds
+ sed -i \
+ -e "/@BINPATH@\/dictionaries\/\*/d" \
+ -e "/@RESPATH@\/dictionaries\/\*/d" \
+ mail/installer/package-manifest.in || exit 1
+fi
-#make -f client.mk build MOZ_MAKE_FLAGS="$NUMJOBS" || exit 1
-make $NUMJOBS || exit 1
-make install DESTDIR=$PKG || exit 1
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+export MOZ_PHOENIX=1
+export MOZ_MAKE_FLAGS="$NUMJOBS"
-# Exit obj directory:
-cd ..
+# Clear some variables that could break the build
+unset DBUS_SESSION_BUS_ADDRESS ORBIT_SOCKETDIR SESSION_MANAGER \
+ XDG_SESSION_COOKIE XAUTHORITY MAKEFLAGS
+
+# Assemble our .mozconfig:
+echo > .mozconfig
+
+# Mozilla devs enforce using an objdir for building
+# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
+mkdir obj
+echo "mk_add_options MOZ_OBJDIR=$(pwd)/obj" >> .mozconfig
+# This directory is also needed or the build will fail:
+mkdir -p mozilla/obj
+
+# Write in it the options above
+for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
+
+make -f client.mk build || exit 1
+make -f client.mk install DESTDIR=$PKG || exit 1
# We don't need these (just symlinks anyway):
-rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-devel-$VERSION
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-devel-$RELEASEVER
# Nor these:
rm -rf $PKG/usr/include
@@ -212,10 +198,10 @@ cat $CWD/mozilla-thunderbird.desktop > $PKG/usr/share/applications/mozilla-thund
mkdir -p $PKG/usr/share/pixmaps
cat $CWD/thunderbird.png > $PKG/usr/share/pixmaps/thunderbird.png
-# These files/directories are usually created if Firefox is run as root,
+# These files/directories are usually created if Thunderbird is run as root,
# which on many systems might (and possibly should) be never. Therefore, if we
# don't see them we'll put stubs in place to prevent startup errors.
-( cd $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$RELEASEVER
if [ -d extensions/talkback\@mozilla.org ]; then
if [ ! -r extensions/talkback\@mozilla.org/chrome.manifest ]; then
echo > extensions/talkback\@mozilla.org/chrome.manifest
@@ -227,21 +213,27 @@ cat $CWD/thunderbird.png > $PKG/usr/share/pixmaps/thunderbird.png
)
# Need some default icons in the right place:
-mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION/chrome/icons/default
-install -m 644 other-licenses/branding/thunderbird/default16.png \
- $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION/icons/
-install -m 644 other-licenses/branding/thunderbird/default16.png \
- $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION/chrome/icons/default/
-( cd $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION
- install -m 644 icons/{default,mozicon50}.xpm chrome/icons/default/
-)
+for i in 16 22 24 32 48 256; do
+ install -m 0644 -D other-licenses/branding/thunderbird/mailicon${i}.png \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/thunderbird.png
+done
+mkdir -p $PKG/usr/share/pixmaps
+( cd $PKG/usr/share/pixmaps ; ln -sf /usr/share/icons/hicolor/256x256/apps/thunderbird . )
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/thunderbird-$RELEASEVER/chrome/icons/default
+install -m 644 other-licenses/branding/thunderbird/mailicon16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/thunderbird-$RELEASEVER/icons/
+install -m 644 other-licenses/branding/thunderbird/mailicon16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/thunderbird-$RELEASEVER/chrome/icons/default/
# Copy over the LICENSE
-install -p -c -m 644 LICENSE $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION/
+install -p -c -m 644 LICENSE $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$RELEASEVER/
mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/mozilla-thunderbird-$TARBALLVER-$ARCH-$BUILD.txz
-
+if [ -z $MOZLOCALIZE ]; then
+ /sbin/makepkg -l y -c n $TMP/mozilla-thunderbird-$VERSION-$ARCH-$BUILD.txz
+else
+ /sbin/makepkg -l y -c n $TMP/mozilla-thunderbird-$VERSION-$ARCH-${BUILD}_$MOZLOCALIZE.txz
+fi
diff --git a/source/xap/network-manager-applet/network-manager-applet.SlackBuild b/source/xap/network-manager-applet/network-manager-applet.SlackBuild
index 5eb17a861..8257aadaa 100755
--- a/source/xap/network-manager-applet/network-manager-applet.SlackBuild
+++ b/source/xap/network-manager-applet/network-manager-applet.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for network-manager-applet
-# Copyright 2010, 2011 Robby Workman, Northport, Alabama, USA
+# Copyright 2010, 2011, 2014 Robby Workman, Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,7 +28,7 @@ BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +40,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -67,9 +67,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-sed -i 's/GtkBox/GtkHBox/g' src/connection-editor/ce-page-general.ui
-sed -i 's/GtkBox/GtkVBox/g' src/connection-editor/nm-connection-editor.ui
-
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -79,9 +76,9 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
- --with-gtkver=2 \
--disable-static \
--enable-more-warnings=no \
+ --with-modem-manager-1 \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
diff --git a/source/xap/pan/pan.SlackBuild b/source/xap/pan/pan.SlackBuild
index ab8915918..540bdb7e3 100755
--- a/source/xap/pan/pan.SlackBuild
+++ b/source/xap/pan/pan.SlackBuild
@@ -23,12 +23,12 @@
PKGNAM=pan
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/source/xap/pavucontrol/doinst.sh b/source/xap/pavucontrol/doinst.sh
new file mode 100644
index 000000000..5fb28930d
--- /dev/null
+++ b/source/xap/pavucontrol/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
diff --git a/source/xap/pavucontrol/pavucontrol.SlackBuild b/source/xap/pavucontrol/pavucontrol.SlackBuild
new file mode 100755
index 000000000..59a49d8c2
--- /dev/null
+++ b/source/xap/pavucontrol/pavucontrol.SlackBuild
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# Copyright 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=pavucontrol
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+zcat $CWD/replace-gtk-stock-lock-icon.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -std=c++11" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a COPYING* doc/README* LICENSE $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/xap/pavucontrol/replace-gtk-stock-lock-icon.diff b/source/xap/pavucontrol/replace-gtk-stock-lock-icon.diff
new file mode 100644
index 000000000..cd8df10d1
--- /dev/null
+++ b/source/xap/pavucontrol/replace-gtk-stock-lock-icon.diff
@@ -0,0 +1,21 @@
+diff -Nur pavucontrol-3.0.orig/src/pavucontrol.glade pavucontrol-3.0/src/pavucontrol.glade
+--- pavucontrol-3.0.orig/src/pavucontrol.glade 2015-03-24 09:39:00.000000000 -0500
++++ pavucontrol-3.0/src/pavucontrol.glade 2016-01-04 22:40:15.553206280 -0600
+@@ -312,7 +312,7 @@
+ <object class="GtkImage" id="image18">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+- <property name="icon_name">stock_lock</property>
++ <property name="icon_name">security-medium</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
+@@ -1474,7 +1474,7 @@
+ <object class="GtkImage" id="image18">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+- <property name="icon_name">stock_lock</property>
++ <property name="icon_name">security-medium</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
diff --git a/source/xap/pavucontrol/slack-desc b/source/xap/pavucontrol/slack-desc
new file mode 100644
index 000000000..86f8f5d77
--- /dev/null
+++ b/source/xap/pavucontrol/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+pavucontrol: pavucontrol (PulseAudio Volume Controller)
+pavucontrol:
+pavucontrol: It is a simple GTK based volume control tool("mixer") for
+pavucontrol: PulseAudio sound server. In contrast to classic mixer tools, this one
+pavucontrol: allows you to control both the volume of hardware devices and of
+pavucontrol: each playback stream separately.
+pavucontrol:
+pavucontrol: Website: http://0pointer.de/lennart/projects/pavucontrol/
+pavucontrol:
+pavucontrol:
+pavucontrol:
diff --git a/source/xap/pidgin/doinst.sh b/source/xap/pidgin/doinst.sh
new file mode 100644
index 000000000..1f8ff67de
--- /dev/null
+++ b/source/xap/pidgin/doinst.sh
@@ -0,0 +1,10 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
diff --git a/source/xap/pidgin/link-libirc-to-libsasl2.patch b/source/xap/pidgin/link-libirc-to-libsasl2.patch
deleted file mode 100644
index 2858ac994..000000000
--- a/source/xap/pidgin/link-libirc-to-libsasl2.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- ./libpurple/protocols/irc/Makefile.am.orig 2013-02-11 03:16:52.000000000 -0600
-+++ ./libpurple/protocols/irc/Makefile.am 2013-02-15 15:18:32.950591016 -0600
-@@ -27,7 +27,7 @@
- st =
- pkg_LTLIBRARIES = libirc.la
- libirc_la_SOURCES = $(IRCSOURCES)
--libirc_la_LIBADD = $(GLIB_LIBS)
-+libirc_la_LIBADD = $(GLIB_LIBS) $(SASL_LIBS)
-
- endif
-
---- ./libpurple/protocols/irc/Makefile.in.orig 2013-02-11 03:17:20.000000000 -0600
-+++ ./libpurple/protocols/irc/Makefile.in 2013-02-15 15:18:43.256590687 -0600
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.11.6 from Makefile.am.
-+# Makefile.in generated by automake 1.11.5 from Makefile.am.
- # @configure_input@
-
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -92,7 +92,8 @@
- am__installdirs = "$(DESTDIR)$(pkgdir)"
- LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES)
- am__DEPENDENCIES_1 =
--@STATIC_IRC_FALSE@libirc_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-+@STATIC_IRC_FALSE@libirc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-+@STATIC_IRC_FALSE@ $(am__DEPENDENCIES_1)
- am__libirc_la_SOURCES_DIST = cmds.c dcc_send.c irc.c irc.h msgs.c \
- parse.c
- am__objects_1 = libirc_la-cmds.lo libirc_la-dcc_send.lo \
-@@ -415,7 +416,7 @@
- @STATIC_IRC_TRUE@libirc_la_SOURCES = $(IRCSOURCES)
- @STATIC_IRC_TRUE@libirc_la_CFLAGS = $(AM_CFLAGS)
- @STATIC_IRC_FALSE@pkg_LTLIBRARIES = libirc.la
--@STATIC_IRC_FALSE@libirc_la_LIBADD = $(GLIB_LIBS)
-+@STATIC_IRC_FALSE@libirc_la_LIBADD = $(GLIB_LIBS) $(SASL_LIBS)
- AM_CPPFLAGS = \
- -I$(top_srcdir)/libpurple \
- -I$(top_builddir)/libpurple \
---- ./libpurple/protocols/irc/Makefile.orig 2013-02-15 15:16:32.812594857 -0600
-+++ ./libpurple/protocols/irc/Makefile 2013-02-15 15:18:53.684590354 -0600
-@@ -1,4 +1,4 @@
--# Makefile.in generated by automake 1.11.6 from Makefile.am.
-+# Makefile.in generated by automake 1.11.5 from Makefile.am.
- # libpurple/protocols/irc/Makefile. Generated from Makefile.in by configure.
-
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@@ -92,7 +92,8 @@
- am__installdirs = "$(DESTDIR)$(pkgdir)"
- LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES)
- am__DEPENDENCIES_1 =
--libirc_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-+libirc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-+ $(am__DEPENDENCIES_1)
- am__libirc_la_SOURCES_DIST = cmds.c dcc_send.c irc.c irc.h msgs.c \
- parse.c
- am__objects_1 = libirc_la-cmds.lo libirc_la-dcc_send.lo \
-@@ -415,7 +416,7 @@
- #libirc_la_SOURCES = $(IRCSOURCES)
- #libirc_la_CFLAGS = $(AM_CFLAGS)
- pkg_LTLIBRARIES = libirc.la
--libirc_la_LIBADD = $(GLIB_LIBS)
-+libirc_la_LIBADD = $(GLIB_LIBS) $(SASL_LIBS)
- AM_CPPFLAGS = \
- -I$(top_srcdir)/libpurple \
- -I$(top_builddir)/libpurple \
diff --git a/source/xap/pidgin/pidgin.SlackBuild b/source/xap/pidgin/pidgin.SlackBuild
index cf28811be..106bfc734 100755
--- a/source/xap/pidgin/pidgin.SlackBuild
+++ b/source/xap/pidgin/pidgin.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,12 +24,12 @@
PKGNAM=pidgin
VERSION=${VERSION:-$(echo $PKGNAM-2.*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
PIDGINENC=${PIDGINENC:-3.1}
-BUILD=${BUILD:-5}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -44,8 +44,8 @@ PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
mkdir -p $TMP $PKG
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
ARCHQUADLET=""
elif [ "$ARCH" = "s390" ]; then
@@ -79,6 +79,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+#autoreconf --force --install
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -95,6 +97,7 @@ CXXFLAGS="$SLKCFLAGS" \
--with-nss-libs=/usr/lib${LIBDIRSUFFIX}/ \
--with-nspr-includes="$(pkg-config --variable=includedir nspr)" \
--with-nspr-libs=/usr/lib${LIBDIRSUFFIX}/ \
+ --with-system-ssl-certs=/etc/ssl/certs \
--disable-vv \
--enable-gtkspell \
--enable-cyrus-sasl \
@@ -102,12 +105,11 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-meanwhile \
--disable-avahi \
--disable-nm \
+ --with-gstreamer=1.0 \
--program-prefix= \
--program-suffix= \
--build=$ARCH-slackware-linux$ARCHQUADLET || exit 1
-zcat $CWD/link-libirc-to-libsasl2.patch.gz | patch -p1 --verbose || exit 1
-
# Fix install location:
grep -lr -- "lib/perl" . | xargs sed -i 's?lib/perl?lib'"$LIBDIRSUFFIX"'/perl?g'
@@ -154,7 +156,7 @@ find $PKG -name .packlist | while read plist ; do
mv -f ${plist}.new ${plist}
done
-### add gaim-encryption
+### add pidgin-encryption
( cd $TMP
rm -rf pidgin-encryption-$PIDGINENC
tar xvf $CWD/pidgin-encryption-$PIDGINENC.tar.gz || exit 1
@@ -182,7 +184,7 @@ done
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
) || exit 1
-### end add gaim-encryption
+### end add pidgin-encryption
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
@@ -222,6 +224,7 @@ cp -a \
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/xap/rdesktop/rdesktop-1.8.0-fix-missing-ui.diff b/source/xap/rdesktop/rdesktop-1.8.0-fix-missing-ui.diff
deleted file mode 100644
index efad2f335..000000000
--- a/source/xap/rdesktop/rdesktop-1.8.0-fix-missing-ui.diff
+++ /dev/null
@@ -1,77 +0,0 @@
-From 8aeb027877c517510ea39c26c37c6dbd46401800 Mon Sep 17 00:00:00 2001
-From: mancha <mancha1@hush.com>
-Date: Sun, 20 Oct 2013
-Subject: Fix crash with -P and/or -N
-
-Make sure that ui is created if processing demand active PDU.
-
-Relevant upstream revisions:
-----------------------------
-http://sourceforge.net/p/rdesktop/code/1731/
-http://sourceforge.net/p/rdesktop/code/1732/
-http://sourceforge.net/p/rdesktop/code/1741/
-
----
- proto.h | 1 +
- rdesktop.c | 20 +++++++++++++-------
- rdp.c | 3 +++
- 3 files changed, 17 insertions(+), 7 deletions(-)
-
---- a/proto.h 2013-06-20
-+++ b/proto.h 2013-10-20
-@@ -144,6 +144,7 @@ RD_BOOL subprocess(char *const argv[], s
- char *l_to_a(long N, int base);
- int load_licence(unsigned char **data);
- void save_licence(unsigned char *data, int length);
-+void rd_create_ui(void);
- RD_BOOL rd_pstcache_mkdir(void);
- int rd_open_file(char *filename);
- void rd_close_file(int fd);
---- a/rdesktop.c 2013-10-20
-+++ b/rdesktop.c 2013-10-20
-@@ -1132,13 +1132,7 @@ main(int argc, char *argv[])
- DEBUG(("Connection successful.\n"));
- memset(password, 0, sizeof(password));
-
-- /* only create a window if we dont have one intialized */
-- if (!ui_have_window())
-- {
-- if (!ui_create_window())
-- return EX_OSERR;
-- }
--
-+ rd_create_ui();
- tcp_run_ui(True);
-
- g_redirect = False;
-@@ -1732,6 +1726,18 @@ save_licence(unsigned char *data, int le
- close(fd);
- }
-
-+/* create rdesktop ui */
-+void
-+rd_create_ui()
-+{
-+ /* only create a window if we dont have one intialized */
-+ if (!ui_have_window())
-+ {
-+ if (!ui_create_window())
-+ exit(EX_OSERR);
-+ }
-+}
-+
- /* Create the bitmap cache directory */
- RD_BOOL
- rd_pstcache_mkdir(void)
---- a/rdp.c 2013-06-20
-+++ b/rdp.c 2013-10-20
-@@ -1044,6 +1044,9 @@ process_demand_active(STREAM s)
- uint8 type;
- uint16 len_src_descriptor, len_combined_caps;
-
-+ /* at this point we need to ensure that we have ui created */
-+ rd_create_ui();
-+
- in_uint32_le(s, g_rdp_shareid);
- in_uint16_le(s, len_src_descriptor);
- in_uint16_le(s, len_combined_caps);
diff --git a/source/xap/rdesktop/rdesktop.SlackBuild b/source/xap/rdesktop/rdesktop.SlackBuild
index e1687e782..068573ddf 100755
--- a/source/xap/rdesktop/rdesktop.SlackBuild
+++ b/source/xap/rdesktop/rdesktop.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2008, 2009, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2008, 2009, 2011, 2012, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
PKGNAM=rdesktop
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -59,8 +59,6 @@ rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}-$VERSION || exit 1
-zcat $CWD/rdesktop-1.8.0-fix-missing-ui.diff.gz | patch -p1 --verbose || exit 1
-
# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
diff --git a/source/xap/rxvt/rxvt.SlackBuild b/source/xap/rxvt/rxvt.SlackBuild
index defc62b59..6f72fd69b 100755
--- a/source/xap/rxvt/rxvt.SlackBuild
+++ b/source/xap/rxvt/rxvt.SlackBuild
@@ -29,7 +29,7 @@ BUILD=${BUILD:-4}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
diff --git a/source/xap/sane/sane.SlackBuild b/source/xap/sane/sane.SlackBuild
index 39b0dfa25..7a43a1a5c 100755
--- a/source/xap/sane/sane.SlackBuild
+++ b/source/xap/sane/sane.SlackBuild
@@ -20,15 +20,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=1.0.24
-BACKVER=1.0.24
+VERSION=1.0.25
+BACKVER=1.0.25
FRONTVER=1.0.14
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -37,8 +37,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/xap/seamonkey/gold/gold b/source/xap/seamonkey/gold/gold
new file mode 100755
index 000000000..8c86d3b06
--- /dev/null
+++ b/source/xap/seamonkey/gold/gold
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/ld.gold "$@"
diff --git a/source/xap/seamonkey/gold/ld b/source/xap/seamonkey/gold/ld
new file mode 120000
index 000000000..78a06a2a1
--- /dev/null
+++ b/source/xap/seamonkey/gold/ld
@@ -0,0 +1 @@
+gold \ No newline at end of file
diff --git a/source/xap/seamonkey/seamonkey.SlackBuild b/source/xap/seamonkey/seamonkey.SlackBuild
index fa0921e42..454122020 100755
--- a/source/xap/seamonkey/seamonkey.SlackBuild
+++ b/source/xap/seamonkey/seamonkey.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,29 +23,46 @@
TARBALLVER=${VERSION:-$(basename $(ls seamonkey-*.tar.* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)}
# Strip the end from beta versions:
VERSION=$(echo $TARBALLVER | cut -f 1 -d b)
-COMM=${COMM:-release}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
-if [ "$ARCH" = "x86_64" ]; then
+if [ "$ARCH" = "i586" ]; then
+ LIBDIRSUFFIX=""
+ OPTIMIZE_FLAG="-O2"
+ # On IA32, use gold since GNU ld runs out of memory linking libxul.so:
+ PATH="$(pwd)/gold:$PATH"
+ export CC="gcc -B$(pwd)/gold"
+ export CXX="g++ -B$(pwd)/gold"
+elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
OPTIMIZE_FLAG="-O2"
else
LIBDIRSUFFIX=""
- OPTIMIZE_FLAG="-Os"
+ OPTIMIZE_FLAG="-O2"
fi
NUMJOBS=${NUMJOBS:-" -j7 "}
+# Workaround to prevent unidentified crashes when compiling with recent gcc.
+# Presumably a newer version will fix this (as it did with Firefox), so only
+# enable the workaround for known crashing versions.
+# Test page to check for crash: http://onet.pl
+if [ $VERSION = 2.39 -o \
+ $VERSION = 2.40 ]; then
+ OPTIMIZE_FLAG="$(echo "$OPTIMIZE_FLAG" | sed 's/O2/Os/g')"
+ echo "Detected Seamonkey $VERSION... enabling crash workaround O2 -> Os."
+ sleep 1
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-seamonkey
@@ -53,9 +70,9 @@ rm -rf $PKG
mkdir -p $TMP $PKG/usr
cd $TMP
-rm -rf comm-$COMM
+rm -rf seamonkey-${TARBALLVER}
tar xvf $CWD/seamonkey-${TARBALLVER}.source.tar.?z* || exit 1
-cd comm-$COMM || exit 1
+cd seamonkey-${TARBALLVER} || exit 1
# Make sure the perms/ownerships are sane:
chown -R root:root .
@@ -65,44 +82,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fix a long standing bug that's prevented staying current on GTK+.
-# Thanks to the BLFS folks. :-)
-cat >> mozilla/layout/build/Makefile.in << EOF
-
-ifdef MOZ_ENABLE_CANVAS
-EXTRA_DSO_LDOPTS += \$(XLDFLAGS) -lX11 -lXrender
-endif
-
-EOF
-
-if gcc --version | grep -q "gcc (GCC) 4.7.0" ; then
- # Enable compiling with gcc-4.7.0:
- sed -i '/fcntl.h/a#include <unistd.h>' \
- mozilla/ipc/chromium/src/base/{file_util_linux,message_pump_libevent,process_util_posix}.cc &&
- sed -i '/sys\/time\.h/a#include <unistd.h>' mozilla/ipc/chromium/src/base/time_posix.cc &&
- sed -i 's#\"PRIxPTR#\" PRIxPTR#g' mozilla/layout/base/tests/TestPoisonArea.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/base/search/src/nsMsgSearchAdapter.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/base/src/nsMsgFolderCompactor.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/compose/src/nsSmtpProtocol.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/imap/src/nsImapMailFolder.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/imap/src/nsImapProtocol.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/imap/src/nsImapServerResponseParser.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/local/src/nsPop3Protocol.cpp &&
- sed -i 's#\"CRLF#\" CRLF#g' mailnews/mime/src/mimedrft.cpp &&
- sed -i 's#\"MSG_LINEBREAK#\" MSG_LINEBREAK#g' mailnews/mime/src/mimemult.cpp &&
- sed -i 's#\"MSG_LINEBREAK#\" MSG_LINEBREAK#g' mailnews/base/src/nsMsgFolderCompactor.cpp &&
- sed -i 's# ""##' mozilla/browser/base/Makefile.in
-fi
-
chown -R root:root .
-# Mozilla devs enforce using an objdir for building
-# and launching configure with the absolute path
-# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
-mkdir obj
-cd obj
-BUILD_OFFICIAL=1 MOZILLA_OFFICIAL=1 \
-$TMP/comm-$COMM/configure \
+# Our building options, in a configure-like display ;)
+OPTIONS="\
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--enable-optimize=$OPTIMIZE_FLAG \
@@ -116,6 +99,7 @@ $TMP/comm-$COMM/configure \
--disable-crashreporter \
--enable-svg \
--enable-canvas \
+ --enable-gstreamer=1.0 \
--disable-short-wchar \
--enable-nspr-autoconf \
--enable-extensions=default,irc \
@@ -129,12 +113,35 @@ $TMP/comm-$COMM/configure \
--enable-xft \
--host=$ARCH-slackware-linux \
--target=$ARCH-slackware-linux \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux"
# --enable-system-cairo \
# --with-system-png
-make $NUMJOBS || exit 1
-DESTDIR=$PKG make install || exit 1
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+export MOZ_MAKE_FLAGS="$NUMJOBS"
+
+# Clear some variables that could break the build
+unset DBUS_SESSION_BUS_ADDRESS ORBIT_SOCKETDIR SESSION_MANAGER \
+ XDG_SESSION_COOKIE XAUTHORITY MAKEFLAGS
+
+# Assemble our .mozconfig:
+echo > .mozconfig
+
+# Mozilla devs enforce using an objdir for building
+# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
+mkdir obj
+echo "mk_add_options MOZ_OBJDIR=$(pwd)/obj" >> .mozconfig
+# This directory is also needed or the build will fail:
+mkdir -p mozilla/obj
+
+# Write in it the options above
+for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
+
+echo "ac_add_options --disable-tests" >> .mozconfig
+make -f client.mk build || exit 1
+make -f client.mk install DESTDIR=$PKG || exit 1
# Install nspr/nss headers.
for includedir in nspr nspr/obsolete nspr/private ; do
@@ -157,9 +164,6 @@ cp -aL mozilla/dist/sdk/include/* $PKG/usr/include/seamonkey-${VERSION}
ln -sf . xpcom
)
-# Exit obj directory:
-cd ..
-
# We don't need this stuff in the package:
rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/seamonkey-devel-$VERSION
diff --git a/source/xap/seyon/seyon.SlackBuild b/source/xap/seyon/seyon.SlackBuild
index f2435b193..b040a3601 100755
--- a/source/xap/seyon/seyon.SlackBuild
+++ b/source/xap/seyon/seyon.SlackBuild
@@ -29,7 +29,7 @@ BUILD=${BUILD:-3}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
diff --git a/source/xap/windowmaker/windowmaker.SlackBuild b/source/xap/windowmaker/windowmaker.SlackBuild
index e1e8b2bb8..4a541b456 100755
--- a/source/xap/windowmaker/windowmaker.SlackBuild
+++ b/source/xap/windowmaker/windowmaker.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,22 +21,22 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION=${VERSION:-$(echo WindowMaker-0*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -68,13 +68,16 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix a segfault in wmmenugen.c:
+zcat $CWD/wmmenugen.c.diff.gz | patch -p1 --verbose || exit 1
+
# This should be non-interactive where possible.
zcat $CWD/wmaker.inst.diff.gz | patch -p1 --verbose || exit 1
# Get rid of OpenSUSE menu:
zcat $CWD/WindowMaker.noopensusemenu.diff.gz | patch -p1 --verbose || exit 1
-LINGUAS="$(cd po ; /bin/ls *.po | sed 's/.po//g')" \
+LINGUAS="$(ls po/*.po | sed 's:po/\(.*\)\.po$:\1:' | tr '\012' '\040')" \
GNUSTEP_LOCAL_ROOT=/usr/lib${LIBDIRSUFFIX}/GNUstep \
CFLAGS="$SLKCFLAGS" \
NLSDIR=/usr/share/locale \
@@ -85,13 +88,16 @@ NLSDIR=/usr/share/locale \
--sysconfdir=/etc/X11 \
--docdir=/usr/doc/WindowMaker-$VERSION \
--enable-usermenu \
- --enable-xrandr \
+ --enable-randr \
--enable-xinerama \
--disable-static \
- --build=$ARCH-slackware-linux
+ --disable-magick \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Disabling magick per this LQ thread:
+# http://www.linuxquestions.org/questions/showthread.php?p=5284319#post5284319
-# NLS bugs like -i
-make $NUMJOBS || make -i || exit 1
+make $NUMJOBS || make || exit 1
# Change /usr/local/GNUstep to /usr/lib/GNUstep in the WMRootMenu:
sed -i -e "s#/usr/local/GNUstep/Applications/WPrefs.app/#/usr/lib${LIBDIRSUFFIX}/GNUstep/Applications/WPrefs.app/#" \
@@ -104,8 +110,8 @@ sed -i -e "s#/usr/local/GNUstep/Applications/WPrefs.app/#/usr/lib${LIBDIRSUFFIX}
sed -i -e "s#WMCreatePLString(\"WPrefs\")#WMCreatePLString(\"/usr/lib${LIBDIRSUFFIX}/GNUstep/Applications/WPrefs.app/WPrefs\")#" \
-e "s#/usr/local/share#/usr/share/#" util/wmgenmenu.c
+make install DESTDIR=$PKG || exit 1
-make -i install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/WindowMaker-$VERSION
cp -a \
AUTHORS BUGFORM BUGS COPYING* FAQ* INSTALL* MIRRORS NEWS README* TODO \
@@ -128,7 +134,7 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-iconsdir=/usr/share/pixmaps \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
@@ -140,20 +146,12 @@ mkdir -p $PKG/etc/X11/xinit
zcat $CWD/xinitrc.wmaker.gz > $PKG/etc/X11/xinit/xinitrc.wmaker
chmod 0755 $PKG/etc/X11/xinit/xinitrc.wmaker
-# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
- for manpagedir in $(find . -type d -name "man*") ; do
- ( cd $manpagedir
- for eachpage in $( find . -type l -maxdepth 1) ; do
- ln -s $( readlink $eachpage ).gz $eachpage.gz
- rm $eachpage
- done
- gzip -9 *.?
- )
- done
- )
-fi
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/source/xap/windowmaker/wmmenugen.c.diff b/source/xap/windowmaker/wmmenugen.c.diff
new file mode 100644
index 000000000..3c605c405
--- /dev/null
+++ b/source/xap/windowmaker/wmmenugen.c.diff
@@ -0,0 +1,12 @@
+diff -Nur WindowMaker-0.95.7.orig/util/wmmenugen.c WindowMaker-0.95.7/util/wmmenugen.c
+--- WindowMaker-0.95.7.orig/util/wmmenugen.c 2015-08-11 13:41:14.000000000 -0500
++++ WindowMaker-0.95.7/util/wmmenugen.c 2015-11-22 18:23:32.773922263 -0600
+@@ -106,7 +106,7 @@
+ parse_locale(NULL, &env_lang, &env_ctry, &env_enc, &env_mod);
+ terminal = find_terminal_emulator();
+
+- for (i = 1; i <= argc; i++)
++ for (i = 1; i < argc; i++)
+ {
+ if (strncmp(argv[i], "-parser", 7) == 0 &&
+ (argv[i][7] == '=' ||
diff --git a/source/xap/x3270/x3270.SlackBuild b/source/xap/x3270/x3270.SlackBuild
index fd2f53fa7..c2937379f 100755
--- a/source/xap/x3270/x3270.SlackBuild
+++ b/source/xap/x3270/x3270.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
diff --git a/source/xap/xaos/xaos.SlackBuild b/source/xap/xaos/xaos.SlackBuild
index c562b6810..0b9789495 100755
--- a/source/xap/xaos/xaos.SlackBuild
+++ b/source/xap/xaos/xaos.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2010 B. Watson (yalhcru@gmail.com)
-# Copyright 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2010, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -97,6 +97,9 @@ cd $TMP
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1
+
+zcat $CWD/xaos.x86.registers.diff.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
diff --git a/source/xap/xaos/xaos.x86.registers.diff b/source/xap/xaos/xaos.x86.registers.diff
new file mode 100644
index 000000000..12d11aba6
--- /dev/null
+++ b/source/xap/xaos/xaos.x86.registers.diff
@@ -0,0 +1,22 @@
+--- ./src/engine/zoom.c.orig 2013-11-01 02:54:21.000000000 -0500
++++ ./src/engine/zoom.c 2015-04-05 00:38:10.332028884 -0500
+@@ -933,6 +933,7 @@
+ }
+
+ #ifndef USE_i386ASM
++REGISTERS(0)
+ static /*INLINE */ void
+ moveoldpoints(void /*@unused@ */ *data1,
+ struct taskinfo /*@unused@ */ *task,
+--- ./src/engine/zoomd.c.orig 2013-11-01 02:54:21.000000000 -0500
++++ ./src/engine/zoomd.c 2015-04-05 00:38:55.436032139 -0500
+@@ -280,7 +280,8 @@
+ #endif
+ #undef bpp1
+
+-static INLINE void fillline(int line)
++REGISTERS(0)
++static void fillline(int line)
+ {
+ register unsigned char *RESTRICT vbuff = cimage.currlines[line];
+ const struct filltable *RESTRICT table = (struct filltable *) tmpdata;
diff --git a/source/xap/xchat/xchat.glib.g.diff b/source/xap/xchat/xchat.glib.g.diff
deleted file mode 100644
index 143d3448d..000000000
--- a/source/xap/xchat/xchat.glib.g.diff
+++ /dev/null
@@ -1,47 +0,0 @@
---- ./src/common/util.c.orig 2009-08-16 04:40:16.000000000 -0500
-+++ ./src/common/util.c 2013-05-13 22:18:22.364370023 -0500
-@@ -39,7 +39,7 @@
- #include <errno.h>
- #include "xchat.h"
- #include "xchatc.h"
--#include <glib/gmarkup.h>
-+#include <glib.h>
- #include <ctype.h>
- #include "util.h"
- #include "../../config.h"
---- ./src/common/text.c.orig 2010-05-29 21:14:41.000000000 -0500
-+++ ./src/common/text.c 2013-05-13 22:17:58.028371777 -0500
-@@ -28,7 +28,7 @@
- #include <sys/mman.h>
-
- #include "xchat.h"
--#include <glib/ghash.h>
-+#include <glib.h>
- #include "cfgfiles.h"
- #include "chanopt.h"
- #include "plugin.h"
---- ./src/common/xchat.h.orig 2009-08-16 04:40:16.000000000 -0500
-+++ ./src/common/xchat.h 2013-05-13 22:16:41.332377305 -0500
-@@ -1,10 +1,6 @@
- #include "../../config.h"
-
--#include <glib/gslist.h>
--#include <glib/glist.h>
--#include <glib/gutils.h>
--#include <glib/giochannel.h>
--#include <glib/gstrfuncs.h>
-+#include <glib.h>
- #include <time.h> /* need time_t */
-
- #ifndef XCHAT_H
---- ./src/common/servlist.c.orig 2010-05-16 02:24:26.000000000 -0500
-+++ ./src/common/servlist.c 2013-05-13 22:17:29.900373805 -0500
-@@ -24,7 +24,7 @@
- #include <unistd.h>
-
- #include "xchat.h"
--#include <glib/ghash.h>
-+#include <glib.h>
-
- #include "cfgfiles.h"
- #include "fe.h"
diff --git a/source/xap/xfractint/xfractint.SlackBuild b/source/xap/xfractint/xfractint.SlackBuild
index e6b8bb4d3..a10db9cf4 100755
--- a/source/xap/xfractint/xfractint.SlackBuild
+++ b/source/xap/xfractint/xfractint.SlackBuild
@@ -22,14 +22,14 @@
PKGNAM=xfractint
-VERSION=${VERSION:-20.04p11}
+VERSION=${VERSION:-20.04p13}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
diff --git a/source/xap/xine-lib/xine-lib.SlackBuild b/source/xap/xine-lib/xine-lib.SlackBuild
index 510b83513..bc3e5eb7d 100755
--- a/source/xap/xine-lib/xine-lib.SlackBuild
+++ b/source/xap/xine-lib/xine-lib.SlackBuild
@@ -1,6 +1,8 @@
#!/bin/sh
# Copyright 2008, 2009, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2011, 2012 Eric Hameleers, Eindhoven, NL
+# Copyright 2015 Heinz Wiesinger, Amsterdam, NL
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,52 +24,103 @@
# Version on the tarball
-VERSION=1.1.21
+VERSION=1.2.6
# Version used in the source directory to cd into
-DIRVER=1.1.21
+DIRVER=1.2.6
# Version used for the Slackware package
-PKGVER=1.1.21
+PKGVER=1.2.6
-BUILD=${BUILD:-2}
+# Version used for statically linked ffmpeg
+FFMPEG_VERSION=${FFMPEG_VERSION:-$(echo ../MPlayer/ffmpeg-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d- | rev)}
+
+BUILD=${BUILD:-8}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i686 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
-# I would use "-march=i486 -mtune=i686" here as usual, but with XINE it's all or nothing.
-# I'd rather have it work well for the i686/Athlon crowd than suck for everyone.
TARGET=${TARGET:-$ARCH-pc-linux-gnu}
NUMJOBS=${NUMJOBS:-" -j7 "}
if [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
+ FFARCHOPTS="--arch=x86_64 --enable-pic"
+elif [ "$ARCH" = "i586" ]; then
+ LIBDIRSUFFIX=""
+ # 32bit x86 fails without this... let me know if you have a fix
+ FFARCHOPTS="--disable-asm"
else
LIBDIRSUFFIX=""
+ FFARCHOPTS=""
fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-xine-lib
-rm -rf $PKG
-mkdir -p $TMP $PKG/usr
+FFMPEG_PKG=$TMP/package-ffmpeg
+rm -rf $PKG $FFMPEG_PKG
+mkdir -p $TMP $PKG/usr $FFMPEG_PKG
cd $TMP
+rm -rf ffmpeg*
+tar xvf $CWD/../MPlayer/ffmpeg-$FFMPEG_VERSION.tar.xz || exit 1
+cd ffmpeg* || exit 1
+
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+ echo Building static ffmpeg libs ...
+
+ FFMPEGDIR=/tmp/ff-$(mcookie)
+
+ CFLAGS="$SLKCFLAGS -fvisibility=hidden -I/usr/include/openmj2-2.1" \
+ CXXFLAGS="$SLKCFLAGS -fvisibility=hidden -I/usr/include/openmj2-2.1" \
+ ./configure \
+ --prefix=$FFMPEGDIR/usr \
+ --libdir=$FFMPEGDIR/usr/lib${LIBDIRSUFFIX} \
+ --shlibdir=$FFMPEGDIR/usr/lib${LIBDIRSUFFIX} \
+ --enable-gpl \
+ --enable-version3 \
+ --enable-libtheora \
+ --enable-postproc \
+ --disable-doc \
+ --disable-avfilter \
+ --disable-avdevice \
+ --disable-swresample \
+ --disable-ffserver \
+ --disable-ffplay \
+ --disable-ffmpeg \
+ --disable-ffprobe \
+ --enable-pthreads \
+ --disable-debug \
+ --disable-shared \
+ --enable-static \
+ --enable-hardcoded-tables \
+ --enable-memalign-hack \
+ --enable-bzlib \
+ --enable-zlib \
+ --enable-libopenjpeg \
+ ${FFARCHOPTS}
+
+ make $NUMJOBS V=1 || exit 1
+ make install # Note: no DESTDIR !!
+cd -
+
rm -rf xine-lib-$VERSION
tar xvf $CWD/xine-lib-$VERSION.tar.xz || exit 1
cd xine-lib-$DIRVER || exit 1
-zcat $CWD/xine-lib.XvMClib.h.diff.gz | patch -p1 --verbose || exit 1
-
-# Fix for zlib-1.2.6 (or higher):
-sed -i 's#gzgetc(#gzgetc_(#' src/xine-engine/osd.c
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -75,6 +128,11 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+export PKG_CONFIG_PATH="${FFMPEGDIR}/usr/lib${LIBDIRSUFFIX}/pkgconfig"
+export CFLAGS="-I${FFMPEGDIR}/usr/include $SLKCFLAGS"
+export CXXFLAGS="-I${FFMPEGDIR}/usr/include $SLKCFLAGS"
+export LDFLAGS="-L${FFMPEGDIR}/usr/lib${LIBDIRSUFFIX} $SLKLDFLAGS"
+
XINE_BUILD=$TARGET \
./configure \
--prefix=/usr \
@@ -82,13 +140,18 @@ XINE_BUILD=$TARGET \
--docdir=/usr/doc/xine-lib-$VERSION \
--mandir=/usr/man \
--with-w32-path=/usr/lib${LIBDIRSUFFIX}/codecs \
- --with-arts \
+ --with-wavpack \
--disable-nosefart \
- --without-speex
+ --disable-vcd \
+ --without-speex \
+ --with-external-dvdnav
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Remove .la files:
+rm -f $PKG//usr/lib${LIBDIRSUFFIX}/*.la
+
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/codecs
find $PKG | xargs file | grep -e "executable" -e "shared object" \
diff --git a/source/xap/xine-lib/xine-lib.XvMClib.h.diff b/source/xap/xine-lib/xine-lib.XvMClib.h.diff
deleted file mode 100644
index 663e7a769..000000000
--- a/source/xap/xine-lib/xine-lib.XvMClib.h.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -u -r --new-file xine-lib-1.1.19.orig/src/video_out/video_out_xxmc.c xine-lib-1.1.19/src/video_out/video_out_xxmc.c
---- xine-lib-1.1.19.orig/src/video_out/video_out_xxmc.c 2010-04-08 09:52:43.000000000 -0500
-+++ xine-lib-1.1.19/src/video_out/video_out_xxmc.c 2010-11-06 16:01:34.278017097 -0500
-@@ -35,6 +35,7 @@
-
-
- #include "xxmc.h"
-+#include <X11/extensions/XvMClib.h>
- #include <unistd.h>
- #include "xv_common.h"
-
-diff -u -r --new-file xine-lib-1.1.19.orig/src/video_out/xvmc_mocomp.c xine-lib-1.1.19/src/video_out/xvmc_mocomp.c
---- xine-lib-1.1.19.orig/src/video_out/xvmc_mocomp.c 2010-03-09 16:17:05.000000000 -0600
-+++ xine-lib-1.1.19/src/video_out/xvmc_mocomp.c 2010-11-06 16:01:34.272017924 -0500
-@@ -21,6 +21,7 @@
- */
-
- #include "xxmc.h"
-+#include <X11/extensions/XvMClib.h>
-
-
- static void calc_DMV(int DMV[][2], int *dmvector,
diff --git a/source/xap/xine-ui/xine-ui-0.99.7-upstream_fix-1.patch b/source/xap/xine-ui/xine-ui-0.99.7-upstream_fix-1.patch
deleted file mode 100644
index 448c9d3e4..000000000
--- a/source/xap/xine-ui/xine-ui-0.99.7-upstream_fix-1.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
-Date: 2013-04-17
-Initial Package Version: 0.99.7
-Upstream Status: Applied
-Origin: Upstream (Torsten Jager)
-Description: The change to use a png logo before 0.99.7 overlooked
-that static graphics have a different status in xine-lib (they never
-stop). That broke opening a file from the 'Open' menu (opening from
-the MRL Browser, or from a file passed on the command lein were OK).
-
-Upstream revision r3135:
-
-open user file immediately when only logo is playing
-
-diff -r 653d3359d87a -r edb37ede1ab2 src/xitk/actions.c
---- a/src/xitk/actions.c Tue Mar 19 22:29:33 2013 +0200
-+++ b/src/xitk/actions.c Mon Apr 15 19:56:17 2013 +0300
-@@ -2148,7 +2148,8 @@
-
- /* If an MRL is not being played, select the first file appended. If in "smart mode" start
- playing the entry. If a an MRL is currently being played, let it continue normally */
-- if((first != gGui->playlist.num) && (xine_get_status(gGui->stream) == XINE_STATUS_STOP)) {
-+ if((first != gGui->playlist.num) &&
-+ (gGui->logo_mode || (xine_get_status(gGui->stream) == XINE_STATUS_STOP))) {
- gGui->playlist.cur = first;
- if(gGui->smart_mode) {
- gui_set_current_mmk(mediamark_get_current_mmk());
diff --git a/source/xap/xine-ui/xine-ui.SlackBuild b/source/xap/xine-ui/xine-ui.SlackBuild
index 228936c0b..2cef59a52 100755
--- a/source/xap/xine-ui/xine-ui.SlackBuild
+++ b/source/xap/xine-ui/xine-ui.SlackBuild
@@ -57,8 +57,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-zcat $CWD/xine-ui-0.99.7-upstream_fix-1.patch.gz | patch -p1 --verbose || exit 1
-
XINE_BUILD=$TARGET \
./configure \
--prefix=/usr \
@@ -71,9 +69,6 @@ XINE_BUILD=$TARGET \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-mkdir -p $PKG/usr/share/applications
-zcat $CWD/xine.desktop.gz > $PKG/usr/share/applications/xine.desktop
-
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/xap/xine-ui/xine.desktop b/source/xap/xine-ui/xine.desktop
deleted file mode 100644
index 0936a4e99..000000000
--- a/source/xap/xine-ui/xine.desktop
+++ /dev/null
@@ -1,14 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Name=Xine
-Name[pl]=Odtwarzacz xine
-GenericName=Media Player
-Comment=Xine Media Player
-Comment[pl]=Odtwarzacz filmów
-Icon=xine.xpm
-Exec=xine
-Terminal=0
-Type=Application
-Categories=Application;AudioVideo;Player;
-MimeType=video/mpeg;video/quicktime;video/x-msvideo;video/x-anim;audio/x-mp3;audio/x-mp2;
-# vi: encoding=utf-8
diff --git a/source/xap/xlockmore/xlockmore.SlackBuild b/source/xap/xlockmore/xlockmore.SlackBuild
index 4da13fe66..3516c567e 100755
--- a/source/xap/xlockmore/xlockmore.SlackBuild
+++ b/source/xap/xlockmore/xlockmore.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2011, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,7 +22,7 @@
PKGNAM=xlockmore
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
@@ -57,13 +57,9 @@ PKG=$TMP/package-xlockmore
rm -rf $PKG
mkdir -p $TMP $PKG
-## Explode the package framework:
-#cd $PKG
-#tar xzvf $CWD/_xlockmore.tar.gz
-
cd $TMP
rm -rf xlockmore-$VERSION
-tar xvf $CWD/xlockmore-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/xlockmore-$VERSION.tar.xz || exit 1
cd xlockmore-$VERSION || exit 1
chown -R root:root .
find . \
diff --git a/source/xap/xpaint/xpaint.SlackBuild b/source/xap/xpaint/xpaint.SlackBuild
index 367df5ee0..e174ca62a 100755
--- a/source/xap/xpaint/xpaint.SlackBuild
+++ b/source/xap/xpaint/xpaint.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,7 +22,7 @@
PKGNAM=xpaint
-VERSION=${VERSION:-2.8.16}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
@@ -37,7 +37,6 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
@@ -60,13 +59,13 @@ fi
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.xz || exit 1
cd ${PKGNAM}-$VERSION || exit 1
-if [ "$ARCH" = "x86_64" ]; then
- # Make it detect Xaw3d:
- sed -i -e "s#usr/lib/#usr/lib${LIBDIRSUFFIX}/#g" $( grep -lr 'usr/lib/' * )
-fi
+#if [ "$ARCH" = "x86_64" ]; then
+# # Make it detect Xaw3d:
+# sed -i -e "s#usr/lib/#usr/lib${LIBDIRSUFFIX}/#g" $( grep -lr 'usr/lib/' * )
+#fi
# Make sure ownerships and permissions are sane:
chown -R root:root .
@@ -76,11 +75,23 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-./configure
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --enable-static=no \
+ --build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
-make install.man DESTDIR=$PKG
+
+# Since this won't listen:
+mv $PKG/usr/share/man/man1/* $PKG/usr/man/man1
+rmdir $PKG/usr/share/man/man1 $PKG/usr/share/man
+rm $PKG/usr/lib${LIBDIRSUFFIX}/*.a
( cd bitmaps
mkdir -p ${PKG}/usr/include/X11/bitmaps
@@ -120,8 +131,9 @@ fi
# Add a documentation directory:
mkdir -p ${PKG}/usr/doc/xpaint-$VERSION
cp -a \
- GPL* INSTALL README* TODO* \
+ AUTHORS COPYING INSTALL NEWS README* TODO* \
${PKG}/usr/doc/xpaint-$VERSION
+chmod 644 ${PKG}/usr/doc/xpaint-$VERSION/*
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
diff --git a/source/xap/xpdf/patches/xpdf-3.03-CVE-2012-2142.diff b/source/xap/xpdf/patches/xpdf-3.03-CVE-2012-2142.diff
deleted file mode 100644
index 891c41fd3..000000000
--- a/source/xap/xpdf/patches/xpdf-3.03-CVE-2012-2142.diff
+++ /dev/null
@@ -1,55 +0,0 @@
-From 3945969e0072217c143fefa3044512a31ac2afa8 Mon Sep 17 00:00:00 2001
-From: mancha <mancha1@hush.com>
-Date: Sun, 11 Aug 2013
-Subject: CVE-2012-2142
-
-Filter stuff that might end up in the shell to address CVE-2012-2142.
-This code was adapted from the Poppler project.
----
- Error.cc | 21 ++++++++++++++++-----
- 1 file changed, 16 insertions(+), 5 deletions(-)
-
---- a/xpdf/Error.cc 2013-08-11
-+++ b/xpdf/Error.cc 2013-08-11
-@@ -43,7 +43,7 @@ void setErrorCallback(void (*cbk)(void *
-
- void CDECL error(ErrorCategory category, int pos, const char *msg, ...) {
- va_list args;
-- GString *s;
-+ GString *s, *sanitized;
-
- // NB: this can be called before the globalParams object is created
- if (!errorCbk && globalParams && globalParams->getErrQuiet()) {
-@@ -52,17 +52,28 @@ void CDECL error(ErrorCategory category,
- va_start(args, msg);
- s = GString::formatv(msg, args);
- va_end(args);
-+
-+ sanitized = new GString ();
-+ for (int i = 0; i < s->getLength(); ++i) {
-+ const char c = s->getChar(i);
-+ if (c < (char)0x20 || c >= (char)0x7f) {
-+ sanitized->appendf("<{0:02x}>", c & 0xff);
-+ } else {
-+ sanitized->append(c);
-+ }
-+ }
-+
- if (errorCbk) {
-- (*errorCbk)(errorCbkData, category, pos, s->getCString());
-+ (*errorCbk)(errorCbkData, category, pos, sanitized->getCString());
- } else {
- if (pos >= 0) {
- fprintf(stderr, "%s (%d): %s\n",
-- errorCategoryNames[category], pos, s->getCString());
-+ errorCategoryNames[category], pos, sanitized->getCString());
- } else {
- fprintf(stderr, "%s: %s\n",
-- errorCategoryNames[category], s->getCString());
-+ errorCategoryNames[category], sanitized->getCString());
- }
- fflush(stderr);
- }
-- delete s;
-+ delete sanitized;
- }
diff --git a/source/xap/xpdf/patches/xpdf.XPDFViewer.diff b/source/xap/xpdf/patches/xpdf.XPDFViewer.diff
deleted file mode 100644
index 0aa4455d5..000000000
--- a/source/xap/xpdf/patches/xpdf.XPDFViewer.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./xpdf/XPDFViewer.cc.orig 2011-08-15 16:08:53.000000000 -0500
-+++ ./xpdf/XPDFViewer.cc 2013-03-28 15:35:31.589432279 -0500
-@@ -1803,7 +1803,7 @@
- menuPane = XmCreatePulldownMenu(toolBar, "zoomMenuPane", args, n);
- for (i = 0; i < nZoomMenuItems; ++i) {
- n = 0;
-- s = XmStringCreateLocalized(zoomMenuInfo[i].label);
-+ s = XmStringCreateLocalized((char *)zoomMenuInfo[i].label);
- XtSetArg(args[n], XmNlabelString, s); ++n;
- XtSetArg(args[n], XmNuserData, (XtPointer)i); ++n;
- sprintf(buf, "zoom%d", i);
diff --git a/source/xap/xpdf/xpdf.SlackBuild b/source/xap/xpdf/xpdf.SlackBuild
index 6aa5e1b45..aa3af9604 100755
--- a/source/xap/xpdf/xpdf.SlackBuild
+++ b/source/xap/xpdf/xpdf.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,24 +21,24 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=3.03
+VERSION=3.04
PATCHLEVEL=
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -71,8 +71,6 @@ find . \
-exec chmod 644 {} \;
zcat $CWD/patches/xpdfrc.diff.gz | patch -p1 --verbose || exit 1
-zcat $CWD/patches/xpdf.XPDFViewer.diff.gz | patch -p1 --verbose || exit 1
-zcat $CWD/patches/xpdf-3.03-CVE-2012-2142.diff.gz | patch -p1 --verbose || exit 1
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/source/xap/xsane/xsane-0.995-close-fds.patch b/source/xap/xsane/xsane-0.995-close-fds.patch
new file mode 100644
index 000000000..917b075b3
--- /dev/null
+++ b/source/xap/xsane/xsane-0.995-close-fds.patch
@@ -0,0 +1,101 @@
+From 6dee7eadd1b7352ec503ea04fa1639d4a93f370b Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 16 Aug 2012 11:18:31 +0200
+Subject: [PATCH] patch: close-fds
+
+Squashed commit of the following:
+
+commit 4fdedd3a8b66fb42b2d4dde62df28c78571c1c5d
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Nov 19 12:15:58 2010 +0100
+
+ don't leak file descriptors to help browser process (#455450)
+---
+ src/xsane.c | 43 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 43 insertions(+)
+
+diff --git a/src/xsane.c b/src/xsane.c
+index 775610e..1c5d61d 100644
+--- a/src/xsane.c
++++ b/src/xsane.c
+@@ -48,6 +48,8 @@
+
+ #include <sys/wait.h>
+
++#include <stdarg.h>
++
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+
+ struct option long_options[] =
+@@ -3684,6 +3686,41 @@ static void xsane_show_gpl(GtkWidget *widget, gpointer data)
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+
++static void xsane_close_fds_for_exec(signed int first_fd_to_leave_open, ...)
++{
++ int open_max;
++ signed int i;
++
++ va_list ap;
++ unsigned char *close_fds;
++
++ open_max = (int) sysconf (_SC_OPEN_MAX);
++
++ close_fds = malloc (open_max);
++
++ memset (close_fds, 1, open_max);
++
++ va_start (ap, first_fd_to_leave_open);
++
++ for (i = first_fd_to_leave_open; i >= 0; i = va_arg (ap, signed int)) {
++ if (i < open_max)
++ close_fds[i] = 0;
++ }
++
++ va_end (ap);
++
++ DBG(DBG_info, "closing unneeded file descriptors\n");
++
++ for (i = 0; i < open_max; i++) {
++ if (close_fds[i])
++ close (i);
++ }
++
++ free (close_fds);
++}
++
++/* ---------------------------------------------------------------------------------------------------------------------- */
++
+ static void xsane_show_doc_via_nsr(GtkWidget *widget, gpointer data) /* show via netscape remote */
+ {
+ char *name = (char *) data;
+@@ -3736,6 +3773,8 @@ static void xsane_show_doc_via_nsr(GtkWidget *widget, gpointer data) /* show via
+ ipc_file = fdopen(xsane.ipc_pipefd[1], "w");
+ }
+
++ xsane_close_fds_for_exec (1, 2, xsane.ipc_pipefd[1], -1);
++
+ DBG(DBG_info, "trying to change user id for new subprocess:\n");
+ DBG(DBG_info, "old effective uid = %d\n", (int) geteuid());
+ setuid(getuid());
+@@ -3778,6 +3817,8 @@ static void xsane_show_doc_via_nsr(GtkWidget *widget, gpointer data) /* show via
+ ipc_file = fdopen(xsane.ipc_pipefd[1], "w");
+ }
+
++ xsane_close_fds_for_exec (1, 2, xsane.ipc_pipefd[1], -1);
++
+ DBG(DBG_info, "trying to change user id for new subprocess:\n");
+ DBG(DBG_info, "old effective uid = %d\n", (int) geteuid());
+ setuid(getuid());
+@@ -3899,6 +3940,8 @@ static void xsane_show_doc(GtkWidget *widget, gpointer data)
+ ipc_file = fdopen(xsane.ipc_pipefd[1], "w");
+ }
+
++ xsane_close_fds_for_exec (1, 2, xsane.ipc_pipefd[1], -1);
++
+ DBG(DBG_info, "trying to change user id for new subprocess:\n");
+ DBG(DBG_info, "old effective uid = %d\n", (int) geteuid());
+ setuid(getuid());
+--
+1.7.11.4
+
diff --git a/source/xap/xsane/xsane-0.995-xdg-open.patch b/source/xap/xsane/xsane-0.995-xdg-open.patch
new file mode 100644
index 000000000..c27693878
--- /dev/null
+++ b/source/xap/xsane/xsane-0.995-xdg-open.patch
@@ -0,0 +1,32 @@
+From 813d7063e3d265ba7e625766a040b8ba9bb130a9 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 16 Aug 2012 11:18:00 +0200
+Subject: [PATCH] patch: xdg-open
+
+Squashed commit of the following:
+
+commit 55380b90cece459e20d14e6da552abcf5ca54621
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Nov 19 12:14:17 2010 +0100
+
+ use "xdg-open" instead of "netscape" to launch help browser
+---
+ src/xsane.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/xsane.h b/src/xsane.h
+index cf6111f..3d8caaa 100644
+--- a/src/xsane.h
++++ b/src/xsane.h
+@@ -251,7 +251,7 @@
+ # elif defined(HAVE_OS2_H)
+ # define DEFAULT_BROWSER "netscape"
+ # else
+-# define DEFAULT_BROWSER "netscape"
++# define DEFAULT_BROWSER "xdg-open"
+ # endif
+ #endif
+
+--
+1.7.11.4
+
diff --git a/source/xap/xsane/xsane-0.996-no-eula.patch b/source/xap/xsane/xsane-0.996-no-eula.patch
new file mode 100644
index 000000000..66cd68429
--- /dev/null
+++ b/source/xap/xsane/xsane-0.996-no-eula.patch
@@ -0,0 +1,94 @@
+From 7018206ea45db2e8bdfeb67d33f3387c9678a407 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 16 Aug 2012 11:19:16 +0200
+Subject: [PATCH] patch: no-eula
+
+Squashed commit of the following:
+
+commit d13f1ccfdf4c150cab91105e9b8542ecbb048a9b
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Nov 19 12:20:52 2010 +0100
+
+ don't show EULA, mention bugzilla in about dialog (#504344)
+---
+ src/xsane-text.h | 2 ++
+ src/xsane.c | 16 ++++++----------
+ src/xsane.h | 3 +++
+ 3 files changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/src/xsane-text.h b/src/xsane-text.h
+index fc6bbeb..ee4a222 100644
+--- a/src/xsane-text.h
++++ b/src/xsane-text.h
+@@ -230,6 +230,8 @@
+ "This program is distributed in the hope that it will be useful, but\n" \
+ "WITHOUT ANY WARRANTY; without even the implied warranty of\n" \
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n")
++#define TEXT_MODIFIED_BLURB _("This package is modified from the original version.\n" \
++ "Please contact your vendor or report problems at")
+ #define TEXT_EMAIL_ADR _("E-mail:")
+ #define TEXT_HOMEPAGE _("Homepage:")
+ #define TEXT_FILE _("File:")
+diff --git a/src/xsane.c b/src/xsane.c
+index 1c5d61d..8b24b0c 100644
+--- a/src/xsane.c
++++ b/src/xsane.c
+@@ -3533,10 +3533,13 @@ static void xsane_about_dialog(GtkWidget *widget, gpointer data)
+ snprintf(buf, sizeof(buf), "XSane %s %s\n"
+ "%s %s\n"
+ "\n"
++ "%s\n%s"
++ "\n\n"
+ "%s %s\n"
+ "%s %s\n",
+ TEXT_VERSION, XSANE_VERSION,
+ XSANE_COPYRIGHT_SIGN, XSANE_COPYRIGHT_TXT,
++ TEXT_MODIFIED_BLURB, XSANE_BUGTRACKER_URL,
+ TEXT_HOMEPAGE, XSANE_HOMEPAGE,
+ TEXT_EMAIL_ADR, XSANE_EMAIL_ADR);
+
+@@ -5733,6 +5736,7 @@ static int xsane_init(int argc, char **argv)
+
+ case 'v': /* --version */
+ g_print("%s-%s %s %s\n", xsane.prog_name, XSANE_VERSION, XSANE_COPYRIGHT_SIGN, XSANE_COPYRIGHT_TXT);
++ g_print("\n%s\n%s\n\n", TEXT_MODIFIED_BLURB, XSANE_BUGTRACKER_URL);
+ g_print(" %s %s\n", TEXT_EMAIL_ADR, XSANE_EMAIL_ADR);
+ g_print(" %s %s\n", TEXT_PACKAGE, XSANE_PACKAGE_VERSION);
+ g_print(" %s%d.%d.%d\n", TEXT_GTK_VERSION, GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
+@@ -5859,17 +5863,9 @@ static int xsane_init(int argc, char **argv)
+ }
+
+
+- if (xsane_pref_restore()) /* restore preferences, returns TRUE if license is not accpted yet */
++ if (xsane_pref_restore()) /* restore preferences, returns TRUE if the version is different from the last run */
+ {
+- if (xsane_display_eula(1)) /* show license and ask for accept/not accept */
+- {
+- DBG(DBG_info, "user did not accept eula, we abort\n");
+- return 1; /* User did not accept eula */
+- }
+- else /* User did accept eula */
+- {
+- xsane_pref_save();
+- }
++ xsane_pref_save();
+ }
+
+ xsane_pref_restore_media();
+diff --git a/src/xsane.h b/src/xsane.h
+index 3d8caaa..6c7568e 100644
+--- a/src/xsane.h
++++ b/src/xsane.h
+@@ -98,6 +98,9 @@
+ #define XSANE_EMAIL_ADR "Oliver.Rauch@xsane.org"
+ #define XSANE_HOMEPAGE "http://www.xsane.org"
+ #define XSANE_COPYRIGHT_TXT XSANE_DATE " " XSANE_COPYRIGHT
++#ifndef XSANE_BUGTRACKER_URL
++#define XSANE_BUGTRACKER_URL "(no bug tracker configured)"
++#endif
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+
+--
+1.7.11.4
+
diff --git a/source/xap/xsane/xsane-0.997-ipv6.patch b/source/xap/xsane/xsane-0.997-ipv6.patch
new file mode 100644
index 000000000..43f7af6d1
--- /dev/null
+++ b/source/xap/xsane/xsane-0.997-ipv6.patch
@@ -0,0 +1,148 @@
+From a2ef22d59904d5e53c3d58093b561fa1ab7127a6 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 16 Aug 2012 10:58:54 +0200
+Subject: [PATCH] patch: ipv6
+
+Squashed commit of the following:
+
+commit 9f9d5c46fdef5ba7baccb81ab8170cfc24797de6
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Nov 19 12:27:42 2010 +0100
+
+ support IPv6 (#198422)
+---
+ src/xsane-save.c | 96 ++++++++++++++++++++++++++++++++++++--------------------
+ 1 file changed, 62 insertions(+), 34 deletions(-)
+
+diff --git a/src/xsane-save.c b/src/xsane-save.c
+index 84f5d59..87ef685 100644
+--- a/src/xsane-save.c
++++ b/src/xsane-save.c
+@@ -29,6 +29,8 @@
+ #include <time.h>
+ #include <sys/wait.h>
+
++#include <glib.h>
++
+ /* the following test is always false */
+ #ifdef _native_WIN32
+ # include <winsock.h>
+@@ -7488,55 +7490,81 @@ void write_email_attach_file(int fd_socket, char *boundary, FILE *infile, char *
+ /* returns fd_socket if sucessfull, < 0 when error occured */
+ int open_socket(char *server, int port)
+ {
+- int fd_socket;
+- struct sockaddr_in sin;
+- struct hostent *he;
++ int fd_socket, e;
++
++ struct addrinfo *ai_list, *ai;
++ struct addrinfo hints;
++ gchar *port_s;
++ gint connected;
++
++ memset(&hints, '\0', sizeof(hints));
++ hints.ai_flags = AI_ADDRCONFIG;
++ hints.ai_socktype = SOCK_STREAM;
++
++ port_s = g_strdup_printf("%d", port);
++ e = getaddrinfo(server, port_s, &hints, &ai_list);
++ g_free(port_s);
+
+- he = gethostbyname(server);
+- if (!he)
++ if (e != 0)
+ {
+- DBG(DBG_error, "open_socket: Could not get hostname of \"%s\"\n", server);
++ DBG(DBG_error, "open_socket: Could not lookup \"%s\"\n", server);
+ return -1;
+ }
+- else
++
++ connected = 0;
++ for (ai = ai_list; ai != NULL && !connected; ai = ai->ai_next)
+ {
+- DBG(DBG_info, "open_socket: connecting to \"%s\" = %d.%d.%d.%d\n",
+- he->h_name,
+- (unsigned char) he->h_addr_list[0][0],
+- (unsigned char) he->h_addr_list[0][1],
+- (unsigned char) he->h_addr_list[0][2],
+- (unsigned char) he->h_addr_list[0][3]);
+- }
++ gchar hostname[NI_MAXHOST];
++ gchar hostaddr[NI_MAXHOST];
++
++ /* If all else fails */
++ strncpy(hostname, "(unknown name)", NI_MAXHOST-1);
++ strncpy(hostaddr, "(unknown address)", NI_MAXHOST-1);
++
++ /* Determine canonical name and IPv4/IPv6 address */
++ (void) getnameinfo(ai->ai_addr, ai->ai_addrlen, hostname, sizeof(hostname),
++ NULL, 0, 0);
++ (void) getnameinfo(ai->ai_addr, ai->ai_addrlen, hostaddr, sizeof(hostaddr),
++ NULL, 0, NI_NUMERICHOST);
++
++ DBG(DBG_info, "open_socket: connecting to \"%s\" (\"%s\"): %s\n",
++ server, hostname, hostaddr);
+
+- if (he->h_addrtype != AF_INET)
+- {
+- DBG(DBG_error, "open_socket: Unknown address family: %d\n", he->h_addrtype);
+- return -1;
+- }
++ if ((ai->ai_family != AF_INET) && (ai->ai_family != AF_INET6))
++ {
++ DBG(DBG_error, "open_socket: Unknown address family: %d\n", ai->ai_family);
++ continue;
++ }
+
+- fd_socket = socket(AF_INET, SOCK_STREAM, 0);
++ fd_socket = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+
+- if (fd_socket < 0)
+- {
+- DBG(DBG_error, "open_socket: Could not create socket: %s\n", strerror(errno));
+- return -1;
+- }
++ if (fd_socket < 0)
++ {
++ DBG(DBG_error, "open_socket: Could not create socket: %s\n", strerror(errno));
++ continue;
++ }
+
+-/* setsockopt (dev->ctl, level, TCP_NODELAY, &on, sizeof (on)); */
++ /* setsockopt (dev->ctl, level, TCP_NODELAY, &on, sizeof (on)); */
+
+- sin.sin_port = htons(port);
+- sin.sin_family = AF_INET;
+- memcpy(&sin.sin_addr, he->h_addr_list[0], he->h_length);
++ if (connect(fd_socket, ai->ai_addr, ai->ai_addrlen) != 0)
++ {
++ DBG(DBG_error, "open_socket: Could not connect with port %d of socket: %s\n", port, strerror(errno));
++ continue;
++ }
++
++ /* All went well */
++ connected = 1;
++ }
+
+- if (connect(fd_socket, &sin, sizeof(sin)))
++ if (!connected)
+ {
+- DBG(DBG_error, "open_socket: Could not connect with port %d of socket: %s\n", ntohs(sin.sin_port), strerror(errno));
+- return -1;
++ DBG(DBG_info, "open_socket: Could not connect to any address");
++ return -1;
+ }
+
+- DBG(DBG_info, "open_socket: Connected with port %d\n", ntohs(sin.sin_port));
++ DBG(DBG_info, "open_socket: Connected with port %d\n", port);
+
+- return fd_socket;
++ return fd_socket;
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+--
+1.7.11.4
+
diff --git a/source/xap/xsane/xsane-0.997-off-root-build.patch b/source/xap/xsane/xsane-0.997-off-root-build.patch
new file mode 100644
index 000000000..02155f8f8
--- /dev/null
+++ b/source/xap/xsane/xsane-0.997-off-root-build.patch
@@ -0,0 +1,127 @@
+From 7f43255972b741ff178f94233ffff67c9779c247 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 16 Aug 2012 10:57:38 +0200
+Subject: [PATCH] patch: off-root-build
+
+Squashed commit of the following:
+
+commit f88d28c807667f618b3b1cf91c12b823f3853983
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Nov 19 12:23:57 2010 +0100
+
+ enable off-root builds
+---
+ configure.in | 2 +-
+ doc/Makefile.in | 12 ++++++------
+ lib/Makefile.in | 4 ++--
+ src/Makefile.in | 8 ++++----
+ 4 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index a770253..770077b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -312,4 +312,4 @@ echo "* ------------------------------------------------------------ *"
+ echo "* ... PLEASE READ SANE DOCUMENTATION BEFORE STARTING XSANE ... *"
+ echo "* ------------------------------------------------------------ *"
+ echo "****************************************************************"
+-cat xsane.NEWS
++cat ${srcdir}/xsane.NEWS
+diff --git a/doc/Makefile.in b/doc/Makefile.in
+index 59b022b..4038a6b 100644
+--- a/doc/Makefile.in
++++ b/doc/Makefile.in
+@@ -57,14 +57,14 @@ install: $(MANPAGES)
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir)
+
+ $(MKINSTALLDIRS) $(DESTDIR)$(xsanedocdir)
+- @for page in *.html; do\
++ @for page in $(notdir $(wildcard $(srcdir)/*.html)); do \
+ echo installing $${page} in $(DESTDIR)$(xsanedocdir)/$${page}...; \
+- $(INSTALL_DATA) $${page} $(DESTDIR)$(xsanedocdir)/$${page} || exit 1; \
++ $(INSTALL_DATA) $(srcdir)/$${page} $(DESTDIR)$(xsanedocdir)/$${page} || exit 1; \
+ done
+
+- @for image in *.jpg; do\
++ @for image in $(notdir $(wildcard $(srcdir)/*.jpg)); do \
+ echo installing $${image} in $(DESTDIR)$(xsanedocdir)/$${image}...; \
+- $(INSTALL_DATA) $${image} $(DESTDIR)$(xsanedocdir)/$${image} || exit 1; \
++ $(INSTALL_DATA) $(srcdir)/$${image} $(DESTDIR)$(xsanedocdir)/$${image} || exit 1; \
+ done
+
+ uninstall:
+@@ -73,12 +73,12 @@ uninstall:
+ rm -f $(DESTDIR)$(mandir)/man1/$${page} || exit 1; \
+ done
+
+- @for page in *.html; do\
++ @for page in $(notdir $(wildcard $(srcdir)/*.html)); do \
+ echo uninstalling $(DESTDIR)$(xsanedocdir)/$${page}...; \
+ rm -f $(DESTDIR)$(xsanedocdir)/$${page} || exit 1; \
+ done
+
+- @for image in *.jpg; do\
++ @for image in $(notdir $(wildcard $(srcdir)/*.jpg)); do \
+ echo uninstalling $${image} in $(DESTDIR)$(xsanedocdir)/$${image}...; \
+ rm -f $(DESTDIR)$(xsanedocdir)/$${image} || exit 1; \
+ done
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index 7567d54..6be1eeb 100644
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -30,7 +30,7 @@ RANLIB = @RANLIB@
+
+ CC = @CC@
+ INCLUDES = -I. -I$(srcdir) \
+- -I$(top_builddir)/include/sane -I$(top_srcdir)/include
++ -I$(top_builddir)/include/sane -I$(top_builddir)/include -I$(top_srcdir)/include
+ CPPFLAGS = @CPPFLAGS@
+ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+@@ -68,7 +68,7 @@ uninstall:
+ check:
+
+ depend:
+- makedepend -I. -I../include *.c
++ makedepend -I. -I../include $(srcdir)/*.c
+
+ clean:
+ rm -f *.out *.o *.lo *~ *.a *.bak $(TESTPROGRAMS)
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 905ef93..2b246db 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -77,10 +77,10 @@ install: $(PROGRAMS)
+ $(INSTALL_DATA) $(srcdir)/xsane-eula.txt $(DESTDIR)$(sanedatadir)/xsane/xsane-eula.txt
+ $(INSTALL_DATA) $(srcdir)/xsane.desktop $(DESTDIR)$(desktopappdir)/xsane.desktop
+ $(INSTALL_DATA) $(srcdir)/xsane.xpm $(DESTDIR)$(pixmapdir)/xsane.xpm
+- @for logo in *-logo.xpm; do \
++ @for logo in $(notdir $(wildcard $(srcdir)/*-logo.xpm)); do \
+ echo installing $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \
+ $(INSTALL_DATA) $(srcdir)/$${logo} $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \
+- done
++ done
+
+ uninstall:
+ @for program in $(BINPROGS); do \
+@@ -99,7 +99,7 @@ uninstall:
+ rm -f $(DESTDIR)$(desktopappdir)/xsane.desktop
+ echo uninstalling $(DESTDIR)$(pixmapdir)/xsane.xpm
+ rm -f $(DESTDIR)$(pixmapdir)/xsane.xpm
+- @for logo in *-logo.xpm; do \
++ @for logo in $(notdir $(wildcard $(srcdir)/*-logo.xpm)); do \
+ echo uninstalling $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \
+ rm -f $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \
+ done
+@@ -119,7 +119,7 @@ distclean: clean
+ rm -f Makefile $(PROGRAMS)
+
+ depend:
+- makedepend $(INCLUDES) *.c
++ makedepend $(INCLUDES) $(srcdir)/*.c
+
+ .PHONY: all install depend clean distclean
+
+--
+1.7.11.4
+
diff --git a/source/xap/xsane/xsane-0.998-desktop-file.patch b/source/xap/xsane/xsane-0.998-desktop-file.patch
new file mode 100644
index 000000000..396be6716
--- /dev/null
+++ b/source/xap/xsane/xsane-0.998-desktop-file.patch
@@ -0,0 +1,53 @@
+From e3f3e266249f77ff655299daeab3128347d6cb17 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Wed, 30 Jan 2013 15:59:40 +0100
+Subject: [PATCH] patch: desktop-file
+
+Squashed commit of the following:
+
+commit e472b870c4490f41b9257c835d4c8c72a575e9e9
+Author: Nils Philippsen <nils@redhat.com>
+Date: Wed Jan 30 15:57:57 2013 +0100
+
+ desktop file: use Name, GenericName, X-GNOME-FullName
+
+commit 9f7f6a039193f91473ded79780bd72e29d7b94fb
+Author: Nils Philippsen <nils@redhat.com>
+Date: Wed Jan 30 15:57:14 2013 +0100
+
+ desktop file: remove obsolete encoding key
+
+commit 79a444793a60bd729c72283ad1920f0ce9c65dc2
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Nov 19 12:41:23 2010 +0100
+
+ customize desktop file
+---
+ src/xsane.desktop | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/src/xsane.desktop b/src/xsane.desktop
+index d5161e5..a2a4a61 100644
+--- a/src/xsane.desktop
++++ b/src/xsane.desktop
+@@ -1,9 +1,14 @@
+ [Desktop Entry]
+-Encoding=UTF-8
+-Name=XSane - Scanning
++Version=1.0
++#Name=XSane - Scanning
++Name=XSane
++GenericName=Scanner Tool
++X-GNOME-FullName=XSane (Scanner Tool)
+ Comment=Acquire images from a scanner
+ Exec=xsane
++TryExec=xsane
+ Icon=xsane
+ Terminal=false
+ Type=Application
+-Categories=Application;Graphics
++Categories=Graphics;2DGraphics;RasterGraphics;Scanning;GTK;
++StartupNotify=true
+--
+1.8.1
+
diff --git a/source/xap/xsane/xsane-0.998-libpng.patch b/source/xap/xsane/xsane-0.998-libpng.patch
new file mode 100644
index 000000000..c792c5a18
--- /dev/null
+++ b/source/xap/xsane/xsane-0.998-libpng.patch
@@ -0,0 +1,41 @@
+From bd29bb933cf80f397dd28286635da2aec58e6e6c Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 16 Aug 2012 11:26:54 +0200
+Subject: [PATCH] patch: libpng
+
+Squashed commit of the following:
+
+commit 9df6d60274c95b5081faf5b398aa27cde969c649
+Author: Nils Philippsen <nils@redhat.com>
+Date: Mon Nov 21 13:50:38 2011 +0100
+
+ support libpng-1.5
+---
+ src/xsane-save.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xsane-save.c b/src/xsane-save.c
+index 87ef685..5461bf1 100644
+--- a/src/xsane-save.c
++++ b/src/xsane-save.c
+@@ -4912,7 +4912,7 @@ int xsane_save_png(FILE *outfile, int compression, FILE *imagefile, Image_info *
+ return -1; /* error */
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_LIBPNG);
+ xsane_back_gtk_error(buf, TRUE);
+@@ -5102,7 +5102,7 @@ int xsane_save_png_16(FILE *outfile, int compression, FILE *imagefile, Image_inf
+ return -1; /* error */
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_LIBPNG);
+ xsane_back_gtk_error(buf, TRUE);
+--
+1.7.11.4
+
diff --git a/source/xap/xsane/xsane-0.998-preview-selection.patch b/source/xap/xsane/xsane-0.998-preview-selection.patch
new file mode 100644
index 000000000..293981819
--- /dev/null
+++ b/source/xap/xsane/xsane-0.998-preview-selection.patch
@@ -0,0 +1,60 @@
+From d8bf0d3f0af16e208b52084f19a9a1287acbcea0 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Fri, 2 Sep 2011 11:56:26 +0200
+Subject: [PATCH] patch: preview-selection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Squashed commit of the following:
+
+commit e7c03a6de0c76256810b6340e0a954e88c3448e9
+Author: Reinhard Fössmeier <info@ais-sanmarino.org>
+Date: Wed May 12 20:23:18 2010 +0200
+
+ fixed a problem in mouse event processing
+
+ Fixed a problem in mouse event processing that interfered with selecting
+ the scan rectangle in the preview window.
+---
+ src/xsane-preview.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/src/xsane-preview.c b/src/xsane-preview.c
+index f089dd1..264c775 100644
+--- a/src/xsane-preview.c
++++ b/src/xsane-preview.c
+@@ -80,7 +80,6 @@
+ #include "xsane-preview.h"
+ #include "xsane-preferences.h"
+ #include "xsane-gamma.h"
+-#include <gdk/gdkkeysyms.h>
+
+
+ #ifndef PATH_MAX
+@@ -3023,9 +3022,9 @@ static gint preview_motion_event_handler(GtkWidget *window, GdkEvent *event, gpo
+ preview_display_color_components(p, event->motion.x, event->motion.y);
+
+ switch (((GdkEventMotion *)event)->state &
+- GDK_Num_Lock & GDK_Caps_Lock & GDK_Shift_Lock & GDK_Scroll_Lock) /* mask all Locks */
++ (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK)) /* only check for mouse buttons */
+ {
+- case 256: /* left button */
++ case GDK_BUTTON1_MASK: /* left button */
+
+ DBG(DBG_info2, "left button\n");
+
+@@ -3292,8 +3291,8 @@ static gint preview_motion_event_handler(GtkWidget *window, GdkEvent *event, gpo
+ }
+ break;
+
+- case 512: /* middle button */
+- case 1024: /* right button */
++ case GDK_BUTTON2_MASK: /* middle button */
++ case GDK_BUTTON3_MASK: /* right button */
+ DBG(DBG_info2, "middle or right button\n");
+
+ if (p->selection_drag)
+--
+1.7.11.4
+
diff --git a/source/xap/xsane/xsane-0.998-wmclass.patch b/source/xap/xsane/xsane-0.998-wmclass.patch
new file mode 100644
index 000000000..4fd84ba0b
--- /dev/null
+++ b/source/xap/xsane/xsane-0.998-wmclass.patch
@@ -0,0 +1,33 @@
+From a0b23d7e1991b23e2b9ab78bf382c55b9e24cfb9 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Fri, 25 May 2012 11:47:39 +0200
+Subject: [PATCH] patch: wmclass
+
+Squashed commit of the following:
+
+commit d42b7a9dbe397a301373e3cbaa589540a1475a0b
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri May 25 11:45:48 2012 +0200
+
+ set program name -> wmclass to match desktop file name
+---
+ src/xsane.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/xsane.c b/src/xsane.c
+index 8b24b0c..eee76ff 100644
+--- a/src/xsane.c
++++ b/src/xsane.c
+@@ -6208,6 +6208,9 @@ int main(int argc, char **argv)
+ xsane.ipc_pipefd[1] = 0;
+ }
+
++ /* Set program name -> wmclass to match desktop file name */
++ g_set_prgname("xsane");
++
+ #if 0
+ bindtextdomain(PACKAGE, STRINGIFY(LOCALEDIR));
+ textdomain(PACKAGE);
+--
+1.7.11.4
+
diff --git a/source/xap/xsane/xsane-0.999-7-autoconf.patch b/source/xap/xsane/xsane-0.999-7-autoconf.patch
new file mode 100644
index 000000000..55415c83e
--- /dev/null
+++ b/source/xap/xsane/xsane-0.999-7-autoconf.patch
@@ -0,0 +1,738 @@
+diff -up xsane-0.999/configure.autoconf xsane-0.999/configure
+--- xsane-0.999/configure.autoconf 2013-05-22 23:50:40.000000000 +0200
++++ xsane-0.999/configure 2013-09-23 16:14:45.245517908 +0200
+@@ -1,11 +1,9 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.68.
++# Generated by GNU Autoconf 2.69.
+ #
+ #
+-# 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
+@@ -134,6 +132,31 @@ export LANGUAGE
+ # 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
+@@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test
+ 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'\" &&
+@@ -212,6 +236,7 @@ IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
++ 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.
+@@ -219,14 +244,17 @@ IFS=$as_save_IFS
+ 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+"$@"}
++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 :
+@@ -328,6 +356,14 @@ $as_echo X"$as_dir" |
+
+
+ } # 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
+@@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
+ 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).
+@@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then
+ # ... 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
+@@ -504,28 +544,8 @@ else
+ 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_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'"
+@@ -1192,8 +1212,6 @@ target=$target_alias
+ 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
+@@ -1451,9 +1469,9 @@ test -n "$ac_init_help" && exit $ac_stat
+ if $ac_init_version; then
+ cat <<\_ACEOF
+ configure
+-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
+@@ -1726,7 +1744,7 @@ $as_echo "$ac_try_echo"; } >&5
+ 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
+@@ -1870,7 +1888,7 @@ This file contains any messages produced
+ running configure, to aid debugging if configure makes a mistake.
+
+ It was created by $as_me, which was
+-generated by GNU Autoconf 2.68. Invocation command line was
++generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+@@ -2377,7 +2395,7 @@ do
+ 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
+@@ -2417,7 +2435,7 @@ do
+ 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
+@@ -2470,7 +2488,7 @@ do
+ 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
+@@ -2511,7 +2529,7 @@ do
+ 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
+@@ -2569,7 +2587,7 @@ do
+ 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
+@@ -2613,7 +2631,7 @@ do
+ 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
+@@ -3059,8 +3077,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
+ /* end confdefs.h. */
+ #include <stdarg.h>
+ #include <stdio.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
++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);
+@@ -3300,7 +3317,7 @@ do
+ 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
+@@ -3366,7 +3383,7 @@ do
+ 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
+@@ -3684,7 +3701,7 @@ do
+ 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
+@@ -3724,7 +3741,7 @@ do
+ 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
+@@ -3777,7 +3794,7 @@ do
+ 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
+@@ -3818,7 +3835,7 @@ do
+ 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
+@@ -3876,7 +3893,7 @@ do
+ 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
+@@ -3920,7 +3937,7 @@ do
+ 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
+@@ -4116,8 +4133,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
+ /* end confdefs.h. */
+ #include <stdarg.h>
+ #include <stdio.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
++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);
+@@ -4271,7 +4287,7 @@ case $as_dir/ in #((
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+@@ -4732,11 +4748,11 @@ else
+ int
+ main ()
+ {
+-/* FIXME: Include the comments suggested by Paul. */
++
+ #ifndef __cplusplus
+- /* Ultrix mips cc rejects this. */
++ /* Ultrix mips cc rejects this sort of thing. */
+ typedef int charset[2];
+- const charset cs;
++ const charset cs = { 0, 0 };
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+@@ -4753,8 +4769,9 @@ main ()
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+- { /* SCO 3.2v4 cc rejects this. */
+- char *t;
++ { /* SCO 3.2v4 cc rejects this sort of thing. */
++ char tx;
++ char *t = &tx;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+@@ -4770,10 +4787,10 @@ main ()
+ iptr p = 0;
+ ++p;
+ }
+- { /* AIX XL C 1.02.0.0 rejects this saying
++ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+- struct s { int j; const int *ap[3]; };
+- struct s *b; b->j = 5;
++ struct s { int j; const int *ap[3]; } bx;
++ struct s *b = &bx; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+@@ -5132,13 +5149,12 @@ fi
+ fi
+
+ if test "${USE_LCMS}" = "yes"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmsOpenProfileFromFile in -llcms" >&5
+-$as_echo_n "checking for cmsOpenProfileFromFile in -llcms... " >&6; }
+-if ${ac_cv_lib_lcms_cmsOpenProfileFromFile+:} false; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cmsOpenProfileFromFile" >&5
++$as_echo_n "checking for library containing cmsOpenProfileFromFile... " >&6; }
++if ${ac_cv_search_cmsOpenProfileFromFile+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-llcms $LIBS"
++ ac_func_search_save_LIBS=$LIBS
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -5157,26 +5173,54 @@ return cmsOpenProfileFromFile ();
+ return 0;
+ }
+ _ACEOF
+-if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_lcms_cmsOpenProfileFromFile=yes
++for ac_lib in '' lcms2 lcms; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
+ else
+- ac_cv_lib_lcms_cmsOpenProfileFromFile=no
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_search_cmsOpenProfileFromFile=$ac_res
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
++ conftest$ac_exeext
++ if ${ac_cv_search_cmsOpenProfileFromFile+:} false; then :
++ break
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lcms_cmsOpenProfileFromFile" >&5
+-$as_echo "$ac_cv_lib_lcms_cmsOpenProfileFromFile" >&6; }
+-if test "x$ac_cv_lib_lcms_cmsOpenProfileFromFile" = xyes; then :
+- cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBLCMS 1
+-_ACEOF
++done
++if ${ac_cv_search_cmsOpenProfileFromFile+:} false; then :
++
++else
++ ac_cv_search_cmsOpenProfileFromFile=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cmsOpenProfileFromFile" >&5
++$as_echo "$ac_cv_search_cmsOpenProfileFromFile" >&6; }
++ac_res=$ac_cv_search_cmsOpenProfileFromFile
++if test "$ac_res" != no; then :
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+- LIBS="-llcms $LIBS"
++fi
++
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" != "no"; then
++
++$as_echo "#define HAVE_LIBLCMS 1" >>confdefs.h
+
+ fi
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms2"; then
+
++$as_echo "#define HAVE_LIBLCMS2 1" >>confdefs.h
++
++ else
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms"; then
++
++$as_echo "#define HAVE_LIBLCMS1 1" >>confdefs.h
++
++fi
++ fi
+ fi
+
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+@@ -5330,23 +5374,20 @@ else
+ /* end confdefs.h. */
+ $ac_includes_default
+ int
+-find_stack_direction ()
+-{
+- static char *addr = 0;
+- auto char dummy;
+- if (addr == 0)
++find_stack_direction (int *addr, int depth)
+ {
++ int dir, dummy = 0;
++ if (! addr)
+ addr = &dummy;
+- return find_stack_direction ();
+- }
+- else
+- return (&dummy > addr) ? 1 : -1;
++ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
++ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
++ return dir + dummy;
+ }
+
+ int
+-main ()
++main (int argc, char **argv)
+ {
+- return find_stack_direction () < 0;
++ return find_stack_direction (0, argc + !argv + 20) < 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+@@ -5599,7 +5640,7 @@ do
+ 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_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -5639,7 +5680,7 @@ do
+ 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_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -5971,7 +6012,7 @@ do
+ 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_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -6136,7 +6177,7 @@ do
+ 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_path_GENCAT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -6177,7 +6218,7 @@ do
+ 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_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -6350,7 +6391,7 @@ do
+ 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_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -6574,7 +6615,7 @@ do
+ 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_path_SANE_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -6795,7 +6836,7 @@ do
+ 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_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -7058,7 +7099,7 @@ do
+ 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_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -7346,7 +7387,7 @@ do
+ 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_path_GTK_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -7616,7 +7657,7 @@ do
+ 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_path_GIMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -7670,7 +7711,7 @@ do
+ 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_path_GIMP_TOOL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -8496,16 +8537,16 @@ if (echo >conf$$.file) 2>/dev/null; then
+ # ... 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
+@@ -8565,28 +8606,16 @@ else
+ as_mkdir_p=false
+ fi
+
+-if test -x / >/dev/null 2>&1; then
++
++# 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'
+-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_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'"
+@@ -8608,7 +8637,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
+ # values after options handling.
+ ac_log="
+ This file was extended by $as_me, 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
+@@ -8674,10 +8703,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+ config.status
+-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."
+
+@@ -8766,7 +8795,7 @@ fi
+ _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'
+@@ -9463,11 +9492,15 @@ else
+ echo "* - PNG support deactivated *"
+ fi
+
+-if test "${ac_cv_lib_lcms_cmsOpenProfileFromFile}" = "yes"; then
+- echo "* - LCMS (color management) support activated *"
++if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms2"; then
++ echo "* - LCMS (color management) support activated (lcms2) *"
++else
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms"; then
++ echo "* - LCMS (color management) support activated (lcms) *"
+ else
+ echo "* - LCMS (color management) support deactivated *"
+ fi
++fi
+
+ echo "* *"
+ echo "****************************************************************"
+@@ -9481,4 +9514,4 @@ echo "* --------------------------------
+ echo "* ... PLEASE READ SANE DOCUMENTATION BEFORE STARTING XSANE ... *"
+ echo "* ------------------------------------------------------------ *"
+ echo "****************************************************************"
+-cat xsane.NEWS
++cat ${srcdir}/xsane.NEWS
diff --git a/source/xap/xsane/xsane-0.999-coverity.patch b/source/xap/xsane/xsane-0.999-coverity.patch
new file mode 100644
index 000000000..f6350fe98
--- /dev/null
+++ b/source/xap/xsane/xsane-0.999-coverity.patch
@@ -0,0 +1,2679 @@
+From 9fe09c0e0746067f9e9774229b3d0beb35c5766b Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Wed, 2 Apr 2014 14:54:05 +0200
+Subject: [PATCH] patch: coverity
+
+Squashed commit of the following:
+
+commit e26d784a5217d1609e774678d8abaeb2e1ecdadc
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Mar 11 10:28:02 2014 +0100
+
+ ensure loop is run at least once while scaling
+
+commit e5bf8c8a659a7b03ae3eb130ebfaad292e16816d
+Author: Nils Philippsen <nils@redhat.com>
+Date: Thu Feb 27 15:07:42 2014 +0100
+
+ remove stray semicolon
+
+commit ad928333ba038051ca0a405470dadeaa0f365b95
+Author: Nils Philippsen <nils@redhat.com>
+Date: Thu Feb 27 15:06:17 2014 +0100
+
+ use actual pointer type in realloc()
+
+commit 11dfb289d03555218318ce1a284c1165bbc58b22
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 17:42:54 2014 +0100
+
+ don't overflow size expression for allocation
+
+commit 5daccfc14f129c632f8409a89903d21c5495dd2f
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 17:18:58 2014 +0100
+
+ don't leak file descriptors and other resources
+
+commit 034023d7aaac378b8ab02051d11392c639154842
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 16:04:28 2014 +0100
+
+ don't overrun buffers
+
+commit f7454d62b5206e2100e8569e04ff4a6868cbd909
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 15:56:40 2014 +0100
+
+ check if files actually could be opened
+
+commit de30cacd285c02382a32dc48cf9fe015223a57f7
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 15:47:51 2014 +0100
+
+ handle negative return values of some calls
+
+commit b46a520ba85bda776b1a91de9f842ed96d97fa73
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 11:54:31 2014 +0100
+
+ only attempt to close successfully opened files
+
+commit bb6a8ccab418f89fa6fb367874f84aa56195cca0
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 11:54:15 2014 +0100
+
+ bail out early if memory can't be allocated
+
+commit 9b1e34c1d099c0a7acf7bd5aec8e3f0c2d2eafa8
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 11:53:11 2014 +0100
+
+ gtk_entry_get_text() isn't supposed to return NULL
+
+commit bc7553caaea1955e7fa48f3a2f4c0773d40204c3
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 11:00:11 2014 +0100
+
+ negate comparison instead of operand
+
+commit d1d4675a416383d808def730ade4f6b5b1a493b8
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 10:55:42 2014 +0100
+
+ use int types for fgetc() results
+
+commit cbdc2df85367c27ff56fb9cdd77a61c6d82be0e1
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 25 10:36:53 2014 +0100
+
+ avoid freeing static strings
+
+commit 0c377b9658daa5dcdbc6c260baa4e31237202f3e
+Author: Nils Philippsen <nils@redhat.com>
+Date: Wed Feb 19 16:10:35 2014 +0100
+
+ use guchar* for PNG profile buffer
+
+commit 70152131771b891fe04b3087e3b73c42e6d5ebbe
+Author: Nils Philippsen <nils@redhat.com>
+Date: Wed Feb 19 16:09:46 2014 +0100
+
+ cast time_t into long instead of int
+
+commit 0ac0683bcba7d8cf4e786abc3abe9c3e3c7d60a0
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Feb 18 17:55:02 2014 +0100
+
+ use glib macros where ints are transported in pointers
+
+commit 8e85947fe5a592a3f938ab5bb2dc79488b638515
+Author: Nils Philippsen <nils@redhat.com>
+Date: Mon Feb 17 13:42:13 2014 +0100
+
+ handle return values of some file related system calls
+
+commit f4ba79f720a9a1e4a3caddc77d0de19a7d2fb75c
+Author: Nils Philippsen <nils@redhat.com>
+Date: Mon Feb 17 12:07:09 2014 +0100
+
+ avoid leaking resources
+---
+ src/xsane-back-gtk.c | 75 +++++++++++++---
+ src/xsane-batch-scan.c | 41 ++++-----
+ src/xsane-email-project.c | 83 +++++++++---------
+ src/xsane-fax-project.c | 14 ++-
+ src/xsane-front-gtk.c | 42 ++++-----
+ src/xsane-multipage-project.c | 5 ++
+ src/xsane-preview.c | 34 ++++----
+ src/xsane-save.c | 166 ++++++++++++++++++++++-------------
+ src/xsane-scan.c | 17 ++--
+ src/xsane-setup.c | 70 +++++++--------
+ src/xsane-text.h | 1 +
+ src/xsane-viewer.c | 199 +++++++++++++++++++++++-------------------
+ src/xsane.c | 65 ++++++++------
+ 13 files changed, 478 insertions(+), 334 deletions(-)
+
+diff --git a/src/xsane-back-gtk.c b/src/xsane-back-gtk.c
+index 6ef1506..6452f4b 100644
+--- a/src/xsane-back-gtk.c
++++ b/src/xsane-back-gtk.c
+@@ -40,6 +40,7 @@ SANE_Status xsane_control_option(SANE_Handle handle, SANE_Int option, SANE_Actio
+ const SANE_Option_Descriptor *xsane_get_option_descriptor(SANE_Handle handle, SANE_Int option);
+ const char *xsane_back_gtk_unit_string(SANE_Unit unit);
+ void xsane_back_gtk_set_tooltip(GtkTooltips *tooltips, GtkWidget *widget, const gchar *desc);
++static int xsane_back_gtk_ensure_dir(const char *path);
+ int xsane_back_gtk_make_path(size_t buf_size, char *buf, const char *prog_name, const char *dir_name,
+ const char *prefix, const char *dev_name, const char *postfix, int location);
+ void xsane_back_gtk_set_option(int opt_num, void *val, SANE_Action action);
+@@ -245,11 +246,47 @@ void xsane_back_gtk_set_tooltip(GtkTooltips *tooltips, GtkWidget *widget, const
+
+ /* ----------------------------------------------------------------------------------------------------------------- */
+
++static int xsane_back_gtk_ensure_dir(const char *path)
++{
++ struct stat statbuf;
++
++ if (stat(path, &statbuf) < 0)
++ {
++ if (errno != ENOENT)
++ {
++ /* stat() failed and it wasn't because the file doesn't exist */
++ return -1;
++ }
++ else
++ {
++ /* if path doesn't exist, create directory */
++ if (mkdir(path, 0777) < 0)
++ {
++ /* mkdir() failed */
++ return -2;
++ }
++ else
++ {
++ return 0;
++ }
++ }
++ }
++
++ if (S_ISDIR(statbuf.st_mode))
++ {
++ return 0;
++ }
++
++ /* path exists and isn't a directory */
++ return -3;
++}
++
+ int xsane_back_gtk_make_path(size_t buf_size, char *buf, const char *prog_name, const char *dir_name,
+ const char *prefix, const char *dev_name, const char *postfix, int location)
+ {
+ size_t len, extra;
+ int i;
++ char msgbuf[TEXTBUFSIZE];
+
+ DBG(DBG_proc, "xsane_back_gtk_make_path\n");
+
+@@ -263,7 +300,10 @@ int xsane_back_gtk_make_path(size_t buf_size, char *buf, const char *prog_name,
+ {
+ snprintf(buf, buf_size-2, "%s", STRINGIFY(XSANE_FIXED_APPDATA_DIR));
+ }
+- mkdir(buf, 0777); /* ensure ~/.sane directory exists */
++ if (xsane_back_gtk_ensure_dir(buf))
++ {
++ goto dir_failed;
++ }
+ }
+ else if (location == XSANE_PATH_SYSTEM) /* make path to system file */
+ {
+@@ -290,7 +330,10 @@ int xsane_back_gtk_make_path(size_t buf_size, char *buf, const char *prog_name,
+ len += extra;
+
+ buf[len] = '\0';
+- mkdir(buf, 0777); /* ensure ~/.sane/PROG_NAME directory exists */
++ if (xsane_back_gtk_ensure_dir(buf))
++ {
++ goto dir_failed;
++ }
+
+ buf[len++] = SLASH; /* OS/2 does not like slash at end of mktemp-path */
+ }
+@@ -314,7 +357,10 @@ int xsane_back_gtk_make_path(size_t buf_size, char *buf, const char *prog_name,
+ buf[len++] = SLASH;
+
+ buf[len] = '\0';
+- mkdir(buf, 0777); /* ensure DIR_NAME directory exists */
++ if (xsane_back_gtk_ensure_dir(buf))
++ {
++ goto dir_failed;
++ }
+ }
+
+ if (len >= buf_size)
+@@ -454,6 +500,12 @@ filename_too_long:
+ xsane_back_gtk_error(ERR_FILENAME_TOO_LONG, FALSE);
+ errno = E2BIG;
+ return -1;
++
++dir_failed:
++ snprintf(msgbuf, sizeof(msgbuf), "%s %s.", ERR_FAILED_CREATE_ENSURE_DIR,
++ strerror(errno));
++ xsane_back_gtk_error(msgbuf, FALSE);
++ return -1;
+ }
+
+ /* ----------------------------------------------------------------------------------------------------------------- */
+@@ -784,11 +836,15 @@ gint xsane_back_gtk_decision(gchar *title, gchar **xpm_d, gchar *message, gchar
+ void xsane_back_gtk_ipc_dialog_callback(gpointer data, gint source, GdkInputCondition cond)
+ {
+ char message[TEXTBUFSIZE];
+- size_t bytes;
++ ssize_t bytes;
+
+ DBG(DBG_proc, "xsane_back_gtk_message\n");
+
+- bytes = read(xsane.ipc_pipefd[0], message, sizeof(message)-1);
++ if ((bytes = read(xsane.ipc_pipefd[0], message, sizeof(message)-1)) < 0)
++ {
++ DBG(DBG_error, "xsane_back_gtk_message(): can't read from pipe\n");
++ return;
++ }
+ message[bytes] = 0;
+
+ xsane_back_gtk_decision(ERR_HEADER_CHILD_PROCESS_ERROR, (gchar **) error_xpm, message, BUTTON_CLOSE, 0 /* no reject text */, FALSE);
+@@ -1980,7 +2036,7 @@ static void xsane_back_gtk_value_update(GtkAdjustment *adj_data, DialogElement *
+ static void xsane_back_gtk_range_display_value_right_callback(GtkAdjustment *adjust, gpointer data)
+ {
+ gchar buf[TEXTBUFSIZE];
+- int digits = (int) data;
++ int digits = GPOINTER_TO_INT(data);
+ GtkLabel *label;
+
+ snprintf(buf, sizeof(buf), "%1.*f", digits, adjust->value);
+@@ -2028,7 +2084,7 @@ void xsane_back_gtk_range_new(GtkWidget *parent, const char *name, gfloat val,
+ gtk_widget_set_size_request(value_label, 45, -1);
+ gtk_box_pack_end(GTK_BOX(hbox), value_label, FALSE, FALSE, 1);
+
+- g_signal_connect(elem->data, "value_changed", (GtkSignalFunc) xsane_back_gtk_range_display_value_right_callback, (void *) digits);
++ g_signal_connect(elem->data, "value_changed", (GtkSignalFunc) xsane_back_gtk_range_display_value_right_callback, GINT_TO_POINTER(digits));
+ gtk_object_set_data(GTK_OBJECT(elem->data), "value-label", value_label);
+ g_signal_emit_by_name(GTK_OBJECT(elem->data), "value_changed"); /* update value */
+ gtk_widget_show(value_label);
+@@ -2318,10 +2374,7 @@ static void xsane_back_gtk_text_entry_callback(GtkWidget *w, gpointer data)
+ buf[0] = '\0';
+
+ text = gtk_entry_get_text(GTK_ENTRY(elem->widget));
+- if (text)
+- {
+- strncpy(buf, text, opt->size);
+- }
++ strncpy(buf, text, opt->size);
+ buf[opt->size - 1] = '\0';
+
+ xsane_back_gtk_set_option(opt_num, buf, SANE_ACTION_SET_VALUE);
+diff --git a/src/xsane-batch-scan.c b/src/xsane-batch-scan.c
+index 90cc0e0..12eb1b2 100644
+--- a/src/xsane-batch-scan.c
++++ b/src/xsane-batch-scan.c
+@@ -291,7 +291,7 @@ int xsane_batch_scan_load_list_from_file(char *filename)
+
+ fd = open(filename, O_RDONLY);
+
+- if (fd > 0)
++ if (fd >= 0)
+ {
+ w.io.fd = fd;
+ w.io.read = read;
+@@ -396,11 +396,11 @@ static void xsane_batch_scan_save_list(void)
+ sprintf(windowname, "%s %s %s", xsane.prog_name, WINDOW_SAVE_BATCH_LIST, xsane.device_text);
+ xsane_back_gtk_make_path(sizeof(filename), filename, "xsane", "batch-lists", 0, "default", ".xbl", XSANE_PATH_LOCAL_SANE);
+
+- if (!xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, NULL, NULL, XSANE_FILE_CHOOSER_ACTION_SAVE, XSANE_GET_FILENAME_SHOW_NOTHING, XSANE_FILE_FILTER_ALL | XSANE_FILE_FILTER_BATCHLIST, XSANE_FILE_FILTER_BATCHLIST));
++ if (!xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, NULL, NULL, XSANE_FILE_CHOOSER_ACTION_SAVE, XSANE_GET_FILENAME_SHOW_NOTHING, XSANE_FILE_FILTER_ALL | XSANE_FILE_FILTER_BATCHLIST, XSANE_FILE_FILTER_BATCHLIST))
+ {
+ fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+
+- if (fd > 0)
++ if (fd >= 0)
+ {
+ w.io.fd = fd;
+ w.io.read = read;
+@@ -680,7 +680,6 @@ static GtkWidget *xsane_batch_scan_create_list_entry(Batch_Scan_Parameters *para
+ GtkWidget *list_item;
+ GtkWidget *hbox;
+ int size = 120;
+- char *data;
+
+ list_item = gtk_list_item_new();
+
+@@ -688,8 +687,6 @@ static GtkWidget *xsane_batch_scan_create_list_entry(Batch_Scan_Parameters *para
+ gtk_container_add(GTK_CONTAINER(list_item), hbox);
+ gtk_widget_show(hbox);
+
+- data = calloc(size, size);
+-
+ parameters->gtk_preview = gtk_preview_new(GTK_PREVIEW_COLOR);
+ gtk_preview_size(GTK_PREVIEW(parameters->gtk_preview), size, size);
+ gtk_box_pack_start(GTK_BOX(hbox), parameters->gtk_preview, FALSE, FALSE, 0);
+@@ -725,13 +722,17 @@ void xsane_batch_scan_add()
+
+ parameters = calloc(1, sizeof(Batch_Scan_Parameters));
+
+- if (parameters)
++ if (!parameters)
+ {
+- xsane_batch_scan_get_parameters(parameters);
+-
+- parameters->name = strdup(TEXT_BATCH_AREA_DEFAULT_NAME);
++ DBG(DBG_error, "xsane_batch_scan_add(): couldn't allocate memory for "
++ "parameters\n");
++ return;
+ }
+
++ xsane_batch_scan_get_parameters(parameters);
++
++ parameters->name = strdup(TEXT_BATCH_AREA_DEFAULT_NAME);
++
+ list_item = xsane_batch_scan_create_list_entry(parameters);
+
+ /* scroll list to end */
+@@ -796,7 +797,7 @@ static void xsane_batch_scan_rotate_mirror(GtkWidget *widget, gpointer data)
+ GList *select;
+ GtkObject *list_item;
+ Batch_Scan_Parameters *parameters = NULL;
+- int rotate_info = (int) data;
++ int rotate_info = GPOINTER_TO_INT(data);
+ int rotate, mirror;
+
+ DBG(DBG_proc, "xsane_batch_scan_rotate_mirror\n");
+@@ -834,7 +835,7 @@ static void xsane_batch_scan_rename_button_callback(GtkWidget *widget, gpointer
+ {
+ DBG(DBG_proc, "xsane_batch_scan_rename\n");
+
+- xsane_batch_scan_rename = (int) data;
++ xsane_batch_scan_rename = GPOINTER_TO_INT(data);
+ }
+
+
+@@ -881,7 +882,7 @@ static void xsane_batch_scan_rename_callback(GtkWidget *widget, gpointer data)
+ gtk_window_set_resizable(GTK_WINDOW(rename_dialog), FALSE);
+ snprintf(buf, sizeof(buf), "%s %s", xsane.prog_name, WINDOW_BATCH_RENAME);
+ gtk_window_set_title(GTK_WINDOW(rename_dialog), buf);
+- g_signal_connect(GTK_OBJECT(rename_dialog), "delete_event", (GtkSignalFunc) xsane_batch_scan_rename_button_callback,(void *) -1);
++ g_signal_connect(GTK_OBJECT(rename_dialog), "delete_event", (GtkSignalFunc) xsane_batch_scan_rename_button_callback, GINT_TO_POINTER(-1));
+ gtk_widget_show(rename_dialog);
+
+ text = gtk_entry_new();
+@@ -898,7 +899,7 @@ static void xsane_batch_scan_rename_callback(GtkWidget *widget, gpointer data)
+ #else
+ button = gtk_button_new_with_label(BUTTON_CANCEL);
+ #endif
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_batch_scan_rename_button_callback, (void *) -1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_batch_scan_rename_button_callback, GINT_TO_POINTER(-1));
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+
+@@ -909,7 +910,7 @@ static void xsane_batch_scan_rename_callback(GtkWidget *widget, gpointer data)
+ button = gtk_button_new_with_label(BUTTON_OK);
+ #endif
+ GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_batch_scan_rename_button_callback, (void *) 1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_batch_scan_rename_button_callback, GINT_TO_POINTER(1));
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
+ gtk_widget_grab_default(button);
+ gtk_widget_show(button);
+@@ -1000,11 +1001,11 @@ void xsane_create_batch_scan_dialog(const char *devicetext)
+ xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, del_batch_xpm, DESC_BATCH_DEL, (GtkSignalFunc) xsane_batch_scan_delete, NULL);
+
+ xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, ascii_xpm, DESC_BATCH_RENAME, (GtkSignalFunc) xsane_batch_scan_rename_callback, NULL);
+- xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, rotate90_xpm, DESC_ROTATE90, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, (void *) 1);
+- xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, rotate180_xpm, DESC_ROTATE180, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, (void *) 2);
+- xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, rotate270_xpm, DESC_ROTATE270, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, (void *) 3);
+- xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, mirror_x_xpm, DESC_MIRROR_X, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, (void *) 4);
+- xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, mirror_y_xpm, DESC_MIRROR_Y, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, (void *) 6);
++ xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, rotate90_xpm, DESC_ROTATE90, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, GINT_TO_POINTER(1));
++ xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, rotate180_xpm, DESC_ROTATE180, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, GINT_TO_POINTER(2));
++ xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, rotate270_xpm, DESC_ROTATE270, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, GINT_TO_POINTER(3));
++ xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, mirror_x_xpm, DESC_MIRROR_X, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, GINT_TO_POINTER(4));
++ xsane_button_new_with_pixmap(xsane.batch_scan_dialog->window, xsane.batch_scan_button_box, mirror_y_xpm, DESC_MIRROR_Y, (GtkSignalFunc) xsane_batch_scan_rotate_mirror, GINT_TO_POINTER(6));
+
+
+ /* the scolled window with the list */
+diff --git a/src/xsane-email-project.c b/src/xsane-email-project.c
+index 23fc942..413e3f7 100644
+--- a/src/xsane-email-project.c
++++ b/src/xsane-email-project.c
+@@ -895,6 +895,11 @@ static void xsane_email_project_update_project_status()
+
+ snprintf(filename, sizeof(filename), "%s/xsane-mail-list", preferences.email_project);
+ projectfile = fopen(filename, "r+b"); /* r+ = read and write, position = start of file */
++ if (!projectfile)
++ {
++ DBG(DBG_error, "Could not open project file '%s'.\n", filename);
++ return;
++ }
+
+ snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.email_status); /* fill 32 characters status line */
+ fprintf(projectfile, "%s\n", buf); /* first line is status of email */
+@@ -931,6 +936,11 @@ void xsane_email_project_save()
+ }
+
+ projectfile = fopen(filename, "wb"); /* write binary (b for win32) */
++ if (! projectfile)
++ {
++ DBG(DBG_error, "Could not open project file '%s'.\n", filename);
++ return;
++ }
+
+ if (xsane.email_status)
+ {
+@@ -1271,7 +1281,7 @@ static void xsane_email_entry_rename_button_callback(GtkWidget *widget, gpointer
+ {
+ DBG(DBG_proc, "xsane_email_entry_rename\n");
+
+- xsane_email_entry_rename = (int) data;
++ xsane_email_entry_rename = GPOINTER_TO_INT(data);
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+@@ -1322,7 +1332,7 @@ static void xsane_email_entry_rename_callback(GtkWidget *widget, gpointer list)
+ gtk_window_set_resizable(GTK_WINDOW(rename_dialog), FALSE);
+ snprintf(filename, sizeof(filename), "%s %s", xsane.prog_name, WINDOW_EMAIL_RENAME);
+ gtk_window_set_title(GTK_WINDOW(rename_dialog), filename);
+- g_signal_connect(GTK_OBJECT(rename_dialog), "delete_event", (GtkSignalFunc) xsane_email_entry_rename_button_callback, (void *) -1);
++ g_signal_connect(GTK_OBJECT(rename_dialog), "delete_event", (GtkSignalFunc) xsane_email_entry_rename_button_callback, GINT_TO_POINTER(-1));
+ gtk_widget_show(rename_dialog);
+
+ text = gtk_entry_new();
+@@ -1339,7 +1349,7 @@ static void xsane_email_entry_rename_callback(GtkWidget *widget, gpointer list)
+ #else
+ button = gtk_button_new_with_label(BUTTON_CANCEL);
+ #endif
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_email_entry_rename_button_callback,(void *) -1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_email_entry_rename_button_callback, GINT_TO_POINTER(-1));
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+
+@@ -1348,7 +1358,7 @@ static void xsane_email_entry_rename_callback(GtkWidget *widget, gpointer list)
+ #else
+ button = gtk_button_new_with_label(BUTTON_OK);
+ #endif
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_email_entry_rename_button_callback, (void *) 1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_email_entry_rename_button_callback, GINT_TO_POINTER(1));
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+
+@@ -1526,6 +1536,11 @@ static void xsane_create_email(int fd)
+ {
+ DBG(DBG_error, "could not open email project file %s\n", filename);
+
++ if (projectfile)
++ {
++ fclose(projectfile);
++ }
++
+ if (xsane.email_status)
+ {
+ free(xsane.email_status);
+@@ -1766,7 +1781,7 @@ static void xsane_create_email(int fd)
+
+ static void xsane_email_send_process()
+ {
+- int fd_socket;
++ int fd_socket = -1;
+ int status;
+ char *password;
+ int i;
+@@ -1787,36 +1802,20 @@ static void xsane_email_send_process()
+
+ if (fd_socket < 0) /* could not open socket */
+ {
+- if (xsane.email_status)
+- {
+- free(xsane.email_status);
+- }
+ xsane.email_status = strdup(TEXT_EMAIL_STATUS_POP3_CONNECTION_FAILED);
+- xsane.email_progress_val = 0.0;
+- xsane_front_gtk_email_project_update_lockfile_status();
+-
+- free(password);
+-
+- return;
++ status = -1;
++ goto out;
+ }
+
+ status = pop3_login(fd_socket, preferences.email_auth_user, password);
+
+ close(fd_socket);
++ fd_socket = -1;
+
+ if (status == -1)
+ {
+- if (xsane.email_status)
+- {
+- free(xsane.email_status);
+- }
+ xsane.email_status = strdup(TEXT_EMAIL_STATUS_POP3_LOGIN_FAILED);
+- xsane.email_progress_val = 0.0;
+- xsane_front_gtk_email_project_update_lockfile_status();
+-
+- free(password);
+-
+- return;
++ goto out;
+ }
+
+ DBG(DBG_info, "POP3 authentication done\n");
+@@ -1829,17 +1828,9 @@ static void xsane_email_send_process()
+
+ if (fd_socket < 0) /* could not open socket */
+ {
+- if (xsane.email_status)
+- {
+- free(xsane.email_status);
+- }
+ xsane.email_status = strdup(TEXT_EMAIL_STATUS_SMTP_CONNECTION_FAILED);
+- xsane.email_progress_val = 0.0;
+- xsane_front_gtk_email_project_update_lockfile_status();
+-
+- free(password);
+-
+- return;
++ status = -1;
++ goto out;
+ }
+
+
+@@ -1847,7 +1838,8 @@ static void xsane_email_send_process()
+ preferences.email_authentication, preferences.email_auth_user, password);
+ if (status == -1)
+ {
+- return;
++ xsane.email_status = strdup(TEXT_EMAIL_STATUS_SMTP_ERR_DATA);
++ goto out;
+ }
+
+
+@@ -1855,19 +1847,30 @@ static void xsane_email_send_process()
+
+ write_smtp_footer(fd_socket);
+
+- close(fd_socket);
++out:
++ if (fd_socket >= 0)
++ {
++ close(fd_socket);
++ }
+
+ if (xsane.email_status)
+ {
+ free(xsane.email_status);
+ }
+- xsane.email_status = strdup(TEXT_EMAIL_STATUS_SENT);
+- xsane.email_progress_val = 1.0;
++ if (status != -1)
++ {
++ xsane.email_status = strdup(TEXT_EMAIL_STATUS_SENT);
++ xsane.email_progress_val = 1.0;
++ }
++ else
++ {
++ xsane.email_progress_val = 0.0;
++ }
+ xsane_front_gtk_email_project_update_lockfile_status();
+
+ free(password);
+
+- _exit(0);
++ _exit(status);
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+diff --git a/src/xsane-fax-project.c b/src/xsane-fax-project.c
+index 5750b55..c08af59 100644
+--- a/src/xsane-fax-project.c
++++ b/src/xsane-fax-project.c
+@@ -452,6 +452,12 @@ static void xsane_fax_project_update_project_status()
+ snprintf(filename, sizeof(filename), "%s/xsane-fax-list", preferences.fax_project);
+ projectfile = fopen(filename, "r+b"); /* r+ = read and write, position = start of file */
+
++ if (! projectfile)
++ {
++ DBG(DBG_error, "Could not open project file '%s'.\n", filename);
++ return;
++ }
++
+ snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.fax_status); /* fill 32 characters status line */
+ fprintf(projectfile, "%s\n", buf); /* first line is status of mail */
+
+@@ -754,7 +760,7 @@ static void xsane_fax_entry_rename_button_callback(GtkWidget *widget, gpointer d
+ {
+ DBG(DBG_proc, "xsane_fax_entry_rename\n");
+
+- xsane_fax_entry_rename = (int) data;
++ xsane_fax_entry_rename = GPOINTER_TO_INT(data);
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+@@ -805,7 +811,7 @@ static void xsane_fax_entry_rename_callback(GtkWidget *widget, gpointer list)
+ gtk_window_set_resizable(GTK_WINDOW(rename_dialog), FALSE);
+ snprintf(filename, sizeof(filename), "%s %s", xsane.prog_name, WINDOW_FAX_RENAME);
+ gtk_window_set_title(GTK_WINDOW(rename_dialog), filename);
+- g_signal_connect(GTK_OBJECT(rename_dialog), "delete_event", (GtkSignalFunc) xsane_fax_entry_rename_button_callback,(void *) -1);
++ g_signal_connect(GTK_OBJECT(rename_dialog), "delete_event", (GtkSignalFunc) xsane_fax_entry_rename_button_callback, GINT_TO_POINTER(-1));
+ gtk_widget_show(rename_dialog);
+
+ text = gtk_entry_new();
+@@ -822,7 +828,7 @@ static void xsane_fax_entry_rename_callback(GtkWidget *widget, gpointer list)
+ #else
+ button = gtk_button_new_with_label(BUTTON_CANCEL);
+ #endif
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_fax_entry_rename_button_callback, (void *) -1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_fax_entry_rename_button_callback, GINT_TO_POINTER(-1));
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+
+@@ -832,7 +838,7 @@ static void xsane_fax_entry_rename_callback(GtkWidget *widget, gpointer list)
+ #else
+ button = gtk_button_new_with_label(BUTTON_OK);
+ #endif
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_fax_entry_rename_button_callback, (void *) 1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_fax_entry_rename_button_callback, GINT_TO_POINTER(1));
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+
+diff --git a/src/xsane-front-gtk.c b/src/xsane-front-gtk.c
+index 7bb49b0..84452f2 100644
+--- a/src/xsane-front-gtk.c
++++ b/src/xsane-front-gtk.c
+@@ -598,7 +598,7 @@ gint xsane_authorization_callback(SANE_String_Const resource,
+ authorize_dialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_position(GTK_WINDOW(authorize_dialog), GTK_WIN_POS_CENTER);
+ gtk_window_set_resizable(GTK_WINDOW(authorize_dialog), FALSE);
+- g_signal_connect(GTK_OBJECT(authorize_dialog), "delete_event", GTK_SIGNAL_FUNC(xsane_authorization_button_callback), (void *) -1); /* -1 = cancel */
++ g_signal_connect(GTK_OBJECT(authorize_dialog), "delete_event", GTK_SIGNAL_FUNC(xsane_authorization_button_callback), GINT_TO_POINTER(-1)); /* -1 = cancel */
+ snprintf(buf, sizeof(buf), "%s %s", xsane.prog_name, WINDOW_AUTHORIZE);
+ gtk_window_set_title(GTK_WINDOW(authorize_dialog), buf);
+ xsane_set_window_icon(authorize_dialog, 0);
+@@ -667,7 +667,7 @@ gint xsane_authorization_callback(SANE_String_Const resource,
+ #else
+ button = gtk_button_new_with_label(BUTTON_CANCEL);
+ #endif
+- g_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(xsane_authorization_button_callback), (void *) -1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(xsane_authorization_button_callback), GINT_TO_POINTER(-1));
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 10); /* x-space around cancel-button */
+ gtk_widget_show(button);
+
+@@ -677,7 +677,7 @@ gint xsane_authorization_callback(SANE_String_Const resource,
+ button = gtk_button_new_with_label(BUTTON_OK);
+ #endif
+ GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
+- g_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(xsane_authorization_button_callback), (void *) 1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(xsane_authorization_button_callback), GINT_TO_POINTER(1));
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 10); /* x-space around OK-button */
+ gtk_widget_grab_default(button);
+ gtk_widget_show(button);
+@@ -1107,7 +1107,7 @@ void xsane_option_menu_new_with_pixmap(GdkWindow *window, GtkBox *parent, const
+ static void xsane_range_display_value_right_callback(GtkAdjustment *adjust, gpointer data)
+ {
+ gchar buf[TEXTBUFSIZE];
+- int digits = (int) data;
++ int digits = GPOINTER_TO_INT(data);
+ GtkLabel *label;
+
+ snprintf(buf, sizeof(buf), "%1.*f", digits, adjust->value);
+@@ -1144,7 +1144,7 @@ void xsane_range_new(GtkBox *parent, char *labeltext, const char *desc,
+ gtk_widget_set_size_request(value_label, 35, -1);
+ gtk_box_pack_end(GTK_BOX(hbox), value_label, FALSE, FALSE, 1);
+
+- g_signal_connect(*data, "value_changed", (GtkSignalFunc) xsane_range_display_value_right_callback, (void *) digits);
++ g_signal_connect(*data, "value_changed", (GtkSignalFunc) xsane_range_display_value_right_callback, GINT_TO_POINTER(digits));
+ gtk_object_set_data(GTK_OBJECT(*data), "value-label", value_label);
+ g_signal_emit_by_name(GTK_OBJECT(*data), "value_changed"); /* update value */
+ gtk_widget_show(value_label);
+@@ -1236,7 +1236,7 @@ void xsane_range_new_with_pixmap(GdkWindow *window, GtkBox *parent, const char *
+ gtk_widget_set_size_request(value_label, 35, -1);
+ gtk_box_pack_end(GTK_BOX(hbox), value_label, FALSE, FALSE, 1);
+
+- g_signal_connect(*data, "value_changed", (GtkSignalFunc) xsane_range_display_value_right_callback, (void *) digits);
++ g_signal_connect(*data, "value_changed", (GtkSignalFunc) xsane_range_display_value_right_callback, GINT_TO_POINTER(digits));
+ gtk_object_set_data(GTK_OBJECT(*data), "value-label", value_label);
+ g_signal_emit_by_name(GTK_OBJECT(*data), "value_changed"); /* update value */
+ gtk_widget_show(value_label);
+@@ -1383,7 +1383,7 @@ static void xsane_filename_counter_step_callback(GtkWidget *widget, gpointer dat
+ {
+ DBG(DBG_proc, "xsane_filename_counter_step_callback\n");
+
+- preferences.filename_counter_step = (int) data;
++ preferences.filename_counter_step = GPOINTER_TO_INT(data);
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+@@ -1528,7 +1528,7 @@ void xsane_outputfilename_new(GtkWidget *vbox)
+ snprintf(buf, sizeof(buf), "%+d", j);
+ xsane_filename_counter_step_item = gtk_menu_item_new_with_label(buf);
+ gtk_container_add(GTK_CONTAINER(xsane_filename_counter_step_menu), xsane_filename_counter_step_item);
+- g_signal_connect(GTK_OBJECT(xsane_filename_counter_step_item), "activate", (GtkSignalFunc) xsane_filename_counter_step_callback, (void *) j);
++ g_signal_connect(GTK_OBJECT(xsane_filename_counter_step_item), "activate", (GtkSignalFunc) xsane_filename_counter_step_callback, GINT_TO_POINTER(j));
+ gtk_widget_show(xsane_filename_counter_step_item);
+ if (preferences.filename_counter_step == j++)
+ {
+@@ -1895,7 +1895,7 @@ static GtkWidget *eula_dialog = NULL;
+
+ static gboolean xsane_eula_delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
+ {
+- eula_accept_flag = (int) data;
++ eula_accept_flag = GPOINTER_TO_INT(data);
+
+ DBG(DBG_proc ,"xsane_eula_delete_event(%d)\n", eula_accept_flag);
+ eula_dialog = NULL;
+@@ -1907,7 +1907,7 @@ static gboolean xsane_eula_delete_event(GtkWidget *widget, GdkEvent *event, gpoi
+
+ static void xsane_eula_button_callback(GtkWidget *widget, gpointer data)
+ {
+- eula_accept_flag = (int) data;
++ eula_accept_flag = GPOINTER_TO_INT(data);
+
+ DBG(DBG_proc ,"xsane_eula_button_callback(%d)\n", eula_accept_flag);
+
+@@ -1937,7 +1937,7 @@ int xsane_display_eula(int ask_for_accept)
+ gtk_widget_set_size_request(eula_dialog, 550, 580);
+ gtk_window_set_position(GTK_WINDOW(eula_dialog), GTK_WIN_POS_CENTER);
+ gtk_window_set_resizable(GTK_WINDOW(eula_dialog), TRUE);
+- g_signal_connect(GTK_OBJECT(eula_dialog), "delete_event", GTK_SIGNAL_FUNC(xsane_eula_delete_event), (void *) -1); /* -1 = cancel */
++ g_signal_connect(GTK_OBJECT(eula_dialog), "delete_event", GTK_SIGNAL_FUNC(xsane_eula_delete_event), GINT_TO_POINTER(-1)); /* -1 = cancel */
+ snprintf(buf, sizeof(buf), "%s %s", xsane.prog_name, WINDOW_EULA);
+ gtk_window_set_title(GTK_WINDOW(eula_dialog), buf);
+ accelerator_group = gtk_accel_group_new();
+@@ -2090,13 +2090,13 @@ int xsane_display_eula(int ask_for_accept)
+ button = gtk_button_new_with_label(BUTTON_NOT_ACCEPT);
+ gtk_widget_add_accelerator(button, "clicked", accelerator_group, GDK_Escape, 0, DEF_GTK_ACCEL_LOCKED);
+ GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_eula_button_callback, (void *) 1 /* not accept */);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_eula_button_callback, GINT_TO_POINTER(1) /* not accept */);
+ gtk_container_add(GTK_CONTAINER(hbox), button);
+ gtk_widget_grab_default(button);
+ gtk_widget_show(button);
+
+ button = gtk_button_new_with_label(BUTTON_ACCEPT);
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_eula_button_callback, (void *) 0 /* accept */);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_eula_button_callback, GINT_TO_POINTER(0) /* accept */);
+ gtk_container_add(GTK_CONTAINER(hbox), button);
+ gtk_widget_show(button);
+ }
+@@ -2109,7 +2109,7 @@ int xsane_display_eula(int ask_for_accept)
+ #endif
+ gtk_widget_add_accelerator(button, "clicked", accelerator_group, GDK_Escape, 0, DEF_GTK_ACCEL_LOCKED);
+ GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_eula_button_callback, (void *) 0 /* ok = accept */);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_eula_button_callback, GINT_TO_POINTER(0) /* ok = accept */);
+ gtk_container_add(GTK_CONTAINER(hbox), button);
+ gtk_widget_grab_default(button);
+ gtk_widget_show(button);
+@@ -2336,7 +2336,7 @@ void xsane_display_gpl(void)
+ #endif
+ gtk_widget_add_accelerator(button, "clicked", accelerator_group, GDK_Escape, 0, DEF_GTK_ACCEL_LOCKED);
+ GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_close_license_dialog_callback, (void *) 0 /* ok = accept */);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_close_license_dialog_callback, GINT_TO_POINTER(0) /* ok = accept */);
+ gtk_container_add(GTK_CONTAINER(hbox), button);
+ gtk_widget_grab_default(button);
+ gtk_widget_show(button);
+@@ -2414,7 +2414,7 @@ static void xsane_front_gtk_getname_button_callback(GtkWidget *widget, gpointer
+ {
+ DBG(DBG_proc, "xsane_front_gtk_getname_button_callback\n");
+
+- xsane_front_gtk_getname_button = (int) data;
++ xsane_front_gtk_getname_button = GPOINTER_TO_INT(data);
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+@@ -2438,7 +2438,7 @@ int xsane_front_gtk_getname_dialog(const char *dialog_title, const char *desc_te
+ gtk_window_set_resizable(GTK_WINDOW(getname_dialog), FALSE);
+ snprintf(buf, sizeof(buf), "%s %s", xsane.prog_name, dialog_title);
+ gtk_window_set_title(GTK_WINDOW(getname_dialog), buf);
+- g_signal_connect(GTK_OBJECT(getname_dialog), "delete_event", (GtkSignalFunc) xsane_front_gtk_getname_button_callback, (void *) -1);
++ g_signal_connect(GTK_OBJECT(getname_dialog), "delete_event", (GtkSignalFunc) xsane_front_gtk_getname_button_callback, GINT_TO_POINTER(-1));
+ gtk_widget_show(getname_dialog);
+
+ /* set the main vbox */
+@@ -2469,7 +2469,7 @@ int xsane_front_gtk_getname_dialog(const char *dialog_title, const char *desc_te
+ #else
+ button = gtk_button_new_with_label(BUTTON_CANCEL);
+ #endif
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_front_gtk_getname_button_callback, (void *) -1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_front_gtk_getname_button_callback, GINT_TO_POINTER(-1));
+ gtk_widget_add_accelerator(button, "clicked", accelerator_group, GDK_Escape, 0, DEF_GTK_ACCEL_LOCKED); /* ESC */
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+@@ -2479,7 +2479,7 @@ int xsane_front_gtk_getname_dialog(const char *dialog_title, const char *desc_te
+ #else
+ button = gtk_button_new_with_label(BUTTON_OK);
+ #endif
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_front_gtk_getname_button_callback, (void *) 1);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_front_gtk_getname_button_callback, GINT_TO_POINTER(1));
+ GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+@@ -2580,9 +2580,9 @@ void xsane_front_gtk_email_project_update_lockfile_status()
+ {
+ fprintf(lockfile, "%s\n", xsane.email_status); /* first line is status of mail */
+ fprintf(lockfile, "%3d\n", (int) (xsane.email_progress_val * 100));
+- }
+
+- fclose(lockfile);
++ fclose(lockfile);
++ }
+ }
+ #endif
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+diff --git a/src/xsane-multipage-project.c b/src/xsane-multipage-project.c
+index f23e5f8..af3c6cc 100644
+--- a/src/xsane-multipage-project.c
++++ b/src/xsane-multipage-project.c
+@@ -517,6 +517,11 @@ void xsane_multipage_project_save()
+ }
+
+ projectfile = fopen(filename, "wb"); /* write binary (b for win32) */
++ if (!projectfile)
++ {
++ DBG(DBG_error, "Could not open project file '%s'.\n", filename);
++ return;
++ }
+
+ if (xsane.multipage_status)
+ {
+diff --git a/src/xsane-preview.c b/src/xsane-preview.c
+index 6eaf687..ef26098 100644
+--- a/src/xsane-preview.c
++++ b/src/xsane-preview.c
+@@ -4112,7 +4112,7 @@ static void preview_create_preset_area_menu(Preview *p, int selection)
+ gtk_container_add(GTK_CONTAINER(preset_area_menu), preset_area_item);
+ g_signal_connect(GTK_OBJECT(preset_area_item), "button_press_event", (GtkSignalFunc) preview_preset_area_context_menu_callback, p);
+ g_signal_connect(GTK_OBJECT(preset_area_item), "activate", (GtkSignalFunc) preview_preset_area_callback, p);
+- gtk_object_set_data(GTK_OBJECT(preset_area_item), "Selection", (void *) i);
++ gtk_object_set_data(GTK_OBJECT(preset_area_item), "Selection", GINT_TO_POINTER(i));
+ gtk_object_set_data(GTK_OBJECT(preset_area_item), "Preview", (void *) p);
+
+ gtk_widget_show(preset_area_item);
+@@ -4468,7 +4468,7 @@ Preview *preview_new(void)
+ rotation_item = gtk_menu_item_new_with_label(buf);
+ gtk_container_add(GTK_CONTAINER(rotation_menu), rotation_item);
+ g_signal_connect(GTK_OBJECT(rotation_item), "activate", (GtkSignalFunc) preview_rotation_callback, p);
+- gtk_object_set_data(GTK_OBJECT(rotation_item), "Selection", (void *) rot);
++ gtk_object_set_data(GTK_OBJECT(rotation_item), "Selection", GINT_TO_POINTER(rot));
+
+ gtk_widget_show(rotation_item);
+ }
+@@ -5145,11 +5145,11 @@ static void preview_save_image_file(Preview *p, FILE *out)
+ /* always save it as a 16 bit PPM image: */
+ fprintf(out, "P6\n"
+ "# surface: %g %g %g %g %u %u\n"
+- "# time: %d\n"
++ "# time: %ld\n"
+ "%d %d\n65535\n",
+ dsurface[0], dsurface[1], dsurface[2], dsurface[3],
+ p->surface_type, p->surface_unit,
+- (int) time(NULL),
++ (long) time(NULL),
+ p->image_width, p->image_height);
+
+ fwrite(p->image_data_raw, 6, p->image_width*p->image_height, out);
+@@ -5711,14 +5711,14 @@ static gint preview_preset_area_rename_callback(GtkWidget *widget, GtkWidget *pr
+
+ DBG(DBG_proc, "preview_preset_area_rename_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection"));
+ p = (Preview *) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Preview");
+
+ DBG(DBG_info ,"rename %s\n", preferences.preset_area[selection]->name);
+
+ /* set menu in correct state, is a bit strange this way but I do not have a better idea */
+ old_preset_area_menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(p->preset_area_option_menu));
+- old_selection = (int) gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection");
++ old_selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection"));
+ gtk_menu_popdown(GTK_MENU(old_preset_area_menu));
+ gtk_option_menu_set_history(GTK_OPTION_MENU(p->preset_area_option_menu), old_selection);
+
+@@ -5761,12 +5761,12 @@ static gint preview_preset_area_add_callback(GtkWidget *widget, GtkWidget *prese
+
+ DBG(DBG_proc, "preview_preset_area_add_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection"));
+ p = (Preview *) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Preview");
+
+ /* set menu in correct state, is a bit strange this way but I do not have a better idea */
+ old_preset_area_menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(p->preset_area_option_menu));
+- old_selection = (int) gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection");
++ old_selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection"));
+ gtk_menu_popdown(GTK_MENU(old_preset_area_menu));
+ gtk_option_menu_set_history(GTK_OPTION_MENU(p->preset_area_option_menu), old_selection);
+
+@@ -5812,7 +5812,7 @@ static gint preview_preset_area_delete_callback(GtkWidget *widget, GtkWidget *pr
+
+ DBG(DBG_proc, "preview_preset_area_delete_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection"));
+ p = (Preview *) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Preview");
+
+
+@@ -5832,7 +5832,7 @@ static gint preview_preset_area_delete_callback(GtkWidget *widget, GtkWidget *pr
+ old_preset_area_menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(p->preset_area_option_menu));
+
+ gtk_option_menu_remove_menu(GTK_OPTION_MENU(p->preset_area_option_menu));
+- old_selection = (int) gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection");
++ old_selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection"));
+
+ if (old_selection == selection) /* we are deleting the selected surface */
+ {
+@@ -5861,7 +5861,7 @@ static gint preview_preset_area_move_up_callback(GtkWidget *widget, GtkWidget *p
+
+ DBG(DBG_proc, "preview_preset_area_move_up_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection"));
+ p = (Preview *) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Preview");
+
+ if (selection > 1) /* make sure "full area" stays at top */
+@@ -5877,7 +5877,7 @@ static gint preview_preset_area_move_up_callback(GtkWidget *widget, GtkWidget *p
+ old_preset_area_menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(p->preset_area_option_menu));
+
+ gtk_option_menu_remove_menu(GTK_OPTION_MENU(p->preset_area_option_menu));
+- old_selection = (int) gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection");
++ old_selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection"));
+
+ if (old_selection == selection)
+ {
+@@ -5906,7 +5906,7 @@ static gint preview_preset_area_move_down_callback(GtkWidget *widget, GtkWidget
+
+ DBG(DBG_proc, "preview_preset_area_move_down_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Selection"));
+ p = (Preview *) gtk_object_get_data(GTK_OBJECT(preset_area_widget), "Preview");
+
+ /* full size can not moved down */
+@@ -5923,7 +5923,7 @@ static gint preview_preset_area_move_down_callback(GtkWidget *widget, GtkWidget
+ old_preset_area_menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(p->preset_area_option_menu));
+
+ gtk_option_menu_remove_menu(GTK_OPTION_MENU(p->preset_area_option_menu));
+- old_selection = (int) gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection");
++ old_selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_preset_area_menu))), "Selection"));
+
+ if (old_selection == selection)
+ {
+@@ -5954,7 +5954,7 @@ static gint preview_preset_area_context_menu_callback(GtkWidget *widget, GdkEven
+
+ DBG(DBG_proc, "preview_preset_area_context_menu_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget), "Selection"));
+
+ if (event->type == GDK_BUTTON_PRESS)
+ {
+@@ -6031,7 +6031,7 @@ static void preview_preset_area_callback(GtkWidget *widget, gpointer data)
+
+ DBG(DBG_proc, "preview_preset_area_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget), "Selection"));
+
+ p->preset_surface[0] = preferences.preset_area[selection]->xoffset;
+ p->preset_surface[1] = preferences.preset_area[selection]->yoffset;
+@@ -6055,7 +6055,7 @@ static void preview_rotation_callback(GtkWidget *widget, gpointer data)
+
+ DBG(DBG_proc, "preview_rotation_callback\n");
+
+- rot = (int) gtk_object_get_data(GTK_OBJECT(widget), "Selection");
++ rot = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget), "Selection"));
+
+ switch (rot)
+ {
+diff --git a/src/xsane-save.c b/src/xsane-save.c
+index 2d0e44b..31825d8 100644
+--- a/src/xsane-save.c
++++ b/src/xsane-save.c
+@@ -28,6 +28,8 @@
+ #include "xsane-save.h"
+ #include <time.h>
+ #include <sys/wait.h>
++#include <string.h>
++#include <errno.h>
+
+ #include <glib.h>
+
+@@ -138,7 +140,7 @@ int xsane_create_secure_file(const char *filename)
+ fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0666);
+ umask(XSANE_DEFAULT_UMASK); /* define new file permissions */
+
+- if (fd > 0)
++ if (fd >= 0)
+ {
+ DBG(DBG_info, "file %s is created and secure\n", filename);
+ close(fd);
+@@ -261,22 +263,27 @@ int xsane_get_filesize(char *filename)
+ {
+ FILE *infile;
+ int pos;
+- int size;
++ int size = -1;
+
+ infile = fopen(filename, "rb"); /* read binary (b for win32) */
+ if (infile == NULL)
+ {
+- return 0;
++ return 0;
+ }
+
+- pos = ftell(infile);
++ if ((pos = ftell(infile)) < 0)
++ {
++ DBG(DBG_error, "xsane_get_filesize(): can't get file position\n");
++ goto out;
++ }
+ fseek(infile, 0, SEEK_END); /* get size */
+ size = ftell(infile);
+ fseek(infile, pos, SEEK_SET); /* go to previous position */
+
++out:
+ fclose(infile);
+
+- return size;
++ return size;
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+@@ -959,7 +966,8 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio
+ int xsane_save_grayscale_image_as_lineart(FILE *outfile, FILE *imagefile, Image_info *image_info, GtkProgressBar *progress_bar, int *cancel_save)
+ {
+ int x, y, bit;
+- u_char bitval, packed;
++ int bitval;
++ u_char packed;
+
+ *cancel_save = 0;
+
+@@ -1107,7 +1115,7 @@ int xsane_save_scaled_image(FILE *outfile, FILE *imagefile, Image_info *image_in
+ y_factor = 1.0;
+ y = 0.0;
+
+- while (y < original_image_height)
++ do
+ {
+ DBG(DBG_info2, "xsane_save_scaled_image: original line %d, new line %d\n", (int) y, y_new);
+
+@@ -1233,6 +1241,7 @@ int xsane_save_scaled_image(FILE *outfile, FILE *imagefile, Image_info *image_in
+ y += y_factor;
+ read_line = (oldy != (int) y);
+ }
++ while (y < original_image_height);
+
+ if (read_line) /* we have to write one more line */
+ {
+@@ -3784,7 +3793,8 @@ int xsane_save_ps(FILE *outfile, FILE *imagefile, Image_info *image_info, float
+ static int xsane_embed_pdf_icm_profile(FILE *outfile, struct pdf_xref *xref, char *icm_filename, int flatedecode, int icc_object)
+ {
+ FILE *icm_profile;
+- size_t size, embed_len;
++ ssize_t size;
++ size_t embed_len;
+ unsigned char *embed_buffer;
+ int ret;
+
+@@ -3798,7 +3808,12 @@ static int xsane_embed_pdf_icm_profile(FILE *outfile, struct pdf_xref *xref, cha
+ }
+
+ fseek(icm_profile, 0, SEEK_END);
+- size = ftell(icm_profile);
++ if ((size = ftell(icm_profile)) < 0)
++ {
++ DBG(DBG_error, "Could not determine size of ICM profile file.");
++ fclose(icm_profile);
++ return -1;
++ }
+ fseek(icm_profile, 0, SEEK_SET);
+
+ embed_buffer = malloc(size + 1);
+@@ -4374,7 +4389,8 @@ static void xsane_jpeg_write_icm_profile(j_compress_ptr cinfo_ptr, const JOCTET
+ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const char *icm_filename)
+ {
+ FILE *icm_profile;
+- size_t size, embed_len;
++ ssize_t size;
++ size_t embed_len;
+ cmsUInt8Number *embed_buffer;
+
+ DBG(DBG_proc, "xsane_jpeg_embed_scanner_icm_profile(%s)\n", icm_filename);
+@@ -4385,15 +4401,19 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const
+ return;
+ }
+
+- fseek(icm_profile, 0, SEEK_END);
+- size = ftell(icm_profile);
+- fseek(icm_profile, 0, SEEK_SET);
++ if ((fseek(icm_profile, 0, SEEK_END) < 0) ||
++ ((size = ftell(icm_profile)) < 0) ||
++ (fseek(icm_profile, 0, SEEK_SET) < 0))
++ {
++ DBG(DBG_error, "Can't determine size of ICM profile file '%s': '%s'",
++ icm_filename, strerror(errno));
++ goto out;
++ }
+
+ embed_buffer = (cmsUInt8Number *) malloc(size + 1);
+ if (embed_buffer)
+ {
+ embed_len = fread(embed_buffer, 1, size, icm_profile);
+- fclose(icm_profile);
+ embed_buffer[embed_len] = 0;
+
+ xsane_jpeg_write_icm_profile(cinfo_ptr, embed_buffer, embed_len);
+@@ -4401,6 +4421,9 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const
+
+ DBG(DBG_info, "ICM profile %s has been embedded to jpeg file\n", icm_filename);
+ }
++
++out:
++ fclose(icm_profile);
+ }
+ #endif
+
+@@ -4606,15 +4629,20 @@ int xsane_save_jpeg(FILE *outfile, int quality, FILE *imagefile, Image_info *ima
+ static void xsane_tiff_embed_scanner_icm_profile(TIFF *tiffile, const char *icm_filename)
+ {
+ FILE *icm_profile;
+- size_t size;
++ ssize_t size;
+ char *icm_profile_buffer;
+
+ DBG(DBG_proc, "xsane_tiff_embed_scanner_icm_profile(%s)\n", icm_filename);
+ if((icm_profile = fopen(icm_filename, "rb")))
+ {
+- fseek(icm_profile, 0, SEEK_END);
+- size = ftell(icm_profile);
+- fseek(icm_profile, 0, SEEK_SET);
++ if ((fseek(icm_profile, 0, SEEK_END) < 0) ||
++ ((size = ftell(icm_profile)) < 0) ||
++ (fseek(icm_profile, 0, SEEK_SET) < 0))
++ {
++ DBG(DBG_error, "Can't determine size of ICM profile file '%s': '%s'",
++ icm_filename, strerror(errno));
++ goto out;
++ }
+
+ icm_profile_buffer = (char *) malloc(size + 1);
+
+@@ -4638,7 +4666,7 @@ static void xsane_tiff_embed_scanner_icm_profile(TIFF *tiffile, const char *icm_
+ DBG(DBG_error, "Can not get enogh memory for ICM profile\n");
+ }
+
+-
++out:
+ fclose(icm_profile);
+ }
+ else
+@@ -4869,17 +4897,22 @@ int xsane_save_tiff_page(TIFF *tiffile, int page, int pages, int quality, FILE *
+ static void xsane_png_embed_scanner_icm_profile(png_structp png_ptr, png_infop png_info_ptr, const char *icm_filename)
+ {
+ FILE *icm_profile;
+- gchar *profile_buffer;
+- size_t size;
++ guchar *profile_buffer;
++ ssize_t size;
+
+ DBG(DBG_proc, "xsane_png_embed_scanner_icm_profile(%s)\n", icm_filename);
+ icm_profile = fopen(icm_filename, "rb");
+
+ if (icm_profile)
+ {
+- fseek(icm_profile, 0, SEEK_END);
+- size = ftell(icm_profile);
+- fseek(icm_profile, 0, SEEK_SET);
++ if ((fseek(icm_profile, 0, SEEK_END) < 0) ||
++ ((size = ftell(icm_profile)) < 0) ||
++ (fseek(icm_profile, 0, SEEK_SET) < 0))
++ {
++ DBG(DBG_error, "Can't determine size of ICM profile file '%s': '%s'",
++ icm_filename, strerror(errno));
++ goto out;
++ }
+
+ profile_buffer = malloc(size);
+
+@@ -4901,6 +4934,7 @@ static void xsane_png_embed_scanner_icm_profile(png_structp png_ptr, png_infop p
+ DBG(DBG_error, "can not allocate profile_buffer\n");
+ }
+
++out:
+ fclose(icm_profile);
+ }
+ else
+@@ -5416,7 +5450,7 @@ static int xsane_save_pnm_16_ascii_color(FILE *outfile, FILE *imagefile, Image_i
+ *cancel_save = 0;
+
+
+- data = malloc(image_info->image_width * 6);
++ data = malloc((guint32)image_info->image_width * 6);
+
+ if (!data)
+ {
+@@ -5432,7 +5466,7 @@ static int xsane_save_pnm_16_ascii_color(FILE *outfile, FILE *imagefile, Image_i
+ {
+ DBG(DBG_info, "Doing CMS color conversion\n");
+
+- data_raw = malloc(image_info->image_width * 6);
++ data_raw = malloc((guint32)image_info->image_width * 6);
+
+ if (!data_raw)
+ {
+@@ -5622,7 +5656,7 @@ static int xsane_save_pnm_16_binary_color(FILE *outfile, FILE *imagefile, Image_
+
+ *cancel_save = 0;
+
+- data = malloc(image_info->image_width * 6);
++ data = malloc((guint32)image_info->image_width * 6);
+
+ if (!data)
+ {
+@@ -5638,7 +5672,7 @@ static int xsane_save_pnm_16_binary_color(FILE *outfile, FILE *imagefile, Image_
+ {
+ DBG(DBG_info, "Doing CMS color conversion\n");
+
+- data_raw = malloc(image_info->image_width * 6);
++ data_raw = malloc((guint32)image_info->image_width * 6);
+
+ if (!data_raw)
+ {
+@@ -6159,6 +6193,8 @@ int xsane_save_image_as_text(char *output_filename, char *input_filename, GtkPro
+
+ gtk_progress_set_format_string(GTK_PROGRESS(progress_bar), "");
+ xsane_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress_bar), 0.0);
++
++ fclose(ocr_progress); /* close reading end of pipe */
+ }
+ else /* no pipe available */
+ {
+@@ -6178,11 +6214,6 @@ int xsane_save_image_as_text(char *output_filename, char *input_filename, GtkPro
+ }
+ }
+ }
+-
+- if (pipefd[0])
+- {
+- fclose(ocr_progress); /* close reading end of pipe */
+- }
+
+ return (*cancel_save);
+ }
+@@ -6784,11 +6815,12 @@ int xsane_transfer_to_gimp(char *input_filename, int apply_ICM_profile, int cms_
+ unsigned tile_offset;
+ int i, x, y;
+ Image_info image_info;
+- FILE *imagefile;
++ FILE *imagefile = NULL;
+ int bytes;
+ unsigned char *data = NULL;
+ guint16 *data16 = NULL;
+ size_t bytes_read;
++ int retval = 0;
+ #ifdef HAVE_LIBLCMS
+ unsigned char *data_raw = NULL;
+ cmsHTRANSFORM hTransform = NULL;
+@@ -6799,13 +6831,13 @@ int xsane_transfer_to_gimp(char *input_filename, int apply_ICM_profile, int cms_
+ *cancel_save = 0;
+
+ imagefile = fopen(input_filename, "rb"); /* read binary (b for win32) */
+- if (imagefile == 0)
++ if (!imagefile)
+ {
+ char buf[TEXTBUFSIZE];
+ snprintf(buf, sizeof(buf), "%s `%s': %s", ERR_OPEN_FAILED, input_filename, strerror(errno));
+ xsane_back_gtk_error(buf, TRUE);
+-
+- return -1;
++ retval = -1;
++ goto out;
+ }
+
+ xsane_read_pnm_header(imagefile, &image_info);
+@@ -6828,7 +6860,8 @@ int xsane_transfer_to_gimp(char *input_filename, int apply_ICM_profile, int cms_
+
+ snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_NO_MEM);
+ xsane_back_gtk_error(buf, TRUE);
+- return -1; /* error */
++ retval = -1; /* error */
++ goto out;
+ }
+
+ #ifdef HAVE_LIBLCMS
+@@ -6847,11 +6880,10 @@ int xsane_transfer_to_gimp(char *input_filename, int apply_ICM_profile, int cms_
+ {
+ char buf[TEXTBUFSIZE];
+
+- free(data);
+-
+ snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_NO_MEM);
+ xsane_back_gtk_error(buf, TRUE);
+- return -1; /* error */
++ retval = -1; /* error */
++ goto out;
+ }
+ }
+ #endif
+@@ -6892,6 +6924,11 @@ int xsane_transfer_to_gimp(char *input_filename, int apply_ICM_profile, int cms_
+ {
+ fseek(icm_profile, 0, SEEK_END);
+ size = ftell(icm_profile);
++ if (size < 0)
++ {
++ DBG(DBG_error, "xsane_transfer_to_gimp(): can't tell file position");
++ goto out;
++ }
+ fseek(icm_profile, 0, SEEK_SET);
+
+ profile_buffer = malloc(size);
+@@ -6949,7 +6986,7 @@ int xsane_transfer_to_gimp(char *input_filename, int apply_ICM_profile, int cms_
+ case 1: /* 1 bit gray => conversion to 8 bit gray */
+ for (i = 0; i < ( (image_info.image_width + 7) / 8) * image_info.image_height; ++i)
+ {
+- u_char mask;
++ int mask;
+ int j;
+
+ mask = fgetc(imagefile);
+@@ -7219,7 +7256,7 @@ int xsane_transfer_to_gimp(char *input_filename, int apply_ICM_profile, int cms_
+ g_free(tile);
+ tile = 0;
+
+- fclose(imagefile);
++out:
+
+ #ifdef HAVE_LIBLCMS
+ if (hTransform != NULL)
+@@ -7232,9 +7269,18 @@ int xsane_transfer_to_gimp(char *input_filename, int apply_ICM_profile, int cms_
+ free(data_raw);
+ }
+ #endif
+- free(data);
+
+- return 0;
++ if (imagefile)
++ {
++ fclose(imagefile);
++ }
++
++ if (data)
++ {
++ free(data);
++ }
++
++ return retval;
+ }
+ #endif /* HAVE_ANY_GIMP */
+
+@@ -7617,7 +7663,7 @@ int pop3_login(int fd_socket, char *user, char *passwd)
+ int len;
+ ssize_t bytes_written;
+
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7627,7 +7673,7 @@ int pop3_login(int fd_socket, char *user, char *passwd)
+ snprintf(buf, sizeof(buf), "USER %s\r\n", user);
+ DBG(DBG_info2, "> USER xxx\n");
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7641,7 +7687,7 @@ int pop3_login(int fd_socket, char *user, char *passwd)
+ snprintf(buf, sizeof(buf), "PASS %s\r\n", passwd);
+ DBG(DBG_info2, "> PASS xxx\n");
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7655,7 +7701,7 @@ int pop3_login(int fd_socket, char *user, char *passwd)
+ snprintf(buf, sizeof(buf), "QUIT\r\n");
+ DBG(DBG_info2, "> QUIT\n");
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7683,7 +7729,7 @@ int asmtp_authentication(int fd_socket, int auth_type, char *user, char *passwd)
+ bytes_written = write(fd_socket, buf, strlen(buf));
+ snprintf(buf, sizeof(buf), "%c%s%c%s", 0, user, 0, passwd);
+ write_string_base64(fd_socket, buf, strlen(user)+strlen(passwd)+2);
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7695,7 +7741,7 @@ int asmtp_authentication(int fd_socket, int auth_type, char *user, char *passwd)
+ snprintf(buf, sizeof(buf), "AUTH LOGIN\r\n");
+ DBG(DBG_info2, "> %s", buf);
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7710,7 +7756,7 @@ int asmtp_authentication(int fd_socket, int auth_type, char *user, char *passwd)
+ DBG(DBG_info2, "> (USERNAME)\n");
+ write_string_base64(fd_socket, user, strlen(user));
+
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7725,7 +7771,7 @@ int asmtp_authentication(int fd_socket, int auth_type, char *user, char *passwd)
+ DBG(DBG_info2, "> (PASSWORD)\n");
+ write_string_base64(fd_socket, passwd, strlen(passwd));
+
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7743,7 +7789,7 @@ int asmtp_authentication(int fd_socket, int auth_type, char *user, char *passwd)
+ snprintf(buf, sizeof(buf), "AUTH CRAM-MD5\r\n");
+ DBG(DBG_info2, "> %s", buf);
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7773,7 +7819,7 @@ int write_smtp_header(int fd_socket, char *from, char *to, int auth_type, char *
+ char *pos = NULL;
+ ssize_t bytes_written;
+
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7790,7 +7836,7 @@ int write_smtp_header(int fd_socket, char *from, char *to, int auth_type, char *
+ }
+ DBG(DBG_info2, "> %s", buf);
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7824,7 +7870,7 @@ int write_smtp_header(int fd_socket, char *from, char *to, int auth_type, char *
+ snprintf(buf, sizeof(buf), "MAIL FROM: <%s>\r\n", from);
+ DBG(DBG_info2, "> %s", buf);
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7864,7 +7910,7 @@ int write_smtp_header(int fd_socket, char *from, char *to, int auth_type, char *
+
+ DBG(DBG_info2, "> %s", buf);
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7897,7 +7943,7 @@ int write_smtp_header(int fd_socket, char *from, char *to, int auth_type, char *
+ snprintf(buf, sizeof(buf), "DATA\r\n");
+ DBG(DBG_info2, "> %s", buf);
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+@@ -7932,7 +7978,7 @@ int write_smtp_footer(int fd_socket)
+ snprintf(buf, sizeof(buf), "\r\n.\r\n");
+ DBG(DBG_info2, "> %s", buf);
+ bytes_written = write(fd_socket, buf, strlen(buf));
+- len = read(fd_socket, buf, sizeof(buf));
++ len = read(fd_socket, buf, sizeof(buf) - 1);
+ if (len >= 0)
+ {
+ buf[len] = 0;
+diff --git a/src/xsane-scan.c b/src/xsane-scan.c
+index 88f954a..b6a66d6 100644
+--- a/src/xsane-scan.c
++++ b/src/xsane-scan.c
+@@ -394,6 +394,13 @@ static void xsane_read_image_data(gpointer data, gint source, GdkInputCondition
+ {
+ long fpos = ftell(xsane.out);
+
++ if (fpos < 0)
++ {
++ DBG(DBG_error, "xsane_read_image_data(): can't tell file "
++ "position");
++ return;
++ }
++
+ fseek(xsane.out, 0, SEEK_CUR); /* sync between write and read */
+ bytes_read = fread(rgbbuf, 1, bytes - 1, xsane.out);
+ fseek(xsane.out, fpos, SEEK_SET);
+@@ -1173,6 +1180,8 @@ void xsane_scan_done(SANE_Status status)
+ {
+ abort = 1;
+ }
++
++ fclose(outfile);
+ }
+ else
+ {
+@@ -1182,8 +1191,6 @@ void xsane_scan_done(SANE_Status status)
+ xsane_back_gtk_error(buf, TRUE);
+ abort = 1;
+ }
+-
+- fclose(outfile);
+ }
+
+ fclose(infile);
+@@ -1452,7 +1459,7 @@ void xsane_scan_done(SANE_Status status)
+ }
+ else
+ {
+- type = "";
++ type = strdup("");
+ }
+
+ list_item = gtk_list_item_new_with_label(page);
+@@ -1493,7 +1500,7 @@ void xsane_scan_done(SANE_Status status)
+ }
+ else
+ {
+- type = "";
++ type = strdup("");
+ }
+
+ list_item = gtk_list_item_new_with_label(page);
+@@ -1535,7 +1542,7 @@ void xsane_scan_done(SANE_Status status)
+ }
+ else
+ {
+- type = "";
++ type = strdup("");
+ }
+
+ list_item = gtk_list_item_new_with_label(page);
+diff --git a/src/xsane-setup.c b/src/xsane-setup.c
+index a61833a..413a343 100644
+--- a/src/xsane-setup.c
++++ b/src/xsane-setup.c
+@@ -111,7 +111,7 @@ void xsane_new_printer(void)
+
+ DBG(DBG_proc, "xsane_new_printer\n");
+
+- newprinters = realloc(preferences.printer, (preferences.printerdefinitions+1) * sizeof(void *));
++ newprinters = realloc(preferences.printer, (preferences.printerdefinitions+1) * sizeof(Preferences_printer_t *));
+
+ if (newprinters) /* realloc returns NULL if failed, in this case the old memory keeps alive */
+ {
+@@ -309,7 +309,7 @@ static void xsane_setup_printer_callback(GtkWidget *widget, gpointer data)
+ {
+ DBG(DBG_proc, "xsane_setup_printer_callback\n");
+
+- preferences.printernr = (int) data;
++ preferences.printernr = GPOINTER_TO_INT(data);
+ xsane_setup_printer_update();
+ }
+
+@@ -328,7 +328,7 @@ static void xsane_setup_printer_menu_build(GtkWidget *option_menu)
+ {
+ printer_item = gtk_menu_item_new_with_label(preferences.printer[i]->name);
+ gtk_container_add(GTK_CONTAINER(printer_menu), printer_item);
+- g_signal_connect(GTK_OBJECT(printer_item), "activate", (GtkSignalFunc) xsane_setup_printer_callback, (void *) i);
++ g_signal_connect(GTK_OBJECT(printer_item), "activate", (GtkSignalFunc) xsane_setup_printer_callback, GINT_TO_POINTER(i));
+ gtk_widget_show(printer_item);
+ }
+
+@@ -454,7 +454,7 @@ static void xsane_setup_filename_counter_len_callback(GtkWidget *widget, gpointe
+ {
+ DBG(DBG_proc, "xsane_setup_filename_counter_len_callback\n");
+
+- xsane_setup.filename_counter_len = (int) data;
++ xsane_setup.filename_counter_len = GPOINTER_TO_INT(data);
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+@@ -464,7 +464,7 @@ static void xsane_setup_tiff_compression16_callback(GtkWidget *widget, gpointer
+ {
+ DBG(DBG_proc, "xsane_setup_tiff_compression16_callback\n");
+
+- xsane_setup.tiff_compression16_nr = (int) data;
++ xsane_setup.tiff_compression16_nr = GPOINTER_TO_INT(data);
+ }
+
+ /* -------------------------------------- */
+@@ -473,7 +473,7 @@ static void xsane_setup_tiff_compression8_callback(GtkWidget *widget, gpointer d
+ {
+ DBG(DBG_proc, "xsane_setup_tiff_compression8_callback\n");
+
+- xsane_setup.tiff_compression8_nr = (int) data;
++ xsane_setup.tiff_compression8_nr = GPOINTER_TO_INT(data);
+ }
+
+ /* -------------------------------------- */
+@@ -481,7 +481,7 @@ static void xsane_setup_tiff_compression8_callback(GtkWidget *widget, gpointer d
+ static void xsane_setup_tiff_compression1_callback(GtkWidget *widget, gpointer data)
+ {
+ DBG(DBG_proc, "xsane_setup_tiff_compression1_callback\n");
+- xsane_setup.tiff_compression1_nr = (int) data;
++ xsane_setup.tiff_compression1_nr = GPOINTER_TO_INT(data);
+ }
+ #endif
+
+@@ -569,7 +569,7 @@ static void xsane_setup_color_management_apply_changes(GtkWidget *widget, gpoint
+ {
+ DBG(DBG_proc, "xsane_setup_colormagaement_apply_changes\n");
+
+- preferences.cms_intent = (int) gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(gtk_option_menu_get_menu(GTK_OPTION_MENU(xsane_setup.cms_intent_option_menu))))), "Selection");
++ preferences.cms_intent = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(gtk_option_menu_get_menu(GTK_OPTION_MENU(xsane_setup.cms_intent_option_menu))))), "Selection"));
+ xsane_update_bool(xsane_setup.cms_bpc_button, &preferences.cms_bpc);
+
+ if (xsane.scanner_default_color_icm_profile)
+@@ -843,7 +843,7 @@ void xsane_close_setup_dialog_callback(GtkWidget *widget, gpointer data)
+
+ static void xsane_permission_toggled(GtkWidget *widget, gpointer data)
+ {
+- int mask = (int) data;
++ int mask = GPOINTER_TO_INT(data);
+ int *permission = 0;
+ const gchar *name = gtk_widget_get_name(widget);
+
+@@ -912,7 +912,7 @@ static void xsane_permission_box(GtkWidget *parent, gchar *name, gchar *descript
+ xsane_back_gtk_set_tooltip(xsane.tooltips, button, DESC_PERMISSION_READ);
+ gtk_widget_set_size_request(button, 26, -1);
+ gtk_widget_set_name(button, name);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, (void *) 256);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, GINT_TO_POINTER(256));
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+ gtk_widget_show(button);
+ gtk_widget_set_sensitive(button, user_sensitivity);
+@@ -922,7 +922,7 @@ static void xsane_permission_box(GtkWidget *parent, gchar *name, gchar *descript
+ xsane_back_gtk_set_tooltip(xsane.tooltips, button, DESC_PERMISSION_WRITE);
+ gtk_widget_set_size_request(button, 26, -1);
+ gtk_widget_set_name(button, name);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, (void *) 128);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, GINT_TO_POINTER(128));
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+ gtk_widget_show(button);
+ gtk_widget_set_sensitive(button, user_sensitivity);
+@@ -932,7 +932,7 @@ static void xsane_permission_box(GtkWidget *parent, gchar *name, gchar *descript
+ xsane_back_gtk_set_tooltip(xsane.tooltips, button, DESC_PERMISSION_SEARCH);
+ gtk_widget_set_size_request(button, 26, -1);
+ gtk_widget_set_name(button, name);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, (void *) 64);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, GINT_TO_POINTER(64));
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+ gtk_widget_show(button);
+ gtk_widget_set_sensitive(button, x_sensitivity & user_sensitivity);
+@@ -950,7 +950,7 @@ static void xsane_permission_box(GtkWidget *parent, gchar *name, gchar *descript
+ xsane_back_gtk_set_tooltip(xsane.tooltips, button, DESC_PERMISSION_READ);
+ gtk_widget_set_size_request(button, 26, -1);
+ gtk_widget_set_name(button, name);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, (void *) 32);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, GINT_TO_POINTER(32));
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+ gtk_widget_show(button);
+
+@@ -959,7 +959,7 @@ static void xsane_permission_box(GtkWidget *parent, gchar *name, gchar *descript
+ xsane_back_gtk_set_tooltip(xsane.tooltips, button, DESC_PERMISSION_WRITE);
+ gtk_widget_set_size_request(button, 26, -1);
+ gtk_widget_set_name(button, name);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, (void *) 16);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, GINT_TO_POINTER(16));
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+ gtk_widget_show(button);
+
+@@ -968,7 +968,7 @@ static void xsane_permission_box(GtkWidget *parent, gchar *name, gchar *descript
+ xsane_back_gtk_set_tooltip(xsane.tooltips, button, DESC_PERMISSION_SEARCH);
+ gtk_widget_set_size_request(button, 26, -1);
+ gtk_widget_set_name(button, name);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, (void *) 8);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, GINT_TO_POINTER(8));
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+ gtk_widget_show(button);
+ gtk_widget_set_sensitive(button, x_sensitivity);
+@@ -986,7 +986,7 @@ static void xsane_permission_box(GtkWidget *parent, gchar *name, gchar *descript
+ xsane_back_gtk_set_tooltip(xsane.tooltips, button, DESC_PERMISSION_READ);
+ gtk_widget_set_size_request(button, 26, -1);
+ gtk_widget_set_name(button, name);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, (void *) 4);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, GINT_TO_POINTER(4));
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+ gtk_widget_show(button);
+
+@@ -995,7 +995,7 @@ static void xsane_permission_box(GtkWidget *parent, gchar *name, gchar *descript
+ xsane_back_gtk_set_tooltip(xsane.tooltips, button, DESC_PERMISSION_WRITE);
+ gtk_widget_set_size_request(button, 26, -1);
+ gtk_widget_set_name(button, name);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, (void *) 2);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, GINT_TO_POINTER(2));
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+ gtk_widget_show(button);
+
+@@ -1004,7 +1004,7 @@ static void xsane_permission_box(GtkWidget *parent, gchar *name, gchar *descript
+ xsane_back_gtk_set_tooltip(xsane.tooltips, button, DESC_PERMISSION_SEARCH);
+ gtk_widget_set_size_request(button, 26, -1);
+ gtk_widget_set_name(button, name);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, (void *) 1);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_permission_toggled, GINT_TO_POINTER(1));
+ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+ gtk_widget_show(button);
+ gtk_widget_set_sensitive(button, x_sensitivity);
+@@ -1750,7 +1750,7 @@ static void xsane_saving_notebook(GtkWidget *notebook)
+ }
+ filename_counter_len_item = gtk_menu_item_new_with_label(buf);
+ gtk_container_add(GTK_CONTAINER(filename_counter_len_menu), filename_counter_len_item);
+- g_signal_connect(GTK_OBJECT(filename_counter_len_item), "activate", (GtkSignalFunc) xsane_setup_filename_counter_len_callback, (void *) i);
++ g_signal_connect(GTK_OBJECT(filename_counter_len_item), "activate", (GtkSignalFunc) xsane_setup_filename_counter_len_callback, GINT_TO_POINTER(i));
+ gtk_widget_show(filename_counter_len_item);
+ if (preferences.filename_counter_len == i)
+ {
+@@ -1983,7 +1983,7 @@ static void xsane_filetype_notebook(GtkWidget *notebook)
+ {
+ tiff_compression_item = gtk_menu_item_new_with_label(tiff_compression16_strings[i-1].name);
+ gtk_container_add(GTK_CONTAINER(tiff_compression_menu), tiff_compression_item);
+- g_signal_connect(GTK_OBJECT(tiff_compression_item), "activate", (GtkSignalFunc) xsane_setup_tiff_compression16_callback, (void *) tiff_compression16_strings[i-1].number);
++ g_signal_connect(GTK_OBJECT(tiff_compression_item), "activate", (GtkSignalFunc) xsane_setup_tiff_compression16_callback, GINT_TO_POINTER(tiff_compression16_strings[i-1].number));
+ gtk_widget_show(tiff_compression_item);
+ if (tiff_compression16_strings[i-1].number == preferences.tiff_compression16_nr)
+ {
+@@ -2019,7 +2019,7 @@ static void xsane_filetype_notebook(GtkWidget *notebook)
+ {
+ tiff_compression_item = gtk_menu_item_new_with_label(tiff_compression8_strings[i-1].name);
+ gtk_container_add(GTK_CONTAINER(tiff_compression_menu), tiff_compression_item);
+- g_signal_connect(GTK_OBJECT(tiff_compression_item), "activate", (GtkSignalFunc) xsane_setup_tiff_compression8_callback, (void *) tiff_compression8_strings[i-1].number);
++ g_signal_connect(GTK_OBJECT(tiff_compression_item), "activate", (GtkSignalFunc) xsane_setup_tiff_compression8_callback, GINT_TO_POINTER(tiff_compression8_strings[i-1].number));
+ gtk_widget_show(tiff_compression_item);
+ if (tiff_compression8_strings[i-1].number == preferences.tiff_compression8_nr)
+ {
+@@ -2056,7 +2056,7 @@ static void xsane_filetype_notebook(GtkWidget *notebook)
+ {
+ tiff_compression_item = gtk_menu_item_new_with_label(tiff_compression1_strings[i-1].name);
+ gtk_container_add(GTK_CONTAINER(tiff_compression_menu), tiff_compression_item);
+- g_signal_connect(GTK_OBJECT(tiff_compression_item), "activate", (GtkSignalFunc) xsane_setup_tiff_compression1_callback, (void *) tiff_compression1_strings[i-1].number);
++ g_signal_connect(GTK_OBJECT(tiff_compression_item), "activate", (GtkSignalFunc) xsane_setup_tiff_compression1_callback, GINT_TO_POINTER(tiff_compression1_strings[i-1].number));
+ gtk_widget_show(tiff_compression_item);
+ if (tiff_compression1_strings[i-1].number == preferences.tiff_compression1_nr)
+ {
+@@ -2251,7 +2251,7 @@ static void xsane_fax_notebook(GtkWidget *notebook)
+ for (i=0; i < sizeof(fax_program)/sizeof(fax_program_options_type); i++)
+ {
+ button = gtk_button_new_with_label(fax_program[i].identifier);
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_fax_notebook_set_faxprogram_default_callback, (void *) i);
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_fax_notebook_set_faxprogram_default_callback, GINT_TO_POINTER(i));
+ gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 10);
+ gtk_widget_show(button);
+ }
+@@ -2557,7 +2557,7 @@ static void xsane_email_notebook(GtkWidget *notebook)
+ {
+ authentication_menu_item = gtk_menu_item_new_with_label(authentication_strings[i-1].name);
+ gtk_container_add(GTK_CONTAINER(authentication_menu), authentication_menu_item);
+- g_signal_connect(GTK_OBJECT(authentication_menu_item), "activate", (GtkSignalFunc) xsane_setup_authentication_type_callback, (void *) authentication_strings[i-1].number);
++ g_signal_connect(GTK_OBJECT(authentication_menu_item), "activate", (GtkSignalFunc) xsane_setup_authentication_type_callback, GINT_TO_POINTER(authentication_strings[i-1].number));
+ gtk_widget_show(authentication_menu_item);
+ if (authentication_strings[i-1].number == preferences.email_authentication)
+ {
+@@ -2926,7 +2926,7 @@ static void xsane_display_notebook(GtkWidget *notebook)
+ {
+ show_range_mode_item = gtk_menu_item_new_with_label(show_range_mode_strings[i-1].name);
+ gtk_container_add(GTK_CONTAINER(show_range_mode_menu), show_range_mode_item);
+- g_signal_connect(GTK_OBJECT(show_range_mode_item), "activate", (GtkSignalFunc) xsane_setup_show_range_mode_callback, (void *) show_range_mode_strings[i-1].number);
++ g_signal_connect(GTK_OBJECT(show_range_mode_item), "activate", (GtkSignalFunc) xsane_setup_show_range_mode_callback, GINT_TO_POINTER(show_range_mode_strings[i-1].number));
+ gtk_widget_show(show_range_mode_item);
+ if (show_range_mode_strings[i-1].number == preferences.show_range_mode)
+ {
+@@ -3129,7 +3129,7 @@ static void xsane_enhance_notebook_sensitivity(int lineart_mode)
+
+ static void xsane_setup_authentication_type_callback(GtkWidget *widget, gpointer data)
+ {
+- xsane_setup.email_authentication = (int) data;
++ xsane_setup.email_authentication = GPOINTER_TO_INT(data);
+
+ gtk_widget_set_sensitive(xsane_setup.pop3_vbox, (xsane_setup.email_authentication == EMAIL_AUTH_POP3));
+ }
+@@ -3138,14 +3138,14 @@ static void xsane_setup_authentication_type_callback(GtkWidget *widget, gpointer
+
+ static void xsane_setup_show_range_mode_callback(GtkWidget *widget, gpointer data)
+ {
+- xsane_setup.show_range_mode = (int) data;
++ xsane_setup.show_range_mode = GPOINTER_TO_INT(data);
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+
+ static void xsane_setup_lineart_mode_callback(GtkWidget *widget, gpointer data)
+ {
+- xsane_setup.lineart_mode = (int) data;
++ xsane_setup.lineart_mode = GPOINTER_TO_INT(data);
+ xsane_enhance_notebook_sensitivity(xsane_setup.lineart_mode);
+ }
+
+@@ -3168,7 +3168,7 @@ static void xsane_setup_preview_pipette_range_callback(GtkWidget *widget, gpoint
+ {
+ DBG(DBG_proc, "xsane_setup_preview_pipette_range_callback\n");
+
+- xsane_setup.preview_pipette_range = (int) data;
++ xsane_setup.preview_pipette_range = GPOINTER_TO_INT(data);
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+@@ -3237,7 +3237,7 @@ static void xsane_enhance_notebook(GtkWidget *notebook)
+ {
+ lineart_mode_item = gtk_menu_item_new_with_label(lineart_mode_strings[i-1].name);
+ gtk_container_add(GTK_CONTAINER(lineart_mode_menu), lineart_mode_item);
+- g_signal_connect(GTK_OBJECT(lineart_mode_item), "activate", (GtkSignalFunc) xsane_setup_lineart_mode_callback, (void *) lineart_mode_strings[i-1].number);
++ g_signal_connect(GTK_OBJECT(lineart_mode_item), "activate", (GtkSignalFunc) xsane_setup_lineart_mode_callback, GINT_TO_POINTER(lineart_mode_strings[i-1].number));
+ gtk_widget_show(lineart_mode_item);
+ if (lineart_mode_strings[i-1].number == xsane.lineart_mode)
+ {
+@@ -3461,7 +3461,7 @@ static void xsane_enhance_notebook(GtkWidget *notebook)
+ snprintf(buf, sizeof(buf), "%d x %d pixel", j, j);
+ preview_pipette_range_item = gtk_menu_item_new_with_label(buf);
+ gtk_container_add(GTK_CONTAINER(preview_pipette_range_menu), preview_pipette_range_item);
+- g_signal_connect(GTK_OBJECT(preview_pipette_range_item), "activate", (GtkSignalFunc) xsane_setup_preview_pipette_range_callback, (void *) j);
++ g_signal_connect(GTK_OBJECT(preview_pipette_range_item), "activate", (GtkSignalFunc) xsane_setup_preview_pipette_range_callback, GINT_TO_POINTER(j));
+ gtk_widget_show(preview_pipette_range_item);
+ if (preferences.preview_pipette_range == j)
+ {
+@@ -3555,22 +3555,22 @@ static void xsane_color_management_notebook(GtkWidget *notebook)
+ menu = gtk_menu_new();
+
+ menu_item = gtk_menu_item_new_with_label(SUBMENU_ITEM_CMS_INTENT_PERCEPTUAL);
+- gtk_object_set_data(GTK_OBJECT(menu_item), "Selection", (void *) INTENT_PERCEPTUAL);
++ gtk_object_set_data(GTK_OBJECT(menu_item), "Selection", GINT_TO_POINTER(INTENT_PERCEPTUAL));
+ gtk_container_add(GTK_CONTAINER(menu), menu_item);
+ gtk_widget_show(menu_item);
+
+ menu_item = gtk_menu_item_new_with_label(SUBMENU_ITEM_CMS_INTENT_RELATIVE_COLORIMETRIC);
+- gtk_object_set_data(GTK_OBJECT(menu_item), "Selection", (void *) INTENT_RELATIVE_COLORIMETRIC);
++ gtk_object_set_data(GTK_OBJECT(menu_item), "Selection", GINT_TO_POINTER(INTENT_RELATIVE_COLORIMETRIC));
+ gtk_container_add(GTK_CONTAINER(menu), menu_item);
+ gtk_widget_show(menu_item);
+
+ menu_item = gtk_menu_item_new_with_label(SUBMENU_ITEM_CMS_INTENT_ABSOLUTE_COLORIMETRIC);
+- gtk_object_set_data(GTK_OBJECT(menu_item), "Selection", (void *) INTENT_ABSOLUTE_COLORIMETRIC);
++ gtk_object_set_data(GTK_OBJECT(menu_item), "Selection", GINT_TO_POINTER(INTENT_ABSOLUTE_COLORIMETRIC));
+ gtk_container_add(GTK_CONTAINER(menu), menu_item);
+ gtk_widget_show(menu_item);
+
+ menu_item = gtk_menu_item_new_with_label(SUBMENU_ITEM_CMS_INTENT_SATURATION);
+- gtk_object_set_data(GTK_OBJECT(menu_item), "Selection", (void *) INTENT_SATURATION);
++ gtk_object_set_data(GTK_OBJECT(menu_item), "Selection", GINT_TO_POINTER(INTENT_SATURATION));
+ gtk_container_add(GTK_CONTAINER(menu), menu_item);
+ gtk_widget_show(menu_item);
+
+diff --git a/src/xsane-text.h b/src/xsane-text.h
+index ee4a222..44659b9 100644
+--- a/src/xsane-text.h
++++ b/src/xsane-text.h
+@@ -803,6 +803,7 @@ YOU ARE ALONE!\
+ #define ERR_HEADER_CHILD_PROCESS_ERROR _("Child process error")
+
+ #define ERR_FAILED_CREATE_FILE _("Failed to create file:")
++#define ERR_FAILED_CREATE_ENSURE_DIR _("Failed to ensure path is a directory, or to create as one:")
+ #define ERR_LOAD_DEVICE_SETTINGS _("Error while loading device settings:")
+ #define ERR_NO_DRC_FILE _("is not a device-rc-file !!!")
+ #define ERR_NETSCAPE_EXECUTE_FAIL _("Failed to execute netscape!")
+diff --git a/src/xsane-viewer.c b/src/xsane-viewer.c
+index 844c077..6786e96 100644
+--- a/src/xsane-viewer.c
++++ b/src/xsane-viewer.c
+@@ -32,6 +32,8 @@
+ #include "xsane-save.h"
+ #include <gdk/gdkkeysyms.h>
+ #include <sys/wait.h>
++#include <string.h>
++#include <errno.h>
+
+ #ifndef PATH_MAX
+ # define PATH_MAX 1024
+@@ -506,8 +508,8 @@ static void xsane_viewer_scale_set_scale_value_and_adjustments(GtkAdjustment *ad
+
+ *scale_val = adj_data->value;
+
+- image_width = (int) gtk_object_get_data(GTK_OBJECT(adj_data), "image_width");
+- image_height = (int) gtk_object_get_data(GTK_OBJECT(adj_data), "image_height");
++ image_width = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(adj_data), "image_width"));
++ image_height = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(adj_data), "image_height"));
+
+ adj = (GtkAdjustment*) gtk_object_get_data(GTK_OBJECT(adj_data), "size-x-adjustment");
+ if ((adj) && (image_width))
+@@ -529,8 +531,8 @@ static void xsane_viewer_scale_set_size_x_value_and_adjustments(GtkAdjustment *a
+ GtkAdjustment *adj;
+ int image_width, image_height;
+
+- image_width = (int) gtk_object_get_data(GTK_OBJECT(adj_data), "image_width");
+- image_height = (int) gtk_object_get_data(GTK_OBJECT(adj_data), "image_height");
++ image_width = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(adj_data), "image_width"));
++ image_height = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(adj_data), "image_height"));
+
+ if (!image_width)
+ {
+@@ -553,8 +555,8 @@ static void xsane_viewer_scale_set_size_y_value_and_adjustments(GtkAdjustment *a
+ GtkAdjustment *adj;
+ int image_width, image_height;
+
+- image_width = (int) gtk_object_get_data(GTK_OBJECT(adj_data), "image_width");
+- image_height = (int) gtk_object_get_data(GTK_OBJECT(adj_data), "image_height");
++ image_width = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(adj_data), "image_width"));
++ image_height = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(adj_data), "image_height"));
+
+ if (!image_height)
+ {
+@@ -663,7 +665,7 @@ static void xsane_viewer_scale_callback(GtkWidget *window, gpointer data)
+ button = gtk_check_button_new_with_label(BUTTON_SCALE_BIND);
+ gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 5);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), v->bind_scale);
+- g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_viewer_button_changed, (void *) &v->bind_scale);
++ g_signal_connect(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_viewer_button_changed, GINT_TO_POINTER(&v->bind_scale));
+ g_signal_connect_after(GTK_OBJECT(button), "toggled", (GtkSignalFunc) xsane_viewer_scale_callback, (void *) v);
+ gtk_widget_show(button);
+
+@@ -715,20 +717,20 @@ static void xsane_viewer_scale_callback(GtkWidget *window, gpointer data)
+ gtk_widget_show(spinbutton);
+ xsane_back_gtk_set_tooltip(xsane.tooltips, spinbutton, DESC_SCALE_HEIGHT);
+
+- gtk_object_set_data(GTK_OBJECT(scale_widget), "size-x-adjustment", (void *) adjustment_size_x);
+- gtk_object_set_data(GTK_OBJECT(scale_widget), "size-y-adjustment", (void *) adjustment_size_y);
+- gtk_object_set_data(GTK_OBJECT(scale_widget), "image_width", (void *) image_info.image_width);
+- gtk_object_set_data(GTK_OBJECT(scale_widget), "image_height", (void *) image_info.image_height);
++ gtk_object_set_data(GTK_OBJECT(scale_widget), "size-x-adjustment", GINT_TO_POINTER(adjustment_size_x));
++ gtk_object_set_data(GTK_OBJECT(scale_widget), "size-y-adjustment", GINT_TO_POINTER(adjustment_size_y));
++ gtk_object_set_data(GTK_OBJECT(scale_widget), "image_width", GINT_TO_POINTER(image_info.image_width));
++ gtk_object_set_data(GTK_OBJECT(scale_widget), "image_height", GINT_TO_POINTER(image_info.image_height));
+
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "scale-adjustment", (void *) scale_widget);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "size-y-adjustment", (void *) adjustment_size_y);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "image_width", (void *) image_info.image_width);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "image_height", (void *) image_info.image_height);
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "scale-adjustment", GINT_TO_POINTER(scale_widget));
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "size-y-adjustment", GINT_TO_POINTER(adjustment_size_y));
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "image_width", GINT_TO_POINTER(image_info.image_width));
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "image_height", GINT_TO_POINTER(image_info.image_height));
+
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "scale-adjustment", (void *) scale_widget);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "size-x-adjustment", (void *) adjustment_size_x);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "image_width", (void *) image_info.image_width);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "image_height", (void *) image_info.image_height);
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "scale-adjustment", GINT_TO_POINTER(scale_widget));
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "size-x-adjustment", GINT_TO_POINTER(adjustment_size_x));
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "image_width", GINT_TO_POINTER(image_info.image_width));
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "image_height", GINT_TO_POINTER(image_info.image_height));
+ }
+ else
+ {
+@@ -763,12 +765,12 @@ static void xsane_viewer_scale_callback(GtkWidget *window, gpointer data)
+ xsane_back_gtk_set_tooltip(xsane.tooltips, spinbutton, DESC_SCALE_WIDTH);
+
+ gtk_object_set_data(GTK_OBJECT(scalex_widget), "size-x-adjustment", (void *) adjustment_size_x);
+- gtk_object_set_data(GTK_OBJECT(scalex_widget), "image_width", (void *) image_info.image_width);
+- gtk_object_set_data(GTK_OBJECT(scalex_widget), "image_height", (void *) image_info.image_height);
++ gtk_object_set_data(GTK_OBJECT(scalex_widget), "image_width", GINT_TO_POINTER(image_info.image_width));
++ gtk_object_set_data(GTK_OBJECT(scalex_widget), "image_height", GINT_TO_POINTER(image_info.image_height));
+
+ gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "scale-adjustment", (void *) scalex_widget);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "image_width", (void *) image_info.image_width);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "image_height", (void *) image_info.image_height);
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "image_width", GINT_TO_POINTER(image_info.image_width));
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_x), "image_height", GINT_TO_POINTER(image_info.image_height));
+
+
+ /* Y */
+@@ -802,12 +804,12 @@ static void xsane_viewer_scale_callback(GtkWidget *window, gpointer data)
+ xsane_back_gtk_set_tooltip(xsane.tooltips, spinbutton, DESC_SCALE_HEIGHT);
+
+ gtk_object_set_data(GTK_OBJECT(scaley_widget), "size-y-adjustment", (void *) adjustment_size_y);
+- gtk_object_set_data(GTK_OBJECT(scaley_widget), "image_width", (void *) image_info.image_width);
+- gtk_object_set_data(GTK_OBJECT(scaley_widget), "image_height", (void *) image_info.image_height);
++ gtk_object_set_data(GTK_OBJECT(scaley_widget), "image_width", GINT_TO_POINTER(image_info.image_width));
++ gtk_object_set_data(GTK_OBJECT(scaley_widget), "image_height", GINT_TO_POINTER(image_info.image_height));
+
+ gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "scale-adjustment", (void *) scaley_widget);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "image_width", (void *) image_info.image_width);
+- gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "image_height", (void *) image_info.image_height);
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "image_width", GINT_TO_POINTER(image_info.image_width));
++ gtk_object_set_data(GTK_OBJECT(adjustment_size_y), "image_height", GINT_TO_POINTER(image_info.image_height));
+ }
+
+ /* Apply Cancel */
+@@ -1094,6 +1096,7 @@ static void xsane_viewer_scale_image(GtkWidget *window, gpointer data)
+ {
+ DBG(DBG_error, "could not save file %s\n", outfilename);
+ xsane_viewer_set_sensitivity(v, TRUE);
++ fclose(infile);
+ return;
+ }
+
+@@ -1176,6 +1179,7 @@ static void xsane_viewer_despeckle_image(GtkWidget *window, gpointer data)
+ {
+ DBG(DBG_error, "could not save file %s\n", outfilename);
+ xsane_viewer_set_sensitivity(v, TRUE);
++ fclose(infile);
+ return;
+ }
+
+@@ -1253,6 +1257,7 @@ static void xsane_viewer_blur_image(GtkWidget *window, gpointer data)
+ {
+ DBG(DBG_error, "could not save file %s\n", outfilename);
+ xsane_viewer_set_sensitivity(v, TRUE);
++ fclose(infile);
+ return;
+ }
+
+@@ -1335,6 +1340,7 @@ static void xsane_viewer_rotate(Viewer *v, int rotation)
+ {
+ DBG(DBG_error, "could not save file %s\n", outfilename);
+ xsane_viewer_set_sensitivity(v, TRUE);
++ fclose(infile);
+
+ return;
+ }
+@@ -1444,7 +1450,7 @@ static void xsane_viewer_zoom_callback(GtkWidget *widget, gpointer data)
+
+ DBG(DBG_proc, "xsane_viewer_zoom_callback\n");
+
+- val = (int) gtk_object_get_data(GTK_OBJECT(widget), "Selection");
++ val = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget), "Selection"));
+ v->zoom = (float) val / 100;
+ DBG(DBG_info, "setting zoom factor to %f\n", v->zoom);
+ xsane_viewer_read_image(v);
+@@ -1721,7 +1727,7 @@ static void xsane_viewer_set_cms_proofing_callback(GtkWidget *widget, gpointer d
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_proofing_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_proofing_callback, v);
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_proofing_widget[2]), (GtkSignalFunc) xsane_viewer_set_cms_proofing_callback, v);
+
+- val = (int) gtk_object_get_data(GTK_OBJECT(widget), "Selection");
++ val = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget), "Selection"));
+
+ DBG(DBG_proc, "xsane_viewer_set_cms_proofing_callback (%d)\n", val);
+
+@@ -1748,7 +1754,7 @@ static void xsane_viewer_set_cms_intent_callback(GtkWidget *widget, gpointer dat
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_intent_widget[2]), (GtkSignalFunc) xsane_viewer_set_cms_intent_callback, v);
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_intent_widget[3]), (GtkSignalFunc) xsane_viewer_set_cms_intent_callback, v);
+
+- val = (int) gtk_object_get_data(GTK_OBJECT(widget), "Selection");
++ val = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget), "Selection"));
+
+ DBG(DBG_proc, "xsane_viewer_set_cms_intent_callback (%d)\n", val);
+
+@@ -1774,7 +1780,7 @@ static void xsane_viewer_set_cms_proofing_intent_callback(GtkWidget *widget, gpo
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_proofing_intent_widget[0]), (GtkSignalFunc) xsane_viewer_set_cms_proofing_intent_callback, v);
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_proofing_intent_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_proofing_intent_callback, v);
+
+- val = (int) gtk_object_get_data(GTK_OBJECT(widget), "Selection");
++ val = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget), "Selection"));
+
+ DBG(DBG_proc, "xsane_viewer_set_cms_proofing_intent_callback (%d)\n", val);
+
+@@ -1806,7 +1812,7 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[4]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[5]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+
+- val = (int) gtk_object_get_data(GTK_OBJECT(widget), "Selection");
++ val = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget), "Selection"));
+
+ DBG(DBG_proc, "xsane_viewer_set_cms_gamut_alarm_color_callback (%d)\n", val);
+
+@@ -1942,7 +1948,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_proofing_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) 0);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(0));
+ gtk_widget_show(subitem);
+ v->cms_proofing_widget[0] = subitem;
+
+@@ -1953,7 +1959,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_proofing_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) 1);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(1));
+ gtk_widget_show(subitem);
+ v->cms_proofing_widget[1] = subitem;
+
+@@ -1964,7 +1970,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_proofing_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) 2);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(2));
+ gtk_widget_show(subitem);
+ v->cms_proofing_widget[2] = subitem;
+
+@@ -1985,7 +1991,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_intent_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) INTENT_PERCEPTUAL);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(INTENT_PERCEPTUAL));
+ gtk_widget_show(subitem);
+ v->cms_intent_widget[INTENT_PERCEPTUAL] = subitem;
+
+@@ -1996,7 +2002,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_intent_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) INTENT_RELATIVE_COLORIMETRIC);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(INTENT_RELATIVE_COLORIMETRIC));
+ gtk_widget_show(subitem);
+ v->cms_intent_widget[INTENT_RELATIVE_COLORIMETRIC] = subitem;
+
+@@ -2007,7 +2013,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_intent_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) INTENT_ABSOLUTE_COLORIMETRIC);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(INTENT_ABSOLUTE_COLORIMETRIC));
+ gtk_widget_show(subitem);
+ v->cms_intent_widget[INTENT_ABSOLUTE_COLORIMETRIC] = subitem;
+
+@@ -2018,7 +2024,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_intent_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) INTENT_SATURATION);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(INTENT_SATURATION));
+ gtk_widget_show(subitem);
+ v->cms_intent_widget[INTENT_SATURATION] = subitem;
+
+@@ -2039,7 +2045,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_proofing_intent_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) INTENT_RELATIVE_COLORIMETRIC);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(INTENT_RELATIVE_COLORIMETRIC));
+ gtk_widget_show(subitem);
+ v->cms_proofing_intent_widget[0] = subitem;
+
+@@ -2050,7 +2056,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_proofing_intent_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) INTENT_ABSOLUTE_COLORIMETRIC);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(INTENT_ABSOLUTE_COLORIMETRIC));
+ gtk_widget_show(subitem);
+ v->cms_proofing_intent_widget[1] = subitem;
+
+@@ -2078,7 +2084,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) 0);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(0));
+ gtk_widget_show(subitem);
+ v->cms_gamut_alarm_color_widget[0] = subitem;
+
+@@ -2089,7 +2095,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) 1);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(1));
+ gtk_widget_show(subitem);
+ v->cms_gamut_alarm_color_widget[1] = subitem;
+
+@@ -2100,7 +2106,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) 2);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(2));
+ gtk_widget_show(subitem);
+ v->cms_gamut_alarm_color_widget[2] = subitem;
+
+@@ -2111,7 +2117,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) 3);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(3));
+ gtk_widget_show(subitem);
+ v->cms_gamut_alarm_color_widget[3] = subitem;
+
+@@ -2122,7 +2128,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) 4);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(4));
+ gtk_widget_show(subitem);
+ v->cms_gamut_alarm_color_widget[4] = subitem;
+
+@@ -2133,7 +2139,7 @@ static GtkWidget *xsane_viewer_color_management_build_menu(Viewer *v)
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+- gtk_object_set_data(GTK_OBJECT(subitem), "Selection", (void *) 5);
++ gtk_object_set_data(GTK_OBJECT(subitem), "Selection", GINT_TO_POINTER(5));
+ gtk_widget_show(subitem);
+ v->cms_gamut_alarm_color_widget[5] = subitem;
+
+@@ -2158,7 +2164,7 @@ static int xsane_viewer_read_image_header(Viewer *v)
+ if (!infile)
+ {
+ DBG(DBG_error, "could not load file %s\n", v->filename);
+- return -1;
++ return -1;
+ }
+
+ xsane_read_pnm_header(infile, &image_info);
+@@ -2200,7 +2206,7 @@ static int xsane_viewer_read_image_header(Viewer *v)
+
+ static int xsane_viewer_read_image(Viewer *v)
+ {
+- unsigned char *cms_row, *row, *src_row;
++ unsigned char *cms_row, *row = NULL, *src_row = NULL;
+ int x, y;
+ int last_y;
+ int nread;
+@@ -2211,6 +2217,7 @@ static int xsane_viewer_read_image(Viewer *v)
+ float size;
+ char *size_unit;
+ int width, height;
++ int retval = 0;
+
+ #ifdef HAVE_LIBLCMS
+ cmsHPROFILE hInProfile = NULL;
+@@ -2311,7 +2318,8 @@ static int xsane_viewer_read_image(Viewer *v)
+
+ snprintf(buf, sizeof(buf), "%s\n%s %s: %s\n", ERR_CMS_CONVERSION, ERR_CMS_OPEN_ICM_FILE, CMS_SCANNER_ICM, image_info.icm_profile);
+ xsane_back_gtk_error(buf, TRUE);
+- return -1;
++ retval = -1;
++ goto out;
+ }
+
+ hOutProfile = cmsOpenProfileFromFile(preferences.display_icm_profile, "r");
+@@ -2323,7 +2331,8 @@ static int xsane_viewer_read_image(Viewer *v)
+
+ snprintf(buf, sizeof(buf), "%s\n%s %s: %s\n", ERR_CMS_CONVERSION, ERR_CMS_OPEN_ICM_FILE, CMS_DISPLAY_ICM, preferences.display_icm_profile);
+ xsane_back_gtk_error(buf, TRUE);
+- return -1;
++ retval = -1;
++ goto out;
+ }
+
+
+@@ -2352,7 +2361,8 @@ static int xsane_viewer_read_image(Viewer *v)
+
+ snprintf(buf, sizeof(buf), "%s\n%s %s: %s\n", ERR_CMS_CONVERSION, ERR_CMS_OPEN_ICM_FILE, CMS_PROOF_ICM, cms_proof_icm_profile);
+ xsane_back_gtk_error(buf, TRUE);
+- return -1;
++ retval = -1;
++ goto out;
+ }
+
+ hTransform = cmsCreateProofingTransform(hInProfile, cms_input_format,
+@@ -2374,7 +2384,8 @@ static int xsane_viewer_read_image(Viewer *v)
+
+ snprintf(buf, sizeof(buf), "%s\n%s\n", ERR_CMS_CONVERSION, ERR_CMS_CREATE_TRANSFORM);
+ xsane_back_gtk_error(buf, TRUE);
+- return -1;
++ retval = -1;
++ goto out;
+ }
+ }
+ #endif
+@@ -2414,39 +2425,11 @@ static int xsane_viewer_read_image(Viewer *v)
+ row = malloc(((int) image_info.image_width * v->zoom) * image_info.channels);
+ }
+
+-#ifdef HAVE_LIBLCMS
+- if ((v->enable_color_management) && (v->cms_enable))
+- {
+- cms_row = malloc(((int) image_info.image_width * v->zoom) * image_info.channels);
+- }
+- else
+-#endif
++ if (!row || !src_row)
+ {
+- cms_row = row;
+- }
+-
+- if (!row || !src_row || !cms_row)
+- {
+- if (src_row)
+- {
+- free(src_row);
+- }
+-
+- if (row)
+- {
+- free(row);
+- }
+-
+-#ifdef HAVE_LIBLCMS
+- if ((cms_row) && (v->enable_color_management) && (v->cms_enable))
+- {
+- free(cms_row);
+- }
+-#endif
+-
+- fclose(infile);
+- DBG(DBG_error, "could not allocate memory\n");
+- return -1;
++ DBG(DBG_error, "could not allocate memory\n");
++ retval = -1;
++ goto out;
+ }
+
+
+@@ -2514,7 +2497,13 @@ static int xsane_viewer_read_image(Viewer *v)
+ guint16 *src_row16 = (guint16 *) src_row;
+ guint16 *dst_row16 = (guint16 *) row;
+
+- fseek(infile, pos0 + (((int) (y / v->zoom)) * image_info.image_width) * image_info.channels * 2, SEEK_SET);
++ if (fseek(infile, pos0 + (((int) (y / v->zoom)) * image_info.image_width) * image_info.channels * 2, SEEK_SET))
++ {
++ DBG(DBG_error, "could not seek in file '%s': '%s'\n", v->filename,
++ strerror(errno));
++ retval = -1;
++ goto out;
++ }
+ nread = fread(src_row, 2 * image_info.channels, image_info.image_width, infile);
+
+ if (image_info.channels > 1)
+@@ -2541,10 +2530,22 @@ static int xsane_viewer_read_image(Viewer *v)
+ #ifdef HAVE_LIBLCMS
+ if ((v->enable_color_management) && (v->cms_enable))
+ {
++ cms_row = malloc(((int) image_info.image_width * v->zoom) * image_info.channels);
++ if (! cms_row)
++ {
++ DBG(DBG_error, "could not allocate memory\n");
++ retval = -1;
++ goto out;
++ }
+ cmsDoTransform(hTransform, row, cms_row, image_info.image_width * v->zoom);
++ gtk_preview_draw_row(GTK_PREVIEW(v->window), cms_row, 0, y, image_info.image_width * v->zoom);
++ free(cms_row);
+ }
++ else
+ #endif
+- gtk_preview_draw_row(GTK_PREVIEW(v->window), cms_row, 0, y, image_info.image_width * v->zoom);
++ {
++ gtk_preview_draw_row(GTK_PREVIEW(v->window), row, 0, y, image_info.image_width * v->zoom);
++ }
+ }
+
+ gtk_preview_put(GTK_PREVIEW(v->window), v->window->window, v->window->style->black_gc, 0, 0, 0, 0,
+@@ -2610,9 +2611,23 @@ static int xsane_viewer_read_image(Viewer *v)
+ gtk_window_set_default_size(GTK_WINDOW(v->top), width, height);
+ }
+
+- free(row);
+- free(src_row);
+- fclose(infile);
++out:
++ if (row)
++ {
++ free(row);
++ }
++
++ if (src_row)
++ {
++ free(src_row);
++ }
++
++ /* cms_row is freed directly after use */
++
++ if (infile)
++ {
++ fclose(infile);
++ }
+
+ #ifdef HAVE_LIBLCMS
+ if ((v->enable_color_management) && (v->cms_enable))
+@@ -2621,7 +2636,7 @@ static int xsane_viewer_read_image(Viewer *v)
+ }
+ #endif
+
+- return 0;
++ return retval;
+ }
+
+ #if 0 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+@@ -3066,7 +3081,7 @@ Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_red
+ zoom_menu_item = gtk_menu_item_new_with_label(buf);
+ gtk_menu_append(GTK_MENU(zoom_menu), zoom_menu_item);
+ g_signal_connect(GTK_OBJECT(zoom_menu_item), "activate", (GtkSignalFunc) xsane_viewer_zoom_callback, v);
+- gtk_object_set_data(GTK_OBJECT(zoom_menu_item), "Selection", (void *) xsane_viewer_zoom[i]);
++ gtk_object_set_data(GTK_OBJECT(zoom_menu_item), "Selection", GINT_TO_POINTER(xsane_viewer_zoom[i]));
+ gtk_widget_show(zoom_menu_item);
+ if (v->zoom*100 == xsane_viewer_zoom[i])
+ {
+diff --git a/src/xsane.c b/src/xsane.c
+index 02b4da4..a4a3f1e 100644
+--- a/src/xsane.c
++++ b/src/xsane.c
+@@ -585,7 +585,7 @@ static void xsane_show_batch_scan_callback(GtkWidget * widget)
+
+ static void xsane_paper_orientation_callback(GtkWidget *widget, gpointer data)
+ {
+- int pos = (int) data;
++ int pos = GPOINTER_TO_INT(data);
+
+ DBG(DBG_proc, "xsane_paper_orientation_callback\n");
+
+@@ -601,7 +601,7 @@ static void xsane_printer_callback(GtkWidget *widget, gpointer data)
+
+ DBG(DBG_proc, "xsane_printer_callback\n");
+
+- preferences.printernr = (int) data;
++ preferences.printernr = GPOINTER_TO_INT(data);
+
+ switch (xsane.param.format)
+ {
+@@ -1165,7 +1165,7 @@ static void xsane_scanmode_menu_callback(GtkWidget *widget, gpointer data)
+
+ static void xsane_cms_function_menu_callback(GtkWidget *widget, gpointer data)
+ {
+- preferences.cms_function = (int) data;
++ preferences.cms_function = GPOINTER_TO_INT(data);
+ DBG(DBG_proc, "xsane_cms_function_menu_callback(%d)\n", preferences.cms_function);
+ }
+
+@@ -1402,7 +1402,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
+
+
+ gtk_container_add(GTK_CONTAINER(paper_orientation_menu), paper_orientation_item);
+- g_signal_connect(GTK_OBJECT(paper_orientation_item), "activate", (GtkSignalFunc) xsane_paper_orientation_callback, (void *) i);
++ g_signal_connect(GTK_OBJECT(paper_orientation_item), "activate", (GtkSignalFunc) xsane_paper_orientation_callback, GINT_TO_POINTER(i));
+
+ gtk_widget_show(paper_orientation_item);
+ }
+@@ -1436,7 +1436,7 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
+ GDK_F1+i, GDK_SHIFT_MASK, DEF_GTK_MENU_ACCEL_VISIBLE | DEF_GTK_ACCEL_LOCKED);
+ }
+ gtk_container_add(GTK_CONTAINER(xsane_printer_menu), xsane_printer_item);
+- g_signal_connect(GTK_OBJECT(xsane_printer_item), "activate", (GtkSignalFunc) xsane_printer_callback, (void *) i);
++ g_signal_connect(GTK_OBJECT(xsane_printer_item), "activate", (GtkSignalFunc) xsane_printer_callback, GINT_TO_POINTER(i));
+ gtk_widget_show(xsane_printer_item);
+ }
+
+@@ -1584,9 +1584,9 @@ GtkWidget *xsane_update_xsane_callback() /* creates the XSane option window */
+ {
+ xsane_medium_item = gtk_menu_item_new_with_label(preferences.medium[i]->name);
+ gtk_menu_append(GTK_MENU(xsane_medium_menu), xsane_medium_item);
+- g_signal_connect(GTK_OBJECT(xsane_medium_item), "button_press_event", (GtkSignalFunc) xsane_medium_context_menu_callback, (void *) i);
+- g_signal_connect(GTK_OBJECT(xsane_medium_item), "activate", (GtkSignalFunc) xsane_set_medium_callback, (void *) i);
+- gtk_object_set_data(GTK_OBJECT(xsane_medium_item), "Selection", (void *) i);
++ g_signal_connect(GTK_OBJECT(xsane_medium_item), "button_press_event", (GtkSignalFunc) xsane_medium_context_menu_callback, GINT_TO_POINTER(i));
++ g_signal_connect(GTK_OBJECT(xsane_medium_item), "activate", (GtkSignalFunc) xsane_set_medium_callback, GINT_TO_POINTER(i));
++ gtk_object_set_data(GTK_OBJECT(xsane_medium_item), "Selection", GINT_TO_POINTER(i));
+
+ gtk_widget_show(xsane_medium_item);
+ }
+@@ -2697,7 +2697,7 @@ static gint xsane_medium_move_up_callback(GtkWidget *widget, GtkWidget *medium_w
+
+ DBG(DBG_proc, "xsane_medium_move_up_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection"));
+
+ if (selection > 1) /* make sure "full range" stays at top */
+ {
+@@ -2732,7 +2732,7 @@ static gint xsane_medium_move_down_callback(GtkWidget *widget, GtkWidget *medium
+
+ DBG(DBG_proc, "xsane_medium_move_up_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection"));
+
+ if ((selection) && (selection < preferences.medium_definitions-1))
+ {
+@@ -2771,7 +2771,7 @@ static gint xsane_medium_rename_callback(GtkWidget *widget, GtkWidget *medium_wi
+
+ DBG(DBG_proc, "xsane_medium_rename_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection"));
+
+ oldname = strdup(preferences.medium[selection]->name);
+
+@@ -2779,7 +2779,7 @@ static gint xsane_medium_rename_callback(GtkWidget *widget, GtkWidget *medium_wi
+
+ /* set menu in correct state, is a bit strange this way but I do not have a better idea */
+ old_medium_menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(xsane.medium_widget));
+- old_selection = (int) gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_medium_menu))), "Selection");
++ old_selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_medium_menu))), "Selection"));
+ gtk_menu_popdown(GTK_MENU(old_medium_menu));
+ gtk_option_menu_set_history(GTK_OPTION_MENU(xsane.medium_widget), old_selection);
+
+@@ -2814,13 +2814,13 @@ static gint xsane_medium_add_callback(GtkWidget *widget, GtkWidget *medium_widge
+ DBG(DBG_proc, "xsane_medium_add_callback\n");
+
+ /* add new item after selected item */
+- selection = 1 + (int) gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection");
++ selection = 1 + GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection"));
+
+ oldname = strdup(TEXT_NEW_MEDIA_NAME);
+
+ /* set menu in correct state, is a bit strange this way but I do not have a better idea */
+ old_medium_menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(xsane.medium_widget));
+- old_selection = (int) gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_medium_menu))), "Selection");
++ old_selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(gtk_menu_get_active(GTK_MENU(old_medium_menu))), "Selection"));
+ gtk_menu_popdown(GTK_MENU(old_medium_menu));
+ gtk_option_menu_set_history(GTK_OPTION_MENU(xsane.medium_widget), old_selection);
+
+@@ -2895,7 +2895,7 @@ static gint xsane_medium_delete_callback(GtkWidget *widget, GtkWidget *medium_wi
+
+ DBG(DBG_proc, "xsane_medium_delete_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(medium_widget), "Selection"));
+
+ if (selection) /* full range can not be deleted */
+ {
+@@ -2951,7 +2951,7 @@ static gint xsane_medium_context_menu_callback(GtkWidget *widget, GdkEvent *even
+
+ DBG(DBG_proc, "xsane_medium_context_menu_callback\n");
+
+- selection = (int) gtk_object_get_data(GTK_OBJECT(widget), "Selection");
++ selection = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget), "Selection"));
+
+ if (event->type == GDK_BUTTON_PRESS)
+ {
+@@ -3022,7 +3022,7 @@ static gint xsane_medium_context_menu_callback(GtkWidget *widget, GdkEvent *even
+
+ static void xsane_set_medium_callback(GtkWidget *widget, gpointer data)
+ {
+- int medium_nr = (int) data;
++ int medium_nr = GPOINTER_TO_INT(data);
+
+ if (medium_nr != preferences.medium_nr)
+ {
+@@ -3205,11 +3205,11 @@ static void xsane_set_update_policy_callback(GtkWidget *widget, gpointer data)
+ DBG(DBG_proc, "xsane_set_update_policy_callback\n");
+
+ g_signal_handlers_block_by_func(GTK_OBJECT(xsane.update_policy_continu), (GtkSignalFunc) xsane_set_update_policy_callback,
+- (void *) GTK_UPDATE_CONTINUOUS);
++ GINT_TO_POINTER(GTK_UPDATE_CONTINUOUS));
+ g_signal_handlers_block_by_func(GTK_OBJECT(xsane.update_policy_discont), (GtkSignalFunc) xsane_set_update_policy_callback,
+- (void *) GTK_UPDATE_DISCONTINUOUS);
++ GINT_TO_POINTER(GTK_UPDATE_DISCONTINUOUS));
+ g_signal_handlers_block_by_func(GTK_OBJECT(xsane.update_policy_delayed), (GtkSignalFunc) xsane_set_update_policy_callback,
+- (void *) GTK_UPDATE_DELAYED);
++ GINT_TO_POINTER(GTK_UPDATE_DELAYED));
+
+ if (policy == GTK_UPDATE_CONTINUOUS)
+ {
+@@ -3231,11 +3231,11 @@ static void xsane_set_update_policy_callback(GtkWidget *widget, gpointer data)
+ }
+
+ g_signal_handlers_unblock_by_func(GTK_OBJECT(xsane.update_policy_continu), (GtkSignalFunc) xsane_set_update_policy_callback,
+- (void *) GTK_UPDATE_CONTINUOUS);
++ GINT_TO_POINTER(GTK_UPDATE_CONTINUOUS));
+ g_signal_handlers_unblock_by_func(GTK_OBJECT(xsane.update_policy_discont), (GtkSignalFunc) xsane_set_update_policy_callback,
+- (void *) GTK_UPDATE_DISCONTINUOUS);
++ GINT_TO_POINTER(GTK_UPDATE_DISCONTINUOUS));
+ g_signal_handlers_unblock_by_func(GTK_OBJECT(xsane.update_policy_delayed), (GtkSignalFunc) xsane_set_update_policy_callback,
+- (void *) GTK_UPDATE_DELAYED);
++ GINT_TO_POINTER(GTK_UPDATE_DELAYED));
+
+ preferences.gtk_update_policy = policy;
+ xsane_pref_save();
+@@ -3389,7 +3389,7 @@ static void xsane_info_dialog(GtkWidget *widget, gpointer data)
+ snprintf(buf, sizeof(buf), "%d bit", (int) (0.5 + log(opt->constraint.range->max+1.0) / log(2.0)));
+ label = xsane_info_table_text_new(table, buf, 1, 2);
+ }
+- else if ((!xsane.xsane_channels > 1) && (xsane.scanner_gamma_gray)) /* gray gamma correction by scanner */
++ else if ((!(xsane.xsane_channels > 1)) && (xsane.scanner_gamma_gray)) /* gray gamma correction by scanner */
+ {
+ const SANE_Option_Descriptor *opt;
+
+@@ -3807,6 +3807,13 @@ static void xsane_close_fds_for_exec(signed int first_fd_to_leave_open, ...)
+
+ open_max = (int) sysconf (_SC_OPEN_MAX);
+
++ if (open_max < 0)
++ {
++ DBG(DBG_error, "xsane_close_fds_for_exec(): Can't determine maximum "
++ "number of open files.");
++ return;
++ }
++
+ close_fds = malloc (open_max);
+
+ memset (close_fds, 1, open_max);
+@@ -4147,7 +4154,7 @@ static GtkWidget *xsane_view_build_menu(void)
+ {
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+- g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_set_update_policy_callback, (void *) GTK_UPDATE_CONTINUOUS);
++ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_set_update_policy_callback, GINT_TO_POINTER(GTK_UPDATE_CONTINUOUS));
+ gtk_widget_show(subitem);
+ xsane.update_policy_continu = subitem;
+
+@@ -4157,7 +4164,7 @@ static GtkWidget *xsane_view_build_menu(void)
+ {
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+- g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_set_update_policy_callback, (void *) GTK_UPDATE_DISCONTINUOUS);
++ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_set_update_policy_callback, GINT_TO_POINTER(GTK_UPDATE_DISCONTINUOUS));
+ gtk_widget_show(subitem);
+ xsane.update_policy_discont = subitem;
+
+@@ -4167,7 +4174,7 @@ static GtkWidget *xsane_view_build_menu(void)
+ {
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(subitem), TRUE);
+ }
+- g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_set_update_policy_callback, (void *) GTK_UPDATE_DELAYED);
++ g_signal_connect(GTK_OBJECT(subitem), "toggled", (GtkSignalFunc) xsane_set_update_policy_callback, GINT_TO_POINTER(GTK_UPDATE_DELAYED));
+ gtk_widget_show(subitem);
+ xsane.update_policy_delayed = subitem;
+
+@@ -5709,8 +5716,8 @@ static void xsane_choose_device(void)
+ gtk_widget_add_accelerator(button, "clicked", device_selection_accelerator_group, GDK_F1+i, 0, DEF_GTK_ACCEL_LOCKED);
+ }
+
+- g_signal_connect(GTK_OBJECT(button), "button_press_event", (GtkSignalFunc) xsane_select_device_by_mouse_callback, (void *) (long) i);
+- g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_select_device_by_key_callback, (void *) (long) i);
++ g_signal_connect(GTK_OBJECT(button), "button_press_event", (GtkSignalFunc) xsane_select_device_by_mouse_callback, GINT_TO_POINTER(i));
++ g_signal_connect(GTK_OBJECT(button), "clicked", (GtkSignalFunc) xsane_select_device_by_key_callback, GINT_TO_POINTER(i));
+ gtk_box_pack_start(GTK_BOX(device_vbox), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+ owner = gtk_radio_button_group(GTK_RADIO_BUTTON(button));;
+--
+1.9.0
+
diff --git a/source/xap/xsane/xsane-0.999-lcms2.patch b/source/xap/xsane/xsane-0.999-lcms2.patch
new file mode 100644
index 000000000..c3d696c28
--- /dev/null
+++ b/source/xap/xsane/xsane-0.999-lcms2.patch
@@ -0,0 +1,372 @@
+From 30af0e2edbf061b71bed9536d826894449f0390d Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 23 Sep 2013 16:11:31 +0200
+Subject: [PATCH] patch: lcms2
+
+Squashed commit of the following:
+
+commit f975accf7e1a08438b63580ea848457d373200f5
+Author: Nils Philippsen <nils@redhat.com>
+Date: Mon Sep 23 14:53:45 2013 +0200
+
+ Add support for lcms 2.x.
+---
+ configure.in | 22 ++++++++++++++----
+ include/config.h.in | 8 ++++++-
+ src/xsane-preview.c | 6 +++--
+ src/xsane-save.c | 38 ++++++++++++++++++++++++++-----
+ src/xsane-viewer.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++---
+ src/xsane.h | 8 ++++++-
+ 6 files changed, 130 insertions(+), 17 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index df7b114..3659c97 100644
+--- a/configure.in
++++ b/configure.in
+@@ -130,7 +130,17 @@ if test "${USE_TIFF}" = "yes"; then
+ fi
+
+ if test "${USE_LCMS}" = "yes"; then
+- AC_CHECK_LIB(lcms, cmsOpenProfileFromFile)
++ AC_SEARCH_LIBS(cmsOpenProfileFromFile, [lcms2 lcms])
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" != "no"; then
++ AC_DEFINE(HAVE_LIBLCMS, 1, [Define if LCMS is to be used.])
++ fi
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms2"; then
++ AC_DEFINE(HAVE_LIBLCMS2, 1, [Define if you have liblcms2.])
++ else
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms"; then
++ AC_DEFINE(HAVE_LIBLCMS1, 1, [Define if you have liblcms.])
++ fi
++ fi
+ fi
+
+ dnl Checks for library functions.
+@@ -294,10 +304,14 @@ else
+ echo "* - PNG support deactivated *"
+ fi
+
+-if test "${ac_cv_lib_lcms_cmsOpenProfileFromFile}" = "yes"; then
+- echo "* - LCMS (color management) support activated *"
++if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms2"; then
++ echo "* - LCMS (color management) support activated (lcms2) *"
+ else
+- echo "* - LCMS (color management) support deactivated *"
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms"; then
++ echo "* - LCMS (color management) support activated (lcms) *"
++ else
++ echo "* - LCMS (color management) support deactivated *"
++ fi
+ fi
+
+ echo "* *"
+diff --git a/include/config.h.in b/include/config.h.in
+index ecc9637..f9a3e40 100755
+--- a/include/config.h.in
++++ b/include/config.h.in
+@@ -290,9 +290,15 @@
+ /* Define if you have libtiff. */
+ #undef HAVE_LIBTIFF
+
+-/* Define if you have liblcms. */
++/* Define if LCMS is to be used. */
+ #undef HAVE_LIBLCMS
+
++/* Define if you have liblcms. */
++#undef HAVE_LIBLCMS1
++
++/* Define if you have liblcms2. */
++#undef HAVE_LIBLCMS2
++
+ #ifndef HAVE_STRNCASECMP
+ /* OS/2 needs this */
+ # define strncasecmp(a, b, c) strnicmp(a, b, c)
+diff --git a/src/xsane-preview.c b/src/xsane-preview.c
+index 6327ca7..6eaf687 100644
+--- a/src/xsane-preview.c
++++ b/src/xsane-preview.c
+@@ -6346,8 +6346,8 @@ int preview_do_color_correction(Preview *p)
+ cmsHPROFILE hOutProfile = NULL;
+ cmsHPROFILE hProofProfile = NULL;
+ cmsHTRANSFORM hTransform = NULL;
+- DWORD input_format, output_format;
+- DWORD cms_flags = 0;
++ cmsUInt32Number input_format, output_format;
++ cmsUInt32Number cms_flags = 0;
+ int proof = 0;
+ char *cms_proof_icm_profile = NULL;
+ int linesize = 0;
+@@ -6355,7 +6355,9 @@ int preview_do_color_correction(Preview *p)
+
+ DBG(DBG_proc, "preview_do_color_correction\n");
+
++#ifdef HAVE_LIBLCMS1
+ cmsErrorAction(LCMS_ERROR_SHOW);
++#endif
+
+ if (preferences.cms_bpc)
+ {
+diff --git a/src/xsane-save.c b/src/xsane-save.c
+index 75e0a63..2d0e44b 100644
+--- a/src/xsane-save.c
++++ b/src/xsane-save.c
+@@ -832,9 +832,9 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio
+ cmsHPROFILE hInProfile = NULL;
+ cmsHPROFILE hOutProfile = NULL;
+ cmsHTRANSFORM hTransform = NULL;
+- DWORD cms_input_format;
+- DWORD cms_output_format;
+- DWORD cms_flags = 0;
++ cmsUInt32Number cms_input_format;
++ cmsUInt32Number cms_output_format;
++ cmsUInt32Number cms_flags = 0;
+
+ if (cms_function == XSANE_CMS_FUNCTION_EMBED_SCANNER_ICM_PROFILE)
+ {
+@@ -843,7 +843,9 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio
+
+ DBG(DBG_info, "Prepare CMS transform\n");
+
++#ifdef HAVE_LIBLCMS1
+ cmsErrorAction(LCMS_ERROR_SHOW);
++#endif
+
+ if (cms_bpc)
+ {
+@@ -890,10 +892,18 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio
+ if (image_info->channels == 1) /* == 1 (grayscale) */
+ {
+ #if 1 /* xxx oli */
++# ifdef HAVE_LIBLCMS2
++ cmsToneCurve *Gamma = cmsBuildGamma(NULL, 2.2);
++# else
+ LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2);
++# endif
+
+ hOutProfile = cmsCreateGrayProfile(cmsD50_xyY(), Gamma);
++# ifdef HAVE_LIBLCMS2
++ cmsFreeToneCurve(Gamma);
++# else
+ cmsFreeGamma(Gamma);
++# endif
+ #endif
+ }
+ else
+@@ -2896,7 +2906,11 @@ static int xsane_write_CSA(FILE *outfile, char *input_profile, int intent)
+ return -1;
+ }
+
++#ifdef HAVE_LIBLCMS2
++ n = cmsGetPostScriptCSA(NULL, hProfile, intent, 0, NULL, 0);
++#else
+ n = cmsGetPostScriptCSA(hProfile, intent, NULL, 0);
++#endif
+ if (n == 0)
+ {
+ return -2;
+@@ -2908,7 +2922,11 @@ static int xsane_write_CSA(FILE *outfile, char *input_profile, int intent)
+ return -3;
+ }
+
++#ifdef HAVE_LIBLCMS2
++ cmsGetPostScriptCSA(NULL, hProfile, intent, 0, buffer, n);
++#else
+ cmsGetPostScriptCSA(hProfile, intent, buffer, n);
++#endif
+ buffer[n] = 0;
+
+ fprintf(outfile, "%s", buffer);
+@@ -2927,7 +2945,7 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int
+ cmsHPROFILE hProfile;
+ size_t n;
+ char* buffer;
+- DWORD flags = cmsFLAGS_NODEFAULTRESOURCEDEF;
++ cmsUInt32Number flags = cmsFLAGS_NODEFAULTRESOURCEDEF;
+
+ hProfile = cmsOpenProfileFromFile(output_profile, "r");
+ if (!hProfile)
+@@ -2940,7 +2958,11 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int
+ flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
+ }
+
++#ifdef HAVE_LIBLCMS2
++ n = cmsGetPostScriptCRD(NULL, hProfile, intent, flags, NULL, 0);
++#else
+ n = cmsGetPostScriptCRDEx(hProfile, intent, flags, NULL, 0);
++#endif
+ if (n == 0)
+ {
+ return -2;
+@@ -2952,7 +2974,11 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int
+ return -3;
+ }
+
++#ifdef HAVE_LIBLCMS2
++ cmsGetPostScriptCRD(NULL, hProfile, intent, flags, buffer, n);
++#else
+ cmsGetPostScriptCRDEx(hProfile, intent, flags, buffer, n);
++#endif
+ buffer[n] = 0;
+
+ fprintf(outfile, "%s", buffer);
+@@ -4349,7 +4375,7 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const
+ {
+ FILE *icm_profile;
+ size_t size, embed_len;
+- LPBYTE embed_buffer;
++ cmsUInt8Number *embed_buffer;
+
+ DBG(DBG_proc, "xsane_jpeg_embed_scanner_icm_profile(%s)\n", icm_filename);
+
+@@ -4363,7 +4389,7 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const
+ size = ftell(icm_profile);
+ fseek(icm_profile, 0, SEEK_SET);
+
+- embed_buffer = (LPBYTE) malloc(size + 1);
++ embed_buffer = (cmsUInt8Number *) malloc(size + 1);
+ if (embed_buffer)
+ {
+ embed_len = fread(embed_buffer, 1, size, icm_profile);
+diff --git a/src/xsane-viewer.c b/src/xsane-viewer.c
+index 69a444d..844c077 100644
+--- a/src/xsane-viewer.c
++++ b/src/xsane-viewer.c
+@@ -1795,6 +1795,9 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g
+ {
+ Viewer *v = (Viewer *) data;
+ int val;
++#ifdef HAVE_LIBLCMS2
++ cmsUInt16Number alarm_codes[cmsMAXCHANNELS];
++#endif
+
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[0]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+@@ -1811,6 +1814,49 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g
+ v->cms_gamut_alarm_color = val;
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(v->cms_gamut_alarm_color_widget[v->cms_gamut_alarm_color]), TRUE);
+
++#ifdef HAVE_LIBLCMS2
++ switch(v->cms_gamut_alarm_color)
++ {
++ default:
++ case 0: /* black */
++ alarm_codes[0] = (cmsUInt16Number) 0;
++ alarm_codes[1] = (cmsUInt16Number) 0;
++ alarm_codes[2] = (cmsUInt16Number) 0;
++ break;
++
++ case 1: /* gray */
++ alarm_codes[0] = (cmsUInt16Number) 128;
++ alarm_codes[1] = (cmsUInt16Number) 128;
++ alarm_codes[2] = (cmsUInt16Number) 128;
++ break;
++
++ case 2: /* white */
++ alarm_codes[0] = (cmsUInt16Number) 255;
++ alarm_codes[1] = (cmsUInt16Number) 255;
++ alarm_codes[2] = (cmsUInt16Number) 255;
++ break;
++
++ case 3: /* red */
++ alarm_codes[0] = (cmsUInt16Number) 255;
++ alarm_codes[1] = (cmsUInt16Number) 0;
++ alarm_codes[2] = (cmsUInt16Number) 0;
++ break;
++
++ case 4: /* green */
++ alarm_codes[0] = (cmsUInt16Number) 0;
++ alarm_codes[1] = (cmsUInt16Number) 255;
++ alarm_codes[2] = (cmsUInt16Number) 0;
++ break;
++
++ case 5: /* blue */
++ alarm_codes[0] = (cmsUInt16Number) 0;
++ alarm_codes[1] = (cmsUInt16Number) 0;
++ alarm_codes[2] = (cmsUInt16Number) 255;
++ break;
++ }
++
++ cmsSetAlarmCodes(alarm_codes);
++#else
+ switch(v->cms_gamut_alarm_color)
+ {
+ default:
+@@ -1838,6 +1884,7 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g
+ cmsSetAlarmCodes(0, 0, 255);
+ break;
+ }
++#endif
+
+ g_signal_handlers_unblock_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[0]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+ g_signal_handlers_unblock_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+@@ -2172,9 +2219,9 @@ static int xsane_viewer_read_image(Viewer *v)
+ cmsHTRANSFORM hTransform = NULL;
+ int proof = 0;
+ char *cms_proof_icm_profile = NULL;
+- DWORD cms_input_format;
+- DWORD cms_output_format;
+- DWORD cms_flags = 0;
++ cmsUInt32Number cms_input_format;
++ cmsUInt32Number cms_output_format;
++ cmsUInt32Number cms_flags = 0;
+ #endif
+
+ /* open imagefile */
+@@ -2203,7 +2250,9 @@ static int xsane_viewer_read_image(Viewer *v)
+
+ if ((v->enable_color_management) && (v->cms_enable))
+ {
++#ifdef HAVE_LIBLCMS1
+ cmsErrorAction(LCMS_ERROR_SHOW);
++#endif
+
+ if (v->cms_bpc)
+ {
+@@ -2801,6 +2850,9 @@ Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_red
+ GtkWidget *scrolled_window;
+ GtkWidget *zoom_option_menu, *zoom_menu, *zoom_menu_item;
+ int i, selection;
++#ifdef HAVE_LIBLCMS2
++ cmsUInt16Number alarm_codes[cmsMAXCHANNELS];
++#endif
+
+ DBG(DBG_proc, "viewer_new(%s)\n", filename);
+
+@@ -2830,8 +2882,15 @@ Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_red
+ v->cms_proofing_intent = INTENT_ABSOLUTE_COLORIMETRIC;
+ v->cms_gamut_check = 0;
+ v->cms_gamut_alarm_color = 3; /* red */
++#ifdef HAVE_LIBLCMS2
++ alarm_codes[0] = (cmsUInt16Number) 255;
++ alarm_codes[1] = (cmsUInt16Number) 0;
++ alarm_codes[2] = (cmsUInt16Number) 0;
++ cmsSetAlarmCodes(alarm_codes);
++#else
+ cmsSetAlarmCodes(255, 0, 0);
+ #endif
++#endif
+ if (selection_filetype)
+ {
+ v->selection_filetype = strdup(selection_filetype);
+diff --git a/src/xsane.h b/src/xsane.h
+index 4067d61..adcc0ed 100644
+--- a/src/xsane.h
++++ b/src/xsane.h
+@@ -70,7 +70,13 @@
+ #include <gtk/gtk.h>
+
+ #ifdef HAVE_LIBLCMS
+-# include "lcms.h"
++# ifdef HAVE_LIBLCMS2
++# include "lcms2.h"
++# else
++# include "lcms.h"
++typedef BYTE cmsUInt8Number;
++typedef DWORD cmsUInt32Number;
++# endif
+ #else
+ # define cmsHTRANSFORM void *
+ #endif
+--
+1.8.3.1
+
diff --git a/source/xap/xsane/xsane-0.999-man-page.patch b/source/xap/xsane/xsane-0.999-man-page.patch
new file mode 100644
index 000000000..169dad3e3
--- /dev/null
+++ b/source/xap/xsane/xsane-0.999-man-page.patch
@@ -0,0 +1,109 @@
+From 2dbbd80a5fb80741729c7cd5027af058b9c08c2c Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 8 Jul 2013 17:46:06 +0200
+Subject: [PATCH] patch: man-page
+
+Squashed commit of the following:
+
+commit e1915d50b677458127a8ad1c7953ee1d2e2ce250
+Author: Nils Philippsen <nils@redhat.com>
+Date: Mon Jul 8 17:44:26 2013 +0200
+
+ xsane.man: update command line options
+---
+ doc/xsane.man | 29 ++++++++++++++++++++++++-----
+ 1 file changed, 24 insertions(+), 5 deletions(-)
+
+diff --git a/doc/xsane.man b/doc/xsane.man
+index ee363a8..38b453d 100644
+--- a/doc/xsane.man
++++ b/doc/xsane.man
+@@ -4,6 +4,7 @@
+ xsane - scanner frontend for SANE
+ .SH SYNOPSIS
+ .B xsane
++.RB [ --help | -h ]
+ .RB [ --version | -v ]
+ .RB [ --license | -l ]
+ .RB [ --device-settings
+@@ -13,8 +14,9 @@ xsane - scanner frontend for SANE
+ .RB [ --viewer | -V ]
+ .RB [ --save | -s ]
+ .RB [ --copy | -c ]
++.RB [ --multipage | -m ]
+ .RB [ --fax | -f ]
+-.RB [ --mail | -m ]
++.RB [ --email | -e ]
+ .RB [ --no-mode-selection | -n ]
+ .RB [ --Fixed | -F ]
+ .RB [ --Resizable | -R ]
+@@ -25,6 +27,7 @@ xsane - scanner frontend for SANE
+ .IR name ]
+ .RB [ --display
+ .IR d ]
++.RB [ --no-xshm ]
+ .RB [ --sync ]
+ .RI [ devicename ]
+ .SH DESCRIPTION
+@@ -121,6 +124,12 @@ and
+ .SH OPTIONS
+ .PP
+ If the
++.B --help
++or
++.B -h
++flag is given xsane displays a short help message and exits.
++.PP
++If the
+ .B --version
+ or
+ .B -v
+@@ -128,7 +137,7 @@ flag is given xsane prints a version information, some
+ information about gtk+ and gimp version it is compiled
+ against and lists the supported file formats, then it exits.
+ .PP
+-when the
++If the
+ .B --license
+ or
+ .B -l
+@@ -161,16 +170,22 @@ or
+ flag forces xsane to start in copy mode.
+ .PP
+ The
++.B --multipage
++or
++.B -m
++flag forces xsane to start in multipage mode.
++.PP
++The
+ .B --fax
+ or
+ .B -f
+ flag forces xsane to start in fax mode.
+ .PP
+ The
+-.B --mail
++.B --email
+ or
+-.B -m
+-flag forces xsane to start in mail mode.
++.B -e
++flag forces xsane to start in e-mail mode.
+ .PP
+ The
+ .B --no-mode-selection
+@@ -217,6 +232,10 @@ flag selects the X11 display used to present the graphical user-interface
+ for details).
+ .PP
+ The
++.B --no-xshm
++flag forces xsane not to use shared memory images.
++.PP
++The
+ .B --sync
+ flag requests a synchronous connection with the X11 server. This is for
+ debugging purposes only.
+--
+1.8.3.1
+
diff --git a/source/xap/xsane/xsane-0.999-no-file-selected.patch b/source/xap/xsane/xsane-0.999-no-file-selected.patch
new file mode 100644
index 000000000..5550c4c08
--- /dev/null
+++ b/source/xap/xsane/xsane-0.999-no-file-selected.patch
@@ -0,0 +1,91 @@
+From 2f7abcaa7ad39f118b2f49fdcba9c90b37b3d972 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Fri, 5 Jul 2013 16:15:55 +0200
+Subject: [PATCH] patch: no-file-selected
+
+Squashed commit of the following:
+
+commit f887550276e324151947960292a7266c71aeb573
+Author: Pavel Polischouk <pavel.polischouk@gmail.com>
+Date: Fri Nov 25 23:55:49 2011 -0500
+
+ fix changing working directory (#621778)
+
+ The patch checks the value returned by xsane_back_gtk_get_filename. In
+ most places it will check the result properly (taking 0 for success),
+ except one case where it takes 0 for an error, and this happens in
+ xsane_browse_filename_callback (xsane-front-gtk.c). The new code would
+ abort copying the filename into preferences structure if 0 was returned,
+ and that's the OK case. I'm very curious how wonderfully it would blow
+ up if an actual error was returned, but that's a different story.
+
+commit 2c02ddd8282fa231107d8860aee4d92bdb5cb8e8
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Nov 19 12:25:54 2010 +0100
+
+ don't crash if no files are selected (#608047)
+---
+ src/xsane-back-gtk.c | 20 ++++++++++++++++----
+ src/xsane-front-gtk.c | 6 +++++-
+ 2 files changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/src/xsane-back-gtk.c b/src/xsane-back-gtk.c
+index bca9eb2..6ef1506 100644
+--- a/src/xsane-back-gtk.c
++++ b/src/xsane-back-gtk.c
+@@ -1111,6 +1111,11 @@ static void xsane_back_gtk_filetype2_callback(GtkWidget *widget, gpointer data)
+
+ chooser_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooser));
+
++ if (!chooser_filename)
++ {
++ return;
++ }
++
+ if ((new_filetype) && (*new_filetype))
+ {
+ extension = strrchr(chooser_filename, '.');
+@@ -1505,12 +1510,19 @@ int xsane_back_gtk_get_filename(const char *label, const char *default_name, siz
+ #endif
+
+ chooser_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooser));
+- strncpy(filename, chooser_filename, max_len - 1);
+- g_free(chooser_filename);
++ if (chooser_filename)
++ {
++ strncpy(filename, chooser_filename, max_len - 1);
++ g_free(chooser_filename);
+
+- filename[max_len - 1] = '\0';
++ filename[max_len - 1] = '\0';
+
+- ok = TRUE;
++ ok = TRUE;
++ }
++ else
++ {
++ ok = FALSE;
++ }
+ }
+
+ gtk_widget_destroy(filechooser);
+diff --git a/src/xsane-front-gtk.c b/src/xsane-front-gtk.c
+index 4c973fb..7bb49b0 100644
+--- a/src/xsane-front-gtk.c
++++ b/src/xsane-front-gtk.c
+@@ -1333,7 +1333,11 @@ static void xsane_browse_filename_callback(GtkWidget *widget, gpointer data)
+ snprintf(windowname, sizeof(windowname), "%s %s %s", xsane.prog_name, WINDOW_OUTPUT_FILENAME, xsane.device_text);
+
+ umask((mode_t) preferences.directory_umask); /* define new file permissions */
+- xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, &preferences.filetype, &preferences.cms_function, XSANE_FILE_CHOOSER_ACTION_SELECT_SAVE, show_extra_widgets, XSANE_FILE_FILTER_ALL | XSANE_FILE_FILTER_IMAGES, XSANE_FILE_FILTER_IMAGES);
++ if (xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, &preferences.filetype, &preferences.cms_function, XSANE_FILE_CHOOSER_ACTION_SELECT_SAVE, show_extra_widgets, XSANE_FILE_FILTER_ALL | XSANE_FILE_FILTER_IMAGES, XSANE_FILE_FILTER_IMAGES) < 0)
++ {
++ xsane_set_sensitivity(TRUE);
++ return;
++ }
+ umask(XSANE_DEFAULT_UMASK); /* define new file permissions */
+
+ if (preferences.filename)
+--
+1.8.3.1
+
diff --git a/source/xap/xsane/xsane-0.999-pdf-no-high-bpp.patch b/source/xap/xsane/xsane-0.999-pdf-no-high-bpp.patch
new file mode 100644
index 000000000..10cdbea34
--- /dev/null
+++ b/source/xap/xsane/xsane-0.999-pdf-no-high-bpp.patch
@@ -0,0 +1,51 @@
+From c0686879ac66c1933aefbb62b69afb0c9a0db912 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 9 Sep 2013 17:13:15 +0200
+Subject: [PATCH] patch: pdf-no-high-bpp
+
+Squashed commit of the following:
+
+commit 9f7d97e114389595481f6e9d3ac1038972f3f73b
+Author: Nils Philippsen <nils@redhat.com>
+Date: Mon Sep 9 17:08:38 2013 +0200
+
+ avoid producing PDFs with bpp > 8
+---
+ src/xsane-save.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/src/xsane-save.c b/src/xsane-save.c
+index 5461bf1..75e0a63 100644
+--- a/src/xsane-save.c
++++ b/src/xsane-save.c
+@@ -4205,6 +4205,18 @@ int xsane_save_pdf(FILE *outfile, FILE *imagefile, Image_info *image_info, float
+
+ *cancel_save = 0;
+
++ if (image_info->depth > 8)
++ {
++ char buf[TEXTBUFSIZE];
++
++ snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, "PDF doesn't allow bit depths > 8");
++ DBG(DBG_error, "%s\n", buf);
++ xsane_back_gtk_decision(ERR_HEADER_ERROR, (gchar **) error_xpm, buf, BUTTON_OK, NULL, TRUE /* wait */);
++ *cancel_save = 1;
++
++ goto bail_out;
++ }
++
+ xsane_save_pdf_create_document_header(outfile, &xref, 1, flatedecode);
+
+ if (apply_ICM_profile && (cms_function == XSANE_CMS_FUNCTION_EMBED_SCANNER_ICM_PROFILE))
+@@ -4232,6 +4244,8 @@ int xsane_save_pdf(FILE *outfile, FILE *imagefile, Image_info *image_info, float
+ *cancel_save = 1;
+ }
+
++bail_out:
++
+ return (*cancel_save);
+ }
+
+--
+1.8.3.1
+
diff --git a/source/xap/xsane/xsane-0.999-signal-handling.patch b/source/xap/xsane/xsane-0.999-signal-handling.patch
new file mode 100644
index 000000000..b9da71a1e
--- /dev/null
+++ b/source/xap/xsane/xsane-0.999-signal-handling.patch
@@ -0,0 +1,242 @@
+From 3b5d3b7e1f320b0bfbe48024a586c0a22375aa2d Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 3 Jul 2014 10:38:03 +0200
+Subject: [PATCH] patch: signal-handling
+
+Squashed commit of the following:
+
+commit 1e9e8cf5edc469114c8eadf46817cd5c1261b35c
+Author: Nils Philippsen <nils@redhat.com>
+Date: Thu Jul 3 10:14:52 2014 +0200
+
+ don't use g_unix_open_pipe(), g_unix_fd_add()
+
+ These functions have only recently been added to glib. Use pipe()/
+ fcntl() and g_io_channel_unix_new()/g_io_add_watch() instead which are
+ available in the minimum glib version needed for gtk+-2.x.
+
+commit acbdf3f693d3d2a78ee7490ca1bf76957daf00cf
+Author: Nils Philippsen <nils@redhat.com>
+Date: Thu Mar 13 13:38:12 2014 +0100
+
+ separate signal handlers in top and bottom half
+
+ This is to avoid race-conditions occurring when a signal is received
+ while the signal handler is not yet finished. It also avoids calling
+ non-reentrant functions from a signal handler. The top half (the real
+ signal handler) just writes a character into a pipe which gets picked up
+ and serviced by the bottom half from the normal event loop, this
+ serializes things and makes using non-reentrant functions safe.
+---
+ src/xsane.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------
+ 1 file changed, 136 insertions(+), 15 deletions(-)
+
+diff --git a/src/xsane.c b/src/xsane.c
+index 2b9211b..fc2ebbe 100644
+--- a/src/xsane.c
++++ b/src/xsane.c
+@@ -47,6 +47,7 @@
+ #endif
+
+ #include <sys/wait.h>
++#include <glib-unix.h>
+
+ #include <stdarg.h>
+
+@@ -121,6 +122,7 @@ static const Preferences_medium_t pref_default_medium[]=
+
+ int DBG_LEVEL = 0;
+ static guint xsane_resolution_timer = 0;
++static int xsane_signal_pipe[2];
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+
+@@ -161,8 +163,11 @@ void xsane_pref_save(void);
+ static int xsane_pref_restore(void);
+ static void xsane_pref_save_media(void);
+ static void xsane_pref_restore_media(void);
+-static RETSIGTYPE xsane_quit_handler(int signal);
+-static RETSIGTYPE xsane_sigchld_handler(int signal);
++static RETSIGTYPE xsane_signal_handler_top_half(int signal);
++static gboolean xsane_signal_handler_bottom_half(GIOChannel *source,
++ GIOCondition condition,
++ gpointer user_data);
++static void xsane_sigchld_handler(void);
+ static void xsane_quit(void);
+ static void xsane_exit(void);
+ static gint xsane_standard_option_win_delete(GtkWidget *widget, gpointer data);
+@@ -2296,16 +2301,119 @@ static void xsane_pref_restore_media(void)
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+
+-static RETSIGTYPE xsane_quit_handler(int signal)
++static RETSIGTYPE xsane_signal_handler_top_half(int signal)
+ {
+- DBG(DBG_proc, "xsane_quit_handler\n");
++ const char *msg_func = "xsane_signal_handler_top_half(): ";
++ const char *msg_short_write = "Short write() while processing signal.\n";
++ const char *msg_err = "Error during write().\n";
++ char sig_char;
++ ssize_t written;
++ int errno_saved = errno;
+
+- xsane_quit();
++ switch (signal)
++ {
++ case SIGTERM:
++ sig_char = 't';
++ break;
++ case SIGINT:
++ sig_char = 'i';
++ break;
++ case SIGHUP:
++ sig_char = 'h';
++ break;
++ case SIGCHLD:
++ sig_char = 'c';
++ break;
++ default:
++ sig_char = '?';
++ break;
++ }
++
++ if ((written = write(xsane_signal_pipe[1], &sig_char, 1)) <= 0)
++ {
++ /* At this point, all bets are off. Salvage what we can. */
++
++ const char *msg = (written == 0) ? msg_short_write : msg_err;
++
++ if ((write(STDERR_FILENO, msg_func, strlen(msg_func)) < 0) ||
++ (write(STDERR_FILENO, msg, strlen(msg)) < 0))
++ {
++ /* This is really a no-op, but at this point it doesn't really matter
++ * anymore if the writes succeeded or not. */
++ goto bail_out;
++ }
++
++bail_out:
++ /* Ignore SIGCHLD errors, zombie processes don't hurt that much. */
++ if (signal != SIGCHLD)
++ {
++ struct SIGACTION act;
++ memset(&act, 0, sizeof(act));
++ act.sa_handler = SIG_DFL;
++ sigaction(signal, &act, NULL);
++ raise(signal);
++ }
++ }
++
++ errno = errno_saved;
++}
++
++static gboolean xsane_signal_handler_bottom_half(GIOChannel *source,
++ GIOCondition condition,
++ gpointer user_data)
++{
++ char sig_char;
++ ssize_t readlen;
++
++ DBG(DBG_proc, "xsane_signal_handler_bottom_half\n");
++
++ while ((readlen = read(xsane_signal_pipe[0], &sig_char, 1)) != 0)
++ {
++ if (readlen < 0)
++ {
++ if (errno == EINTR)
++ {
++ /* if interrupted by signal, just repeat reading */
++ continue;
++ }
++ else
++ {
++ break;
++ }
++ }
++
++ switch (sig_char)
++ {
++ case 't':
++ case 'i':
++ case 'h':
++ xsane_quit();
++ break;
++ case 'c':
++ xsane_sigchld_handler();
++ break;
++ default:
++ DBG(DBG_error,
++ "Don't know how to cope with character-encoded signal: '%c'\n",
++ sig_char);
++ break;
++ }
++ }
++
++ /* previous invocation might have read more than it should, so ignore
++ * EAGAIN/EWOULDBLOCK */
++ if (readlen < 0 && errno != EAGAIN && errno != EWOULDBLOCK)
++ {
++ DBG(DBG_error, "Error while reading from pipe: %d '%s'\n", errno,
++ strerror(errno));
++ }
++
++ return TRUE;
+ }
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+
+-static RETSIGTYPE xsane_sigchld_handler(int signal)
++static void xsane_sigchld_handler(void)
+ {
+ int status;
+ XsaneChildprocess **childprocess_listptr = &xsane.childprocess_list;
+@@ -6026,6 +6134,8 @@ void xsane_interface(int argc, char **argv)
+ {
+ struct SIGACTION act;
+
++ GIOChannel *gio_pipe_read;
++
+ DBG(DBG_proc, "xsane_interface\n");
+
+ xsane.info_label = NULL;
+@@ -6069,18 +6179,29 @@ void xsane_interface(int argc, char **argv)
+ }
+ }
+
++ if ((pipe(xsane_signal_pipe) == -1) ||
++ (fcntl(xsane_signal_pipe[0], F_SETFD, FD_CLOEXEC) == -1) ||
++ (fcntl(xsane_signal_pipe[0], F_SETFL, O_NONBLOCK) == -1) ||
++ (fcntl(xsane_signal_pipe[1], F_SETFD, FD_CLOEXEC) == -1) ||
++ (fcntl(xsane_signal_pipe[1], F_SETFL, O_NONBLOCK) == -1) ||
++ !(gio_pipe_read = g_io_channel_unix_new(xsane_signal_pipe[0])) ||
++ !g_io_add_watch(gio_pipe_read, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI,
++ xsane_signal_handler_bottom_half, NULL))
++ {
++ DBG(DBG_error,
++ "Couldn't create signal handling pipe, set flags on it or install\n"
++ "bottom half of handler.\n");
++ exit(1);
++ }
++
+ /* define SIGTERM, SIGINT, SIGHUP-handler to make sure that e.g. all temporary files are deleted */
+ /* when xsane gets such a signal */
+ memset(&act, 0, sizeof(act));
+- act.sa_handler = xsane_quit_handler;
+- sigaction(SIGTERM, &act, 0);
+- sigaction(SIGINT, &act, 0);
+- sigaction(SIGHUP, &act, 0);
+-
+- /* add a signal handler that cleans up zombie child processes */
+- memset(&act, 0, sizeof(act));
+- act.sa_handler = xsane_sigchld_handler;
+- sigaction(SIGCHLD, &act, 0);
++ act.sa_handler = xsane_signal_handler_top_half;
++ sigaction(SIGTERM, &act, NULL);
++ sigaction(SIGINT, &act, NULL);
++ sigaction(SIGHUP, &act, NULL);
++ sigaction(SIGCHLD, &act, NULL);
+
+ gtk_main();
+ sane_exit();
+--
+1.9.3
+
diff --git a/source/xap/xsane/xsane-0.999-snprintf-update.patch b/source/xap/xsane/xsane-0.999-snprintf-update.patch
new file mode 100644
index 000000000..20cf52c1e
--- /dev/null
+++ b/source/xap/xsane/xsane-0.999-snprintf-update.patch
@@ -0,0 +1,1390 @@
+diff -up xsane-0.999/lib/snprintf.c.OLD xsane-0.999/lib/snprintf.c
+--- xsane-0.999/lib/snprintf.c.OLD 2014-05-29 10:42:26.795419830 -0400
++++ xsane-0.999/lib/snprintf.c 2014-05-29 10:48:58.544431002 -0400
+@@ -2,180 +2,616 @@
+
+ #ifndef HAVE_SNPRINTF
+
+-/***************************************************************************
+- * LPRng - An Extended Print Spooler System
+- *
+- * Copyright 1988-1997, Patrick Powell, San Diego, CA
+- * papowell@sdsu.edu
+- * See below for conditions of use.
+- *
+- ***************************************************************************
+- * MODULE: snprintf.c
+- * PURPOSE: LPRng version of printf - absolutely bombproof (hopefully!)
++/**************************************************************************
++ * Copyright 1994-2003 Patrick Powell, San Diego, CA <papowell@lprng.com>
+ **************************************************************************/
+-#if 0
+-
+- The "Artistic License"
+-
+- Preamble
+-
+-The intent of this document is to state the conditions under which a
+-Package may be copied, such that the Copyright Holder maintains some
+-semblance of artistic control over the development of the package,
+-while giving the users of the package the right to use and distribute
+-the Package in a more-or-less customary fashion, plus the right to make
+-reasonable modifications.
+-
+-Definitions:
+-
+- "Package" refers to the collection of files distributed by the
+- Copyright Holder, and derivatives of that collection of files
+- created through textual modification.
+-
+- "Standard Version" refers to such a Package if it has not been
+- modified, or has been modified in accordance with the wishes
+- of the Copyright Holder as specified below.
+-
+- "Copyright Holder" is whoever is named in the copyright or
+- copyrights for the package.
+-
+- "You" is you, if you are thinking about copying or distributing
+- this Package.
+-
+- "Reasonable copying fee" is whatever you can justify on the
+- basis of media cost, duplication charges, time of people involved,
+- and so on. (You will not be required to justify it to the
+- Copyright Holder, but only to the computing community at large
+- as a market that must bear the fee.)
+
+- "Freely Available" means that no fee is charged for the item
+- itself, though there may be fees involved in handling the item.
+- It also means that recipients of the item may redistribute it
+- under the same conditions they received it.
+-
+-1. You may make and give away verbatim copies of the source form of the
+-Standard Version of this Package without restriction, provided that you
+-duplicate all of the original copyright notices and associated disclaimers.
+-
+-2. You may apply bug fixes, portability fixes and other modifications
+-derived from the Public Domain or from the Copyright Holder. A Package
+-modified in such a way shall still be considered the Standard Version.
+-
+-3. You may otherwise modify your copy of this Package in any way, provided
+-that you insert a prominent notice in each changed file stating how and
+-when you changed that file, and provided that you do at least ONE of the
+-following:
+-
+- a) place your modifications in the Public Domain or otherwise make them
+- Freely Available, such as by posting said modifications to Usenet or
+- an equivalent medium, or placing the modifications on a major archive
+- site such as uunet.uu.net, or by allowing the Copyright Holder to include
+- your modifications in the Standard Version of the Package.
+-
+- b) use the modified Package only within your corporation or organization.
+-
+- c) rename any non-standard executables so the names do not conflict
+- with standard executables, which must also be provided, and provide
+- a separate manual page for each non-standard executable that clearly
+- documents how it differs from the Standard Version.
+-
+- d) make other distribution arrangements with the Copyright Holder.
+-
+-4. You may distribute the programs of this Package in object code or
+-executable form, provided that you do at least ONE of the following:
++/*
++ Overview:
+
+- a) distribute a Standard Version of the executables and library files,
+- together with instructions (in the manual page or equivalent) on where
+- to get the Standard Version.
++ snprintf( char *buffer, int len, const char *format,...)
++ plp_unsafe_snprintf( char *buffer, int len, const char *format,...)
++ its horribly unsafe companion that does NOT protect you from
++ the printing of evil control characters, but may be necessary
++ See the man page documentation below
++
++ This version of snprintf was developed originally for printing
++ on a motley collection of specialized hardware that had NO IO
++ library. Due to contractual restrictions, a clean room implementation
++ of the printf() code had to be developed.
++
++ The method chosen for printf was to be as paranoid as possible,
++ as these platforms had NO memory protection, and very small
++ address spaces. This made it possible to try to print
++ very long strings, i.e. - all of memory, very easily. To guard
++ against this, all printing was done via a buffer, generous enough
++ to hold strings, but small enough to protect against overruns,
++ etc.
++
++ Strangely enough, this proved to be of immense importance when
++ SPRINTFing to a buffer on a stack... The rest, of course, is
++ well known, as buffer overruns in the stack are a common way to
++ do horrible things to operating systems, security, etc etc.
++
++ This version of snprintf is VERY limited by modern standards.
++
++ Revision History:
++ First Released Version - 1994. This version had NO comments.
++ First Released Version - 1994. This version had NO comments.
++ Second Major Released Version - Tue May 23 10:43:44 PDT 2000
++ Configuration and other items changed. Read this doc.
++ Treat this as a new version.
++ Minor Revision - Mon Apr 1 09:41:28 PST 2002
++ - fixed up some constants and casts
++
++ COPYRIGHT AND TERMS OF USE:
++
++ You may use, copy, distribute, or otherwise incorporate this software
++ and documentation into any product or other item, provided that
++ the copyright in the documentation and source code as well as the
++ source code generated constant strings in the object, executable
++ or other code remain in place and are present in executable modules
++ or objects.
++
++ You may modify this code as appropriate to your usage; however the
++ modified version must be identified by changing the various source
++ and object code identification strings as is appropriately noted
++ in the source code.
++
++ You can use this with the GNU CONFIGURE utility.
++ This should define the following macros appropriately:
++
++ HAVE_STDARG_H - if the <stdargs.h> include file is available
++ HAVE_VARARG_H - if the <varargs.h> include file is available
++
++ HAVE_STRERROR - if the strerror() routine is available.
++ If it is not available, then examine the lines containing
++ the tests below.
++
++ HAVE_SYS_ERRLIST - have sys_errlist available
++ HAVE_DECL_SYS_ERRLIST - sys_errlist declaration in include files
++ HAVE_SYS_NERR - have sys_nerr available
++ HAVE_DECL_SYS_NERR - sys_nerr declaration in include files
++
++ HAVE_QUAD_T - if the quad_t type is defined
++ HAVE_LONG_LONG - if the long long type is defined
++ HAVE_LONG_DOUBLE - if the long double type is defined
++
++ If you are using the GNU configure (autoconf) facility, add the
++ following line to the configure.in file, to force checking for the
++ quad_t and long long data types:
++
++
++ AC_CHECK_HEADERS(stdlib.h,stdio.h,unistd.h,errno.h)
++ AC_CHECK_FUNCS(strerror)
++ AC_CACHE_CHECK(for errno,
++ ac_cv_errno,
++ [
++ AC_TRY_LINK(,[extern int errno; return (errno);],
++ ac_cv_errno=yes, ac_cv_errno=no)
++ ])
++ if test "$ac_cv_errno" = yes; then
++ AC_DEFINE(HAVE_ERRNO)
++ AC_CACHE_CHECK(for errno declaration,
++ ac_cv_decl_errno,
++ [
++ AC_TRY_COMPILE([
++ #include <stdio.h>
++ #ifdef HAVE_STDLIB_H
++ #include <stdlib.h>
++ #endif
++ #ifdef HAVE_UNISTD_H
++ #include <unistd.h>
++ #endif
++ #ifdef HAVE_ERRNO_H
++ #include <errno.h>
++ ],[return(sys_nerr);],
++ ac_cv_decl_errno=yes, ac_cv_decl_errno=no)
++ ])
++ if test "$ac_cv_decl_errno" = yes; then
++ AC_DEFINE(HAVE_DECL_ERRNO)
++ fi;
++ fi
++
++ AC_CACHE_CHECK(for sys_nerr,
++ ac_cv_sys_nerr,
++ [
++ AC_TRY_LINK(,[extern int sys_nerr; return (sys_nerr);],
++ ac_cv_sys_nerr=yes, ac_cv_sys_nerr=no)
++ ])
++ if test "$ac_cv_sys_nerr" = yes; then
++ AC_DEFINE(HAVE_SYS_NERR)
++ AC_CACHE_CHECK(for sys_nerr declaration,
++ ac_cv_decl_sys_nerr,
++ [
++ AC_TRY_COMPILE([
++ #include <stdio.h>
++ #ifdef HAVE_STDLIB_H
++ #include <stdlib.h>
++ #endif
++ #ifdef HAVE_UNISTD_H
++ #include <unistd.h>
++ #endif],[return(sys_nerr);],
++ ac_cv_decl_sys_nerr_def=yes, ac_cv_decl_sys_nerr_def=no)
++ ])
++ if test "$ac_cv_decl_sys_nerr" = yes; then
++ AC_DEFINE(HAVE_DECL_SYS_NERR)
++ fi
++ fi
++
++
++ AC_CACHE_CHECK(for sys_errlist array,
++ ac_cv_sys_errlist,
++ [AC_TRY_LINK(,[extern char *sys_errlist[];
++ sys_errlist[0];],
++ ac_cv_sys_errlist=yes, ac_cv_sys_errlist=no)
++ ])
++ if test "$ac_cv_sys_errlist" = yes; then
++ AC_DEFINE(HAVE_SYS_ERRLIST)
++ AC_CACHE_CHECK(for sys_errlist declaration,
++ ac_cv_sys_errlist_def,
++ [AC_TRY_COMPILE([
++ #include <stdio.h>
++ #include <errno.h>
++ #ifdef HAVE_STDLIB_H
++ #include <stdlib.h>
++ #endif
++ #ifdef HAVE_UNISTD_H
++ #include <unistd.h>
++ #endif],[char *s = sys_errlist[0]; return(*s);],
++ ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)
++ ])
++ if test "$ac_cv_decl_sys_errlist" = yes; then
++ AC_DEFINE(HAVE_DECL_SYS_ERRLIST)
++ fi
++ fi
++
++
++
++ AC_CACHE_CHECK(checking for long long,
++ ac_cv_long_long,
++ [
++ AC_TRY_COMPILE([
++ #include <stdio.h>
++ #include <sys/types.h>
++ ], [printf("%d",sizeof(long long));],
++ ac_cv_long_long=yes, ac_cv_long_long=no)
++ ])
++ if test $ac_cv_long_long = yes; then
++ AC_DEFINE(HAVE_LONG_LONG)
++ fi
++
++ AC_CACHE_CHECK(checking for long double,
++ ac_cv_long_double,
++ [
++ AC_TRY_COMPILE([
++ #include <stdio.h>
++ #include <sys/types.h>
++ ], [printf("%d",sizeof(long double));],
++ ac_cv_long_double=yes, ac_cv_long_double=no)
++ ])
++ if test $ac_cv_long_double = yes; then
++ AC_DEFINE(HAVE_LONG_DOUBLE)
++ fi
++
++ AC_CACHE_CHECK(checking for quad_t,
++ ac_cv_quad_t,
++ [
++ AC_TRY_COMPILE([
++ #include <stdio.h>
++ #include <sys/types.h>
++ ], [printf("%d",sizeof(quad_t));],
++ ac_cv_quad_t=yes, ac_cv_quad_t=no)
++ ])
++ if test $ac_cv_quad_t = yes; then
++ AC_DEFINE(HAVE_QUAD_T)
++ fi
++
++
++
++ NAME
++ snprintf, plp_vsnprintf - formatted output conversion
++
++ SYNOPSIS
++ #include <stdio.h>
++ #include <stdarg.h>
++
++ int
++ snprintf(const char *format, size_t size, va_list ap);
++ int
++ plp_unsafe_snprintf(const char *format, size_t size, va_list ap);
++
++ AKA snprintf and unsafe_snprintf in the documentation below
++
++ int
++ vsnprintf(char *str, size_t size, const char *format, va_list ap);
++ int
++ unsafe_vsnprintf(char *str, size_t size, const char *format, va_list ap);
++
++ AKA vsnprintf and unsafe_vsnprintf in the documentation below
++
++ (Multithreaded Safe)
++
++ DESCRIPTION
++ The printf() family of functions produces output according to
++ a format as described below. Snprintf(), and vsnprintf()
++ write to the character string str. These functions write the
++ output under the control of a format string that specifies
++ how subsequent arguments (or arguments accessed via the
++ variable-length argument facilities of stdarg(3)) are converted
++ for output. These functions return the number of characters
++ printed (not including the trailing `\0' used to end output
++ to strings). Snprintf() and vsnprintf() will write at most
++ size-1 of the characters printed into the output string (the
++ size'th character then gets the terminating `\0'); if the
++ return value is greater than or equal to the size argument,
++ the string was too short and some of the printed characters
++ were discarded. The size or str may be given as zero to find
++ out how many characters are needed; in this case, the str
++ argument is ignored.
++
++ By default, the snprintf function will not format control
++ characters (except new line and tab) in strings. This is a
++ safety feature that has proven to be extremely critical when
++ using snprintf for secure applications and when debugging.
++ If you MUST have control characters formatted or printed,
++ then use the unsafe_snprintf() and unsafe_vsnprintf() and on
++ your own head be the consequences. You have been warned.
++
++ There is one exception to the comments above, and that is
++ the "%c" (character) format. It brutally assumes that the
++ user will have performed the necessary 'isprint()' or other
++ checks and uses the integer value as a character.
++
++ The format string is composed of zero or more directives:
++ ordinary characters (not %), which are copied unchanged to
++ the output stream; and conversion specifications, each
++ of which results in fetching zero or more subsequent arguments.
++ Each conversion specification is introduced by the character
++ %. The arguments must correspond properly (after type promotion)
++ with the conversion specifier. After the %, the following
++ appear in sequence:
++
++ o Zero or more of the following flags:
++
++ - A zero `0' character specifying zero padding. For
++ all conversions except n, the converted value is padded
++ on the left with zeros rather than blanks. If a
++ precision is given with a numeric conversion (d, i,
++ o, u, i, x, and X), the `0' flag is ignored.
++
++ - A negative field width flag `-' indicates the converted
++ value is to be left adjusted on the field boundary. Except
++ for n conversions, the converted value is padded on
++ the right with blanks, rather than on the left with
++ blanks or zeros. A `-' overrides a `0' if both are
++ given.
++
++ - A space, specifying that a blank should be left before
++ a positive number produced by a signed conversion (d, e, E, f,
++ g, G, or i).
++
++ - A `+' character specifying that a sign always be placed
++ before a number produced by a signed conversion. A `+' overrides
++ a space if both are used.
++
++ o An optional decimal digit string specifying a minimum
++ field width. If the converted value has fewer
++ characters than the field width, it will be padded
++ with spaces on the left (or right, if the
++ left-adjustment flag has been given) to fill out
++ the field width.
++
++ o An optional precision, in the form of a period `.' followed
++ by an optional digit string. If the digit string
++ is omitted, the precision is taken as zero. This
++ gives the minimum number of digits to appear for
++ d, i, o, u, x, and X conversions, the number of
++ digits to appear after the decimal-point for e,
++ E, and f conversions, the maximum number of
++ significant digits for g and G conversions, or
++ the maximum number of characters to be printed
++ from a string for s conversions.
++
++ o The optional character h, specifying that a following d,
++ i, o, u, x, or X conversion corresponds to a short
++ int or unsigned short int argument, or that a
++ following n conversion corresponds to a pointer
++ to a short int argument.
++
++ o The optional character l (ell) specifying that a following
++ d, i, o, u, x, or X conversion applies to a pointer
++ to a long int or unsigned long int argument, or
++ that a following n conversion corresponds to a
++ pointer to a long int argument.
++
++ o The optional character q, specifying that a following d,
++ i, o, u, x, or X conversion corresponds to a quad_t
++ or u_quad_t argument, or that a following n
++ conversion corresponds to a quad_t argument.
++ This value is always printed in HEX notation. Tough.
++ quad_t's are an OS system implementation, and should
++ not be allowed.
++
++ o The character L specifying that a following e, E, f, g,
++ or G conversion corresponds to a long double
++ argument.
++
++ o A character that specifies the type of conversion to be applied.
++
++
++ A field width or precision, or both, may be indicated by an asterisk `*'
++ instead of a digit string. In this case, an int argument supplies the
++ field width or precision. A negative field width is treated as a left
++ adjustment flag followed by a positive field width; a negative precision
++ is treated as though it were missing.
++
++ The conversion specifiers and their meanings are:
++
++ diouxX The int (or appropriate variant) argument is converted to signed
++ decimal (d and i), unsigned octal (o), unsigned decimal
++ (u), or unsigned hexadecimal (x and X) notation. The
++ letters abcdef are used for x conversions; the letters
++ ABCDEF are used for X conversions. The precision, if
++ any, gives the minimum number of digits that must
++ appear; if the converted value requires fewer digits,
++ it is padded on the left with zeros.
++
++ eE The double argument is rounded and converted in the style
++ [-]d.ddde+-dd where there is one digit before the decimal-point
++ character and the number of digits after it is equal
++ to the precision; if the precision is missing, it is
++ taken as 6; if the precision is zero, no decimal-point
++ character appears. An E conversion uses the letter
++ E (rather than e) to introduce the exponent.
++ The exponent always contains at least two digits; if
++ the value is zero, the exponent is 00.
++
++ f The double argument is rounded and converted to decimal notation
++ in the style [-]ddd.ddd, where the number of digits after the
++ decimal-point character is equal to the precision specification.
++ If the precision is missing, it is taken as 6; if the precision
++ is explicitly zero, no decimal-point character appears. If a
++ decimal point appears, at least one digit appears before it.
++
++ g The double argument is converted in style f or e (or
++ E for G conversions). The precision specifies the
++ number of significant digits. If the precision is
++ missing, 6 digits are given; if the precision is zero,
++ it is treated as 1. Style e is used if the exponent
++ from its conversion is less than -4 or greater than
++ or equal to the precision. Trailing zeros are removed
++ from the fractional part of the result; a decimal
++ point appears only if it is followed by at least one
++ digit.
++
++ c The int argument is converted to an unsigned char,
++ and the resulting character is written.
++
++ s The ``char *'' argument is expected to be a pointer to an array
++ of character type (pointer to a string). Characters
++ from the array are written up to (but not including)
++ a terminating NUL character; if a precision is
++ specified, no more than the number specified are
++ written. If a precision is given, no null character
++ need be present; if the precision is not specified,
++ or is greater than the size of the array, the array
++ must contain a terminating NUL character.
++
++ % A `%' is written. No argument is converted. The complete
++ conversion specification is `%%'.
++
++ In no case does a non-existent or small field width cause truncation of a
++ field; if the result of a conversion is wider than the field width, the
++ field is expanded to contain the conversion result.
++
++ EXAMPLES
++ To print a date and time in the form `Sunday, July 3, 10:02', where
++ weekday and month are pointers to strings:
++
++ #include <stdio.h>
++ fprintf(stdout, "%s, %s %d, %.2d:%.2d\n",
++ weekday, month, day, hour, min);
++
++ To print pi to five decimal places:
++
++ #include <math.h>
++ #include <stdio.h>
++ fprintf(stdout, "pi = %.5f\n", 4 * atan(1.0));
++
++ To allocate a 128 byte string and print into it:
++
++ #include <stdio.h>
++ #include <stdlib.h>
++ #include <stdarg.h>
++ char *newfmt(const char *fmt, ...)
++ {
++ char *p;
++ va_list ap;
++ if ((p = malloc(128)) == NULL)
++ return (NULL);
++ va_start(ap, fmt);
++ (void) vsnprintf(p, 128, fmt, ap);
++ va_end(ap);
++ return (p);
++ }
++
++ SEE ALSO
++ printf(1), scanf(3)
++
++ STANDARDS
++ Turkey C Standardization and wimpy POSIX folks did not define
++ snprintf or vsnprintf().
++
++ BUGS
++ The conversion formats %D, %O, and %U are not standard and are provided
++ only for backward compatibility. The effect of padding the %p format
++ with zeros (either by the `0' flag or by specifying a precision), and the
++ benign effect (i.e., none) of the `#' flag on %n and %p conversions, as
++ well as other nonsensical combinations such as %Ld, are not standard;
++ such combinations should be avoided.
+
+- b) accompany the distribution with the machine-readable source of
+- the Package with your modifications.
++ The typedef names quad_t and u_quad_t are infelicitous.
+
+- c) give non-standard executables non-standard names, and clearly
+- document the differences in manual pages (or equivalent), together
+- with instructions on where to get the Standard Version.
++*/
+
+- d) make other distribution arrangements with the Copyright Holder.
+
+-5. You may charge a reasonable copying fee for any distribution of this
+-Package. You may charge any fee you choose for support of this
+-Package. You may not charge a fee for this Package itself. However,
+-you may distribute this Package in aggregate with other (possibly
+-commercial) programs as part of a larger (possibly commercial) software
+-distribution provided that you do not advertise this Package as a
+-product of your own.
++#include <sys/types.h>
++#include <ctype.h>
++#include <stdlib.h>
++#include <stdio.h>
++#if defined(HAVE_STRING_H)
++# include <string.h>
++#endif
++#if defined(HAVE_STRINGS_H)
++# include <strings.h>
++#endif
++#if defined(HAVE_ERRNO_H)
++#include <errno.h>
++#endif
+
+-6. The name of the Copyright Holder may not be used to endorse or promote
+-products derived from this software without specific prior written permission.
++/*
++ * For testing, define these values
++ */
++#if 0
++#define HAVE_STDARG_H 1
++#define TEST 1
++#define HAVE_QUAD_T 1
++#endif
+
+-7. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+-WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++/**** ENDINCLUDE ****/
+
+- The End
+-#include "lp.h"
++/*************************************************
++ * KEEP THIS STRING - MODIFY AT THE END WITH YOUR REVISIONS
++ * i.e. - the LOCAL REVISIONS part is for your use
++ *************************************************/
++
++
++ static char *const _id = "plp_snprintf V2000.08.18 Copyright Patrick Powell 1988-2000 "
++ "$Id: plp_snprintf.c,v 1.4 2005/04/14 20:05:19 papowell Exp $"
++ " LOCAL REVISIONS: renamed plp_snprintf to snprintf, conditionalized everything on HAVE_SNPRINTF";
++
++/* varargs declarations: */
++
++# undef HAVE_STDARGS /* let's hope that works everywhere (mj) */
++# undef VA_LOCAL_DECL
++# undef VA_START
++# undef VA_SHIFT
++# undef VA_END
++
++#if defined(HAVE_STDARG_H)
++# include <stdarg.h>
++# define HAVE_STDARGS /* let's hope that works everywhere (mj) */
++# define VA_LOCAL_DECL va_list ap;
++# define VA_START(f) va_start(ap, f)
++# define VA_SHIFT(v,t) ; /* no-op for ANSI */
++# define VA_END va_end(ap)
++#else
++# if defined(HAVE_VARARGS_H)
++# include <varargs.h>
++# undef HAVE_STDARGS
++# define VA_LOCAL_DECL va_list ap;
++# define VA_START(f) va_start(ap) /* f is ignored! */
++# define VA_SHIFT(v,t) v = va_arg(ap,t)
++# define VA_END va_end(ap)
++# else
++ XX ** NO VARARGS ** XX
++# endif
+ #endif
+
+-#include <stdarg.h>
+-#include <errno.h>
+-#include <sys/types.h>
+-#define HAVE_STDARGS /* let's hope that works everywhere (mj) */
+-#define VA_LOCAL_DECL va_list ap;
+-#define VA_START(f) va_start(ap, f)
+-#define VA_SHIFT(v,t) ; /* no-op for ANSI */
+-#define VA_END va_end(ap)
+-
+-/**** ENDINCLUDE ****/
++ union value {
++#if defined(HAVE_QUAD_T)
++ quad_t qvalue;
++#endif
++#if defined(HAVE_LONG_LONG)
++ long long value;
++#else
++ long value;
++#endif
++ double dvalue;
++};
+
+-static char *const _id = "$Id: snprintf.c,v 3.2 1997/01/19 14:34:56 papowell Exp $";
++#undef CVAL
++#define CVAL(s) (*((unsigned char *)s))
++#define safestrlen(s) ((s)?strlen(s):0)
+
+-/*
+- * dopr(): poor man's version of doprintf
+- */
+
+-static char * plp_Errormsg ( int err );
+-static void dopr( char *buffer, const char *format, va_list args );
+-static void fmtstr( char *value, int ljust, int len, int zpad, int precision );
+-static void fmtnum( long value, int base, int dosign,
++ static char * plp_Errormsg ( int err, char *buffer );
++ static void dopr( int visible_control, char **buffer, int *left,
++ const char *format, va_list args );
++ static void fmtstr( int visible_control, char **buffer, int *left,
++ char *value, int ljust, int len, int zpad, int precision );
++ static void fmtnum( char **buffer, int *left,
++ union value *value, int base, int dosign,
++ int ljust, int len, int zpad, int precision );
++#if defined(HAVE_QUAD_T)
++ static void fmtquad( char **buffer, int *left,
++ union value *value, int base, int dosign,
+ int ljust, int len, int zpad, int precision );
+-static void fmtdouble( int fmt, double value,
++#endif
++ static void fmtdouble( char **bufer, int *left,
++ int fmt, double value,
+ int ljust, int len, int zpad, int precision );
+-static void dostr( char * );
+-static char *output;
+-static void dopr_outch( int c );
+-static char *end;
+-int visible_control = 1;
+-
+-/**************************************************************
+- * Original:
+- * Patrick Powell Tue Apr 11 09:48:21 PDT 1995
+- * A bombproof version of doprnt (dopr) included.
+- * Sigh. This sort of thing is always nasty do deal with. Note that
+- * the version here does not include floating point...
+- *
+- * plp_snprintf() is used instead of sprintf() as it does limit checks
+- * for string length. This covers a nasty loophole.
+- *
+- * The other functions are there to prevent NULL pointers from
+- * causing nast effects.
+- **************************************************************/
+-
+-int vsnprintf(char *str, size_t count, const char *fmt, va_list args)
+-{
+- str[0] = 0;
+- end = str+count-1;
+- dopr( str, fmt, args );
+- if( count>0 ){
+- end[0] = 0;
++ static void dostr( char **buffer, int *left, char *str );
++ static void dopr_outch( char **buffer, int *left, int c );
++/* VARARGS3 */
++#ifdef HAVE_STDARGS
++ int plp_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
++#else
++ int plp_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
++#endif
++
++{
++ int left;
++ char *buffer;
++ if( (int)count < 0 ) count = 0;
++ left = count;
++ if( count == 0 ) str = 0;
++ buffer = str;
++ dopr( 1, &buffer, &left, fmt, args );
++ /* fprintf(stderr,"str 0x%x, buffer 0x%x, count %d, left %d\n",
++ (int)str, (int)buffer, count, left ); */
++ if( str && count > 0 ){
++ if( left > 0 ){
++ str[count-left] = 0;
++ } else {
++ str[count-1] = 0;
++ }
++ }
++ return(count - left);
++}
++
++/* VARARGS3 */
++#ifdef HAVE_STDARGS
++ int plp_unsafe_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
++#else
++ int plp_unsafe_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
++#endif
++{
++ int left;
++ char *buffer;
++ if( (int)count < 0 ) count = 0;
++ left = count;
++ if( count == 0 ) str = 0;
++ buffer = str;
++ dopr( 0, &buffer, &left, fmt, args );
++ /* fprintf(stderr,"str 0x%x, buffer 0x%x, count %d, left %d\n",
++ (int)str, (int)buffer, count, left ); */
++ if( str && count > 0 ){
++ if( left > 0 ){
++ str[count-left] = 0;
++ } else {
++ str[count-1] = 0;
++ }
+ }
+- return(strlen(str));
++ return(count - left);
+ }
+
+ /* VARARGS3 */
+ #ifdef HAVE_STDARGS
+-int snprintf (char *str,size_t count,const char *fmt,...)
++ int snprintf (char *str,size_t count,const char *fmt,...)
+ #else
+-int snprintf (va_alist) va_dcl
++ int snprintf (va_alist) va_dcl
+ #endif
+ {
+ #ifndef HAVE_STDARGS
+@@ -183,22 +619,48 @@ int snprintf (va_alist) va_dcl
+ size_t count;
+ char *fmt;
+ #endif
++ int n = 0;
+ VA_LOCAL_DECL
+
+ VA_START (fmt);
+ VA_SHIFT (str, char *);
+ VA_SHIFT (count, size_t );
+ VA_SHIFT (fmt, char *);
+- (void) vsnprintf ( str, count, fmt, ap);
++ n = plp_vsnprintf ( str, count, fmt, ap);
+ VA_END;
+- return( strlen( str ) );
++ return( n );
+ }
+
+-static void dopr( char *buffer, const char *format, va_list args )
++
++/* VARARGS3 */
++#ifdef HAVE_STDARGS
++ int plp_unsafe_snprintf (char *str,size_t count,const char *fmt,...)
++#else
++ int plp_unsafe_snprintf (va_alist) va_dcl
++#endif
++{
++#ifndef HAVE_STDARGS
++ char *str;
++ size_t count;
++ char *fmt;
++#endif
++ int n = 0;
++ VA_LOCAL_DECL
++
++ VA_START (fmt);
++ VA_SHIFT (str, char *);
++ VA_SHIFT (count, size_t );
++ VA_SHIFT (fmt, char *);
++ n = plp_unsafe_vsnprintf ( str, count, fmt, ap);
++ VA_END;
++ return( n );
++}
++ static void dopr( int visible_control, char **buffer, int *left, const char *format, va_list args )
+ {
+ int ch;
+- long value;
++ union value value;
+ int longflag = 0;
++ int quadflag = 0;
+ char *strvalue;
+ int ljust;
+ int len;
+@@ -207,22 +669,30 @@ static void dopr( char *buffer, const ch
+ int set_precision;
+ double dval;
+ int err = errno;
++ int base = 0;
++ int signed_val = 0;
+
+- output = buffer;
+ while( (ch = *format++) ){
+ switch( ch ){
+ case '%':
+- ljust = len = zpad = 0;
++ longflag = quadflag =
++ ljust = len = zpad = base = signed_val = 0;
+ precision = -1; set_precision = 0;
+ nextch:
+ ch = *format++;
+ switch( ch ){
+ case 0:
+- dostr( "**end of format**" );
++ dostr( buffer, left, "**end of format**" );
+ return;
+ case '-': ljust = 1; goto nextch;
+ case '.': set_precision = 1; precision = 0; goto nextch;
+- case '*': len = va_arg( args, int ); goto nextch;
++ case '*':
++ if( set_precision ){
++ precision = va_arg( args, int );
++ } else {
++ len = va_arg( args, int );
++ }
++ goto nextch;
+ case '0': /* set zero padding if len not set */
+ if(len==0 && set_precision == 0 ) zpad = '0';
+ case '1': case '2': case '3':
+@@ -234,76 +704,91 @@ static void dopr( char *buffer, const ch
+ len = len*10 + ch - '0';
+ }
+ goto nextch;
+- case 'l': longflag = 1; goto nextch;
++ case 'l': ++longflag; goto nextch;
++ case 'q':
++#if !defined( HAVE_QUAD_T )
++ dostr( buffer, left, "*no quad_t support *");
++ return;
++#endif
++ quadflag = 1;
++ goto nextch;
+ case 'u': case 'U':
+- /*fmtnum(value,base,dosign,ljust,len, zpad, precision) */
+- if( longflag ){
+- value = va_arg( args, long );
+- } else {
+- value = va_arg( args, int );
+- }
+- fmtnum( value, 10,0, ljust, len, zpad, precision ); break;
++ if( base == 0 ){ base = 10; signed_val = 0; }
+ case 'o': case 'O':
+- /*fmtnum(value,base,dosign,ljust,len, zpad, precision) */
+- if( longflag ){
+- value = va_arg( args, long );
+- } else {
+- value = va_arg( args, int );
+- }
+- fmtnum( value, 8,0, ljust, len, zpad, precision ); break;
++ if( base == 0 ){ base = 8; signed_val = 0; }
+ case 'd': case 'D':
+- if( longflag ){
+- value = va_arg( args, long );
+- } else {
+- value = va_arg( args, int );
+- }
+- fmtnum( value, 10,1, ljust, len, zpad, precision ); break;
++ if( base == 0 ){ base = 10; signed_val = 1; }
+ case 'x':
+- if( longflag ){
+- value = va_arg( args, long );
+- } else {
+- value = va_arg( args, int );
+- }
+- fmtnum( value, 16,0, ljust, len, zpad, precision ); break;
++ if( base == 0 ){ base = 16; signed_val = 0; }
+ case 'X':
+- if( longflag ){
+- value = va_arg( args, long );
++ if( base == 0 ){ base = -16; signed_val = 0; }
++#if defined( HAVE_QUAD_T )
++ if( quadflag ){
++ value.qvalue = va_arg( args, quad_t );
++ fmtquad( buffer, left, &value,base,signed_val, ljust, len, zpad, precision );
++ break;
++ } else
++#endif
++ if( longflag > 1 ){
++#if defined(HAVE_LONG_LONG)
++ if( signed_val ){
++ value.value = va_arg( args, long long );
++ } else {
++ value.value = va_arg( args, unsigned long long );
++ }
++#else
++ if( signed_val ){
++ value.value = va_arg( args, long );
++ } else {
++ value.value = va_arg( args, unsigned long );
++ }
++#endif
++ } else if( longflag ){
++ if( signed_val ){
++ value.value = va_arg( args, long );
++ } else {
++ value.value = va_arg( args, unsigned long );
++ }
+ } else {
+- value = va_arg( args, int );
++ if( signed_val ){
++ value.value = va_arg( args, int );
++ } else {
++ value.value = va_arg( args, unsigned int );
++ }
+ }
+- fmtnum( value,-16,0, ljust, len, zpad, precision ); break;
++ fmtnum( buffer, left, &value,base,signed_val, ljust, len, zpad, precision ); break;
+ case 's':
+ strvalue = va_arg( args, char *);
+- fmtstr( strvalue,ljust,len, zpad, precision );
++ fmtstr( visible_control, buffer, left, strvalue,ljust,len, zpad, precision );
+ break;
+ case 'c':
+ ch = va_arg( args, int );
+ { char b[2];
+- int vsb = visible_control;
+ b[0] = ch;
+ b[1] = 0;
+- visible_control = 0;
+- fmtstr( b,ljust,len, zpad, precision );
+- visible_control = vsb;
++ fmtstr( 0, buffer, left, b,ljust,len, zpad, precision );
+ }
+ break;
+- case 'f': case 'g':
++ case 'f': case 'g': case 'e':
+ dval = va_arg( args, double );
+- fmtdouble( ch, dval,ljust,len, zpad, precision ); break;
++ fmtdouble( buffer, left, ch, dval,ljust,len, zpad, precision ); break;
+ case 'm':
+- fmtstr( plp_Errormsg(err),ljust,len, zpad, precision ); break;
+- case '%': dopr_outch( ch ); continue;
++ { char shortbuffer[32];
++ fmtstr( visible_control, buffer, left,
++ plp_Errormsg(err, shortbuffer),ljust,len, zpad, precision );
++ }
++ break;
++ case '%': dopr_outch( buffer, left, ch ); continue;
+ default:
+- dostr( "???????" );
++ dostr( buffer, left, "???????" );
+ }
+ longflag = 0;
+ break;
+ default:
+- dopr_outch( ch );
++ dopr_outch( buffer, left, ch );
+ break;
+ }
+ }
+- *output = 0;
+ }
+
+ /*
+@@ -312,63 +797,69 @@ static void dopr( char *buffer, const ch
+ * len = minimum length
+ * precision = numbers of chars in string to use
+ */
+-static void
+-fmtstr( char *value, int ljust, int len, int zpad, int precision )
++ static void
++ fmtstr( int visible_control, char **buffer, int *left,
++ char *value, int ljust, int len, int zpad, int precision )
+ {
+- int padlen, strlen, i, c; /* amount to pad */
++ int padlen, strlenv, i, c; /* amount to pad */
+
+ if( value == 0 ){
+ value = "<NULL>";
+ }
+- if( precision > 0 ){
+- strlen = precision;
+- } else {
+- /* cheap strlen so you do not have library call */
+- for( strlen = 0; (c=value[strlen]); ++ strlen ){
+- if( visible_control && iscntrl( c ) && !isspace( c ) ){
+- ++strlen;
+- }
++ /* cheap strlen so you do not have library call */
++ for( strlenv = i = 0; (c=CVAL(value+i)); ++i ){
++ if( visible_control && iscntrl( c ) && c != '\t' && c != '\n' ){
++ ++strlenv;
+ }
++ ++strlenv;
+ }
+- padlen = len - strlen;
++ if( precision > 0 && strlenv > precision ){
++ strlenv = precision;
++ }
++ padlen = len - strlenv;
+ if( padlen < 0 ) padlen = 0;
+ if( ljust ) padlen = -padlen;
+ while( padlen > 0 ) {
+- dopr_outch( ' ' );
++ dopr_outch( buffer, left, ' ' );
+ --padlen;
+ }
+ /* output characters */
+- for( i = 0; (c = value[i]); ++i ){
+- if( visible_control && iscntrl( c ) && !isspace( c ) ){
+- dopr_outch('^');
++ for( i = 0; i < strlenv && (c = CVAL(value+i)); ++i ){
++ if( visible_control && iscntrl( c ) && c != '\t' && c != '\n' ){
++ dopr_outch(buffer, left, '^');
+ c = ('@' | (c & 0x1F));
+ }
+- dopr_outch(c);
++ dopr_outch(buffer, left, c);
+ }
+ while( padlen < 0 ) {
+- dopr_outch( ' ' );
++ dopr_outch( buffer, left, ' ' );
+ ++padlen;
+ }
+ }
+
+-static void
+-fmtnum( long value, int base, int dosign, int ljust,
++ static void
++ fmtnum( char **buffer, int *left,
++ union value *value, int base, int dosign, int ljust,
+ int len, int zpad, int precision )
+ {
+ int signvalue = 0;
++#if defined(HAVE_LONG_LONG)
++ unsigned long long uvalue;
++#else
+ unsigned long uvalue;
+- char convert[20];
++#endif
++ char convert[sizeof( union value) * 8 + 16];
+ int place = 0;
+ int padlen = 0; /* amount to pad */
+ int caps = 0;
+
+- /* DEBUGP(("value 0x%x, base %d, dosign %d, ljust %d, len %d, zpad %d\n",
+- value, base, dosign, ljust, len, zpad )); */
+- uvalue = value;
++ /* fprintf(stderr,"value 0x%x, base %d, dosign %d, ljust %d, len %d, zpad %d\n",
++ value, base, dosign, ljust, len, zpad );/ **/
++ uvalue = value->value;
+ if( dosign ){
+- if( value < 0 ) {
++ if( value->value < 0 ) {
+ signvalue = '-';
+- uvalue = -value;
++ uvalue = -value->value;
+ }
+ }
+ if( base < 0 ){
+@@ -385,71 +876,148 @@ fmtnum( long value, int base, int dosig
+ padlen = len - place;
+ if( padlen < 0 ) padlen = 0;
+ if( ljust ) padlen = -padlen;
+- /* DEBUGP(( "str '%s', place %d, sign %c, padlen %d\n",
+- convert,place,signvalue,padlen)); */
++ /* fprintf( stderr, "str '%s', place %d, sign %c, padlen %d\n",
++ convert,place,signvalue,padlen); / **/
+ if( zpad && padlen > 0 ){
+ if( signvalue ){
+- dopr_outch( signvalue );
++ dopr_outch( buffer, left, signvalue );
+ --padlen;
+ signvalue = 0;
+ }
+ while( padlen > 0 ){
+- dopr_outch( zpad );
++ dopr_outch( buffer, left, zpad );
+ --padlen;
+ }
+ }
+ while( padlen > 0 ) {
+- dopr_outch( ' ' );
++ dopr_outch( buffer, left, ' ' );
+ --padlen;
+ }
+- if( signvalue ) dopr_outch( signvalue );
+- while( place > 0 ) dopr_outch( convert[--place] );
++ if( signvalue ) dopr_outch( buffer, left, signvalue );
++ while( place > 0 ) dopr_outch( buffer, left, convert[--place] );
+ while( padlen < 0 ){
+- dopr_outch( ' ' );
++ dopr_outch( buffer, left, ' ' );
+ ++padlen;
+ }
+ }
+
+-static void
+-fmtdouble( int fmt, double value, int ljust, int len, int zpad, int precision )
++#if defined(HAVE_QUAD_T)
++
++ static void
++ fmtquad( char **buffer, int *left,
++ union value *value, int base, int dosign, int ljust,
++ int len, int zpad, int precision )
+ {
+- char convert[128];
+- char fmtstr[128];
+- int l;
++ int signvalue = 0;
++ int place = 0;
++ int padlen = 0; /* amount to pad */
++ int caps = 0;
++ int i, c;
++ union {
++ quad_t qvalue;
++ unsigned char qconvert[sizeof(quad_t)];
++ } vvalue;
++ char convert[2*sizeof(quad_t)+1];
++
++ /* fprintf(stderr,"value 0x%x, base %d, dosign %d, ljust %d, len %d, zpad %d\n",
++ value, base, dosign, ljust, len, zpad );/ **/
++ vvalue.qvalue = value->qvalue;
+
+- if( len == 0 ) len = 10;
+- if( len > sizeof(convert) - 10 ){
+- len = sizeof(convert) - 10;
++ if( base < 0 ){
++ caps = 1;
+ }
+- if( precision > sizeof(convert) - 10 ){
+- precision = sizeof(convert) - 10;
++
++ for( i = 0; i < (int)sizeof(quad_t); ++i ){
++ c = vvalue.qconvert[i];
++ convert[2*i] =
++ (caps? "0123456789ABCDEF":"0123456789abcdef")[ (c >> 4) & 0xF];
++ convert[2*i+1] =
++ (caps? "0123456789ABCDEF":"0123456789abcdef")[ c & 0xF];
+ }
+- if( precision > len ) precision = len;
+- strcpy( fmtstr, "%" );
+- if( ljust ) strcat(fmtstr, "-" );
+- if( len ){
+- sprintf( fmtstr+strlen(fmtstr), "%d", len );
++ convert[2*i] = 0;
++
++ place = strlen(convert);
++ padlen = len - place;
++ if( padlen < 0 ) padlen = 0;
++ if( ljust ) padlen = -padlen;
++ /* fprintf( stderr, "str '%s', place %d, sign %c, padlen %d\n",
++ convert,place,signvalue,padlen); / **/
++ if( zpad && padlen > 0 ){
++ if( signvalue ){
++ dopr_outch( buffer, left, signvalue );
++ --padlen;
++ signvalue = 0;
++ }
++ while( padlen > 0 ){
++ dopr_outch( buffer, left, zpad );
++ --padlen;
++ }
++ }
++ while( padlen > 0 ) {
++ dopr_outch( buffer, left, ' ' );
++ --padlen;
++ }
++ if( signvalue ) dopr_outch( buffer, left, signvalue );
++ while( place > 0 ) dopr_outch( buffer, left, convert[--place] );
++ while( padlen < 0 ){
++ dopr_outch( buffer, left, ' ' );
++ ++padlen;
++ }
++}
++
++#endif
++
++ static void mystrcat(char *dest, char *src )
++{
++ if( dest && src ){
++ dest += safestrlen(dest);
++ strcpy(dest,src);
++ }
++}
++
++ static void
++ fmtdouble( char **buffer, int *left,
++ int fmt, double value, int ljust, int len, int zpad, int precision )
++{
++ char convert[sizeof( union value) * 8 + 512];
++ char formatstr[128];
++
++ /* fprintf(stderr,"len %d, precision %d\n", len, precision ); */
++ if( len > 255 ){
++ len = 255;
++ }
++ if( precision > 255 ){
++ precision = 255;
++ }
++ if( precision >= 0 && len > 0 && precision > len ) precision = len;
++ strcpy( formatstr, "%" ); /* 1 */
++ if( ljust ) mystrcat(formatstr, "-" ); /* 1 */
++ if( zpad ) mystrcat(formatstr, "0" ); /* 1 */
++ if( len >= 0 ){
++ sprintf( formatstr+strlen(formatstr), "%d", len ); /* 3 */
+ }
+- if( precision > 0 ){
+- sprintf( fmtstr+strlen(fmtstr), ".%d", precision );
++ if( precision >= 0 ){
++ sprintf( formatstr+strlen(formatstr), ".%d", precision ); /* 3 */
+ }
+- l = strlen( fmtstr );
+- fmtstr[l] = fmt;
+- fmtstr[l+1] = 0;
+- sprintf( convert, fmtstr, value );
+- dostr( convert );
++ /* format string will be at most 10 chars long ... */
++ sprintf( formatstr+strlen(formatstr), "%c", fmt );
++ /* this is easier than trying to do the portable dtostr */
++ /* fprintf(stderr,"format string '%s'\n", formatstr); */
++ sprintf( convert, formatstr, value );
++ dostr( buffer, left, convert );
+ }
+
+-static void dostr( char *str )
++ static void dostr( char **buffer, int *left, char *str )
+ {
+- while(*str) dopr_outch(*str++);
++ if(str)while(*str) dopr_outch( buffer, left, *str++ );
+ }
+
+-static void dopr_outch( int c )
++ static void dopr_outch( char **buffer, int *left, int c )
+ {
+- if( end == 0 || output < end ){
+- *output++ = c;
++ if( *left > 0 ){
++ *(*buffer)++ = c;
+ }
++ *left -= 1;
+ }
+
+
+@@ -461,29 +1029,26 @@ static void dopr_outch( int c )
+ * Patrick Powell Tue Apr 11 08:05:05 PDT 1995
+ ****************************************************************************/
+ /****************************************************************************/
+-#if !defined(HAVE_STRERROR)
+-
+-# if defined(HAVE_SYS_NERR)
+-# if !defined(HAVE_SYS_NERR_DEF)
+- extern int sys_nerr;
+-# endif
+-# define num_errors (sys_nerr)
+-# else
+-# define num_errors (-1) /* always use "errno=%d" */
+-# endif
+
++#if !defined(HAVE_STRERROR)
++# undef num_errors
+ # if defined(HAVE_SYS_ERRLIST)
+-# if !defined(HAVE_SYS_ERRLIST_DEF)
++# if !defined(HAVE_DECL_SYS_ERRLIST)
+ extern const char *const sys_errlist[];
+ # endif
+-# else
+-# undef num_errors
+-# define num_errors (-1) /* always use "errno=%d" */
++# if defined(HAVE_SYS_NERR)
++# if !defined(HAVE_DECL_SYS_NERR)
++ extern int sys_nerr;
++# endif
++# define num_errors (sys_nerr)
++# endif
++# endif
++# if !defined(num_errors)
++# define num_errors (-1) /* always use "errno=%d" */
+ # endif
+-
+ #endif
+
+-static char * plp_Errormsg ( int err )
++ static char * plp_Errormsg ( int err, char *buffer /* int maxlen = 32 */)
+ {
+ char *cp;
+
+@@ -496,10 +1061,8 @@ static char * plp_Errormsg ( int err )
+ } else
+ # endif
+ {
+- static char msgbuf[32]; /* holds "errno=%d". */
+- /* SAFE use of sprintf */
+- (void) sprintf (msgbuf, "errno=%d", err);
+- cp = msgbuf;
++ (void) sprintf (buffer, "errno=%d", err);
++ cp = buffer;
+ }
+ #endif
+ return (cp);
+@@ -507,23 +1070,47 @@ static char * plp_Errormsg ( int err )
+
+ #if defined(TEST)
+ #include <stdio.h>
+-int main( void )
++ int main( void )
+ {
+ char buffer[128];
+ char *t;
+ char *test1 = "01234";
++ int n;
+ errno = 1;
+- plp_snprintf( buffer, sizeof(buffer), (t="errno '%m'")); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%s"), test1 ); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%12s"), test1 ); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%-12s"), test1 ); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%12.2s"), test1 ); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%-12.2s"), test1 ); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%g"), 1.25 ); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%g"), 1.2345 ); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%12g"), 1.25 ); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%12.2g"), 1.25 ); printf( "%s = '%s'\n", t, buffer );
+- plp_snprintf( buffer, sizeof(buffer), (t = "%0*d"), 6, 1 ); printf( "%s = '%s'\n", t, buffer );
++ buffer[0] = 0;
++ n = snprintf( buffer, 0, (t="test")); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t="errno '%m'")); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%s"), test1 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%12s"), test1 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%-12s"), test1 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%12.2s"), test1 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%-12.2s"), test1 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%g"), 1.25 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%g"), 1.2345 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%12g"), 1.25 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%12.1g"), 1.25 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%12.2g"), 1.25 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%12.3g"), 1.25 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%0*d"), 6, 1 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++#if defined(HAVE_LONG_LONG)
++ n = snprintf( buffer, sizeof(buffer), (t = "%llx"), 1, 2, 3, 4 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%llx"), (long long)1, (long long)2 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%qx"), 1, 2, 3, 4 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%qx"), (quad_t)1, (quad_t)2 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++#endif
++ n = snprintf( buffer, sizeof(buffer), (t = "0%x, 0%x"), (char *)(0x01234567), (char *)0, 0, 0, 0); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "0%x, 0%x"), (char *)(0x01234567), (char *)0x89ABCDEF, 0, 0, 0); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "0%x, 0%x"), t, 0, 0, 0, 0); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%f"), 1.25 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%f"), 1.2345 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%12f"), 1.25 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%12.2f"), 1.25 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%f"), 1.0 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%.0f"), 1.0 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%0.0f"), 1.0 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%1.0f"), 1.0 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%1.5f"), 1.0 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
++ n = snprintf( buffer, sizeof(buffer), (t = "%5.5f"), 1.0 ); printf( "[%d] %s = '%s'\n", n, t, buffer );
+ return(0);
+ }
+ #endif
diff --git a/source/xap/xsane/xsane.SlackBuild b/source/xap/xsane/xsane.SlackBuild
index 991cea302..a7617a32b 100755
--- a/source/xap/xsane/xsane.SlackBuild
+++ b/source/xap/xsane/xsane.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2011, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,8 +21,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=0.998
-BUILD=${BUILD:-3}
+VERSION=0.999
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -63,6 +63,27 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+zcat $CWD/xsane-0.995-xdg-open.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.995-close-fds.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.996-no-eula.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.997-off-root-build.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.999-no-file-selected.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.997-ipv6.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.998-preview-selection.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.998-libpng.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.998-wmclass.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.998-desktop-file.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.999-man-page.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.999-pdf-no-high-bpp.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.999-lcms2.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.999-coverity.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.999-snprintf-update.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.999-signal-handling.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/xsane-0.999-7-autoconf.patch.gz | patch -p1 --verbose || exit 1
+
+# This isn't working :/
+#autoreconf -fiv
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/source/xap/xscreensaver/dump.osx.sources.sh b/source/xap/xscreensaver/dump.android.osx.sources.sh
index fc3c5f461..3993f510b 100755
--- a/source/xap/xscreensaver/dump.osx.sources.sh
+++ b/source/xap/xscreensaver/dump.android.osx.sources.sh
@@ -6,6 +6,7 @@ VERSION=${VERSION:-$(echo xscreensaver-*.tar.?z* | rev | cut -f 3- -d . | cut -f
tar xf xscreensaver-${VERSION}.tar.xz || exit 1
mv xscreensaver-${VERSION}.tar.xz xscreensaver-${VERSION}.tar.xz.orig
rm -r xscreensaver-${VERSION}/OSX/*
+rm -r xscreensaver-${VERSION}/android/*
tar cf xscreensaver-${VERSION}.tar xscreensaver-${VERSION}
rm -r xscreensaver-${VERSION}
xz -9 xscreensaver-${VERSION}.tar
diff --git a/source/xap/xscreensaver/xscreensaver.SlackBuild b/source/xap/xscreensaver/xscreensaver.SlackBuild
index b7ca3799b..43d7995a1 100755
--- a/source/xap/xscreensaver/xscreensaver.SlackBuild
+++ b/source/xap/xscreensaver/xscreensaver.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,7 +27,7 @@ BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -36,8 +36,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -69,6 +69,12 @@ zcat $CWD/xscreensaver.setuid.diff.gz | patch -p1 --verbose --backup --suffix=.o
# Add support for the electricsheep distributed screensaver:
zcat $CWD/xscreensaver.electricsheep.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+# Remove a feature that pops up a nag screen claiming the version is old
+# after one year. Just don't send in bug reports on an old version, OK folks?
+# I hate to swim against upstream, but with all respect this feature is not
+# helpful to distributions.
+zcat $CWD/xscreensaver.no.expiration.date.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -84,17 +90,17 @@ CXXFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--with-x-app-defaults=/etc/X11/app-defaults \
+ --with-text-file=/usr/doc/netdate/COPYRIGHT \
--with-shadow \
--with-jpeg \
--with-gl \
- --build=$ARCH-slackware-linux
-
-# We use '-i' because xscreensaver's NLS support has always been horribly broken
-make -i $NUMJOBS || make -i
-make -i install_prefix=$PKG install-strip
+ --build=$ARCH-slackware-linux || exit 1
-gzip -9 $PKG/usr/man/man?/*
+# Build:
+make $NUMJOBS || make || exit 1
+make install_prefix=$PKG install-strip || exit 1
+# Needed for password unlock:
chown root:shadow $PKG/usr/bin/xscreensaver
chmod 2751 $PKG/usr/bin/xscreensaver
@@ -106,6 +112,21 @@ cp -a \
README* \
$PKG/usr/doc/xscreensaver-$VERSION
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1 | grep -v '\.gz$') ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
# Insert an older version of xscreensaver-getimage-file to avoid depending
# on libwww-perl. Maybe we'll eventually add this, but bundling 14 perl
# modules is a lot of maintainance just to get slidescreen working again.
diff --git a/source/xap/xscreensaver/xscreensaver.no.expiration.date.diff b/source/xap/xscreensaver/xscreensaver.no.expiration.date.diff
new file mode 100644
index 000000000..bdbcbe1d1
--- /dev/null
+++ b/source/xap/xscreensaver/xscreensaver.no.expiration.date.diff
@@ -0,0 +1,29 @@
+--- ./driver/prefs.c.orig 2016-05-23 22:08:27.000000000 -0500
++++ ./driver/prefs.c 2016-05-30 15:29:36.446721679 -0500
+@@ -1734,6 +1734,17 @@
+ shipping the last version with the old license and then never
+ upgrading it again -- which would be the worst possible outcome for
+ everyone involved, most especially the users.
++
++ ---
++
++ NOTE: This feature is disabled by Slackware... we do not ship multi-year
++ old versions, nor do we think it is a good idea to include nag screens
++ that activate when an expiration date is reached. In this case, the
++ nag screen was activated after only one year, which practically insures
++ that this will be seen before the next stable Slackware release.
++ If there's a problem that needs fixing, we'll issue a fix.
++ No nag screens please. Thanks for possibly reconsidering this!
++
+ */
+
+ time_t now = time ((time_t *) 0); /* */
+@@ -1766,5 +1777,7 @@
+ months = ((((tm->tm_year + 1900) * 12) + tm->tm_mon) - /* h */
+ (y * 12 + m)); /* p */
+ /* . */
+- return (months >= 17); /* */
++ /* Disable date checking for Slackware: */ /* \ö/ */
++ /* return (months >= 17); */ /* */
++ return ( 0 );
+ }
diff --git a/source/xap/xv/xv-libpng-1.5.patch b/source/xap/xv/xv-libpng-1.5.patch
new file mode 100644
index 000000000..66659ff8e
--- /dev/null
+++ b/source/xap/xv/xv-libpng-1.5.patch
@@ -0,0 +1,543 @@
+$OpenBSD: patch-xvpng_c,v 1.2 2011/08/29 18:07:44 espie Exp $
+
+Fix build with png-1.5.
+
+--- xvpng.c.orig Mon May 14 02:53:28 2007
++++ xvpng.c Mon Aug 29 15:05:31 2011
+@@ -31,6 +31,7 @@
+
+ #ifdef HAVE_PNG
+
++#include "zlib.h"
+ #include "png.h"
+
+ /*** Stuff for PNG Dialog box ***/
+@@ -41,7 +42,7 @@
+ #define COMPRESSION 6 /* default zlib compression level, not max
+ (Z_BEST_COMPRESSION) */
+
+-#define HAVE_tRNS (info_ptr->valid & PNG_INFO_tRNS)
++#define HAVE_tRNS (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
+
+ #define DWIDE 86
+ #define DHIGH 104
+@@ -435,6 +436,16 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ {
+ png_struct *png_ptr;
+ png_info *info_ptr;
++ struct {
++ /* IHDR */
++ png_uint_32 width;
++ png_uint_32 height;
++ int bit_depth;
++ int color_type;
++ int interlace_type;
++ /* PLTE */
++ int use_palette;
++ } info_tmp;
+ png_color palette[256];
+ png_textp text;
+ byte r1[256], g1[256], b1[256]; /* storage for deduped palette */
+@@ -444,6 +455,7 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ byte *p, *png_line;
+ char software[256];
+ char *savecmnt;
++ int num_text, max_text;
+
+ if ((png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL,
+ png_xv_error, png_xv_warning)) == NULL) {
+@@ -458,7 +470,7 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ FatalError(software);
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return -1;
+ }
+@@ -489,8 +501,8 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ png_set_filter(png_ptr, 0, filter);
+ }
+
+- info_ptr->width = w;
+- info_ptr->height = h;
++ info_tmp.width = w;
++ info_tmp.height = h;
+ if (w <= 0 || h <= 0) {
+ SetISTR(ISTR_WARNING, "%s: image dimensions out of range (%dx%d)",
+ fbasename, w, h);
+@@ -498,7 +510,8 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ return -1;
+ }
+
+- info_ptr->interlace_type = interCB.val ? 1 : 0;
++ info_tmp.interlace_type =
++ interCB.val ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE;
+
+ linesize = 0; /* quiet a compiler warning */
+
+@@ -542,40 +555,40 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return -1;
+ }
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+- info_ptr->bit_depth = 8;
++ info_tmp.color_type = PNG_COLOR_TYPE_RGB;
++ info_tmp.bit_depth = 8;
++ info_tmp.use_palette = 0;
+ } else /* ptype == PIC8 */ {
+ linesize = w;
+- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
++ info_tmp.color_type = PNG_COLOR_TYPE_PALETTE;
+ if (numuniqcols <= 2)
+- info_ptr->bit_depth = 1;
++ info_tmp.bit_depth = 1;
+ else
+ if (numuniqcols <= 4)
+- info_ptr->bit_depth = 2;
++ info_tmp.bit_depth = 2;
+ else
+ if (numuniqcols <= 16)
+- info_ptr->bit_depth = 4;
++ info_tmp.bit_depth = 4;
+ else
+- info_ptr->bit_depth = 8;
++ info_tmp.bit_depth = 8;
+
+ for (i = 0; i < numuniqcols; i++) {
+ palette[i].red = r1[i];
+ palette[i].green = g1[i];
+ palette[i].blue = b1[i];
+ }
+- info_ptr->num_palette = numuniqcols;
+- info_ptr->palette = palette;
+- info_ptr->valid |= PNG_INFO_PLTE;
++ info_tmp.use_palette = 1;
+ }
+ }
+
+ else if (colorType == F_GREYSCALE || colorType == F_BWDITHER) {
+- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
++ info_tmp.color_type = PNG_COLOR_TYPE_GRAY;
++ info_tmp.use_palette = 0;
+ if (colorType == F_BWDITHER) {
+ /* shouldn't happen */
+ if (ptype == PIC24) FatalError("PIC24 and B/W Stipple in WritePNG()");
+
+- info_ptr->bit_depth = 1;
++ info_tmp.bit_depth = 1;
+ if (MONO(r1[0], g1[0], b1[0]) > MONO(r1[1], g1[1], b1[1])) {
+ remap[0] = 1;
+ remap[1] = 0;
+@@ -595,7 +608,7 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return -1;
+ }
+- info_ptr->bit_depth = 8;
++ info_tmp.bit_depth = 8;
+ }
+ else /* ptype == PIC8 */ {
+ int low_precision;
+@@ -617,7 +630,7 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ for (; i < 256; i++)
+ remap[i]=0; /* shouldn't be necessary, but... */
+
+- info_ptr->bit_depth = 8;
++ info_tmp.bit_depth = 8;
+
+ /* Note that this fails most of the time because of gamma */
+ /* (and that would be a bug: GRR FIXME) */
+@@ -636,7 +649,7 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ for (i = 0; i < numuniqcols; i++) {
+ remap[i] &= 0xf;
+ }
+- info_ptr->bit_depth = 4;
++ info_tmp.bit_depth = 4;
+
+ /* try to adjust to 2-bit precision grayscale */
+
+@@ -652,7 +665,7 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ for (i = 0; i < numuniqcols; i++) {
+ remap[i] &= 3;
+ }
+- info_ptr->bit_depth = 2;
++ info_tmp.bit_depth = 2;
+
+ /* try to adjust to 1-bit precision grayscale */
+
+@@ -668,7 +681,7 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ for (i = 0; i < numuniqcols; i++) {
+ remap[i] &= 1;
+ }
+- info_ptr->bit_depth = 1;
++ info_tmp.bit_depth = 1;
+ }
+ }
+ }
+@@ -677,6 +690,20 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ else
+ png_error(png_ptr, "Unknown colorstyle in WritePNG");
+
++ png_set_IHDR(png_ptr, info_ptr,
++ info_tmp.width, info_tmp.height,
++ info_tmp.bit_depth, info_tmp.color_type,
++ info_tmp.interlace_type, PNG_COMPRESSION_TYPE_BASE,
++ PNG_FILTER_TYPE_BASE);
++ if (info_tmp.use_palette) {
++ /*
++ * info_ptr->num_palette = numuniqcols;
++ * info_ptr->palette = palette;
++ * info_ptr->valid |= PNG_INFO_PLTE;
++ */
++ png_set_PLTE(png_ptr, info_ptr, palette, numuniqcols);
++ }
++
+ if ((text = (png_textp)malloc(sizeof(png_text)))) {
+ sprintf(software, "XV %s", REVDATE);
+
+@@ -684,21 +711,29 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ text->key = "Software";
+ text->text = software;
+ text->text_length = strlen(text->text);
++ text->lang = NULL;
+
+- info_ptr->max_text = 1;
+- info_ptr->num_text = 1;
+- info_ptr->text = text;
++ /*
++ * info_ptr->max_text = 1;
++ * info_ptr->num_text = 1;
++ * info_ptr->text = text;
++ */
++ png_set_text(png_ptr, info_ptr, text, 1);
++ num_text = max_text = 1;
+ }
+
+ Display_Gamma = gDial.val; /* Save the current gamma for loading */
+
+ // GRR FIXME: add .Xdefaults option to omit writing gamma (size, cumulative errors when editing)--alternatively, modify save box to include "omit" checkbox
+- info_ptr->gamma = 1.0/gDial.val;
+- info_ptr->valid |= PNG_INFO_gAMA;
++ /*
++ * info_ptr->gamma = 1.0/gDial.val;
++ * info_ptr->valid |= PNG_INFO_gAMA;
++ */
++ png_set_gAMA(png_ptr, info_ptr, 1.0/gDial.val);
+
+ png_write_info(png_ptr, info_ptr);
+
+- if (info_ptr->bit_depth < 8)
++ if (info_tmp.bit_depth < 8)
+ png_set_packing(png_ptr);
+
+ pass=png_set_interlace_handling(png_ptr);
+@@ -711,13 +746,13 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ int j;
+ p = pic;
+ for (j = 0; j < h; ++j) {
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) {
++ if (info_tmp.color_type == PNG_COLOR_TYPE_GRAY) {
+ int k;
+ for (k = 0; k < w; ++k)
+ png_line[k] = ptype==PIC24 ? MONO(p[k*3], p[k*3+1], p[k*3+2]) :
+ remap[pc2nc[p[k]]];
+ png_write_row(png_ptr, png_line);
+- } else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
++ } else if (info_tmp.color_type == PNG_COLOR_TYPE_PALETTE) {
+ int k;
+ for (k = 0; k < w; ++k)
+ png_line[k] = pc2nc[p[k]];
+@@ -743,24 +778,26 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ strcpy(savecmnt, picComments);
+ key = savecmnt;
+ tp = text;
+- info_ptr->num_text = 0;
+
++ png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1);
++ num_text = 0;
++
+ comment = strchr(key, ':');
+
+ do {
+ /* Allocate a larger structure for comments if necessary */
+- if (info_ptr->num_text >= info_ptr->max_text)
++ if (num_text >= max_text)
+ {
+ if ((tp =
+- realloc(text, (info_ptr->num_text + 2)*sizeof(png_text))) == NULL)
++ realloc(text, (num_text + 2)*sizeof(png_text))) == NULL)
+ {
+ break;
+ }
+ else
+ {
+ text = tp;
+- tp = &text[info_ptr->num_text];
+- info_ptr->max_text += 2;
++ tp = &text[num_text];
++ max_text += 2;
+ }
+ }
+
+@@ -810,7 +847,7 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ }
+
+ tp->compression = tp->text_length > 640 ? 0 : -1;
+- info_ptr->num_text++;
++ num_text++;
+ tp++;
+ }
+ }
+@@ -834,27 +871,29 @@ int WritePNG(fp, pic, ptype, w, h, rmap, gmap, bmap, n
+ tp->text = key;
+ tp->text_length = q - key;
+ tp->compression = tp->text_length > 750 ? 0 : -1;
+- info_ptr->num_text++;
++ num_text++;
+ key = NULL;
+ }
+ } while (key && *key);
++ png_set_text(png_ptr, info_ptr, text, num_text);
+ }
+ else {
+- info_ptr->num_text = 0;
++ png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1);
+ }
+ }
+- info_ptr->text = text;
+
+- png_convert_from_time_t(&(info_ptr->mod_time), time(NULL));
+- info_ptr->valid |= PNG_INFO_tIME;
++ {
++ png_time mod_time;
+
++ png_convert_from_time_t(&mod_time, time(NULL));
++ png_set_tIME(png_ptr, info_ptr, &mod_time);
++ }
++
+ png_write_end(png_ptr, info_ptr);
+ fflush(fp); /* just in case we core-dump before finishing... */
+
+ if (text) {
+ free(text);
+- /* must do this or png_destroy_write_struct() 0.97+ will free text again: */
+- info_ptr->text = (png_textp)NULL;
+ if (savecmnt)
+ {
+ free(savecmnt);
+@@ -886,6 +925,8 @@ int LoadPNG(fname, pinfo)
+ int pass;
+ int gray_to_rgb;
+ size_t commentsize;
++ png_textp text;
++ int num_text;
+
+ fbasename = BaseName(fname);
+
+@@ -921,7 +962,7 @@ int LoadPNG(fname, pinfo)
+ FatalError("malloc failure in LoadPNG");
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ fclose(fp);
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ if (!read_anything) {
+@@ -945,8 +986,8 @@ int LoadPNG(fname, pinfo)
+ #endif
+ png_read_info(png_ptr, info_ptr);
+
+- pinfo->w = pinfo->normw = info_ptr->width;
+- pinfo->h = pinfo->normh = info_ptr->height;
++ pinfo->w = pinfo->normw = png_get_image_width(png_ptr, info_ptr);
++ pinfo->h = pinfo->normh = png_get_image_height(png_ptr, info_ptr);
+ if (pinfo->w <= 0 || pinfo->h <= 0) {
+ SetISTR(ISTR_WARNING, "%s: image dimensions out of range (%dx%d)",
+ fbasename, pinfo->w, pinfo->h);
+@@ -957,9 +998,9 @@ int LoadPNG(fname, pinfo)
+ pinfo->frmType = F_PNG;
+
+ sprintf(pinfo->fullInfo, "PNG, %d bit ",
+- info_ptr->bit_depth * info_ptr->channels);
++ png_get_bit_depth(png_ptr,info_ptr) * png_get_channels(png_ptr, info_ptr));
+
+- switch(info_ptr->color_type) {
++ switch(png_get_color_type(png_ptr, info_ptr)) {
+ case PNG_COLOR_TYPE_PALETTE:
+ strcat(pinfo->fullInfo, "palette color");
+ break;
+@@ -983,15 +1024,20 @@ int LoadPNG(fname, pinfo)
+
+ sprintf(pinfo->fullInfo + strlen(pinfo->fullInfo),
+ ", %sinterlaced. (%d bytes)",
+- info_ptr->interlace_type ? "" : "non-", filesize);
++ png_get_interlace_type(png_ptr, info_ptr) ? "" : "non-", filesize);
+
+- sprintf(pinfo->shrtInfo, "%lux%lu PNG", info_ptr->width, info_ptr->height);
++ sprintf(pinfo->shrtInfo, "%lux%lu PNG",
++ png_get_image_width(png_ptr, info_ptr),
++ png_get_image_height(png_ptr, info_ptr));
+
+- if (info_ptr->bit_depth < 8)
++ if (png_get_bit_depth(png_ptr, info_ptr) < 8)
+ png_set_packing(png_ptr);
+
+- if (info_ptr->valid & PNG_INFO_gAMA)
+- png_set_gamma(png_ptr, Display_Gamma, info_ptr->gamma);
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_gAMA)) {
++ double gamma;
++ png_get_gAMA(png_ptr, info_ptr, &gamma);
++ png_set_gamma(png_ptr, Display_Gamma, gamma);
++ }
+ /*
+ *else
+ * png_set_gamma(png_ptr, Display_Gamma, 0.45);
+@@ -1000,7 +1046,7 @@ int LoadPNG(fname, pinfo)
+ gray_to_rgb = 0; /* quiet a compiler warning */
+
+ if (have_imagebg) {
+- if (info_ptr->bit_depth == 16) {
++ if (png_get_bit_depth(png_ptr, info_ptr) == 16) {
+ my_background.red = imagebgR;
+ my_background.green = imagebgG;
+ my_background.blue = imagebgB;
+@@ -1013,8 +1059,8 @@ int LoadPNG(fname, pinfo)
+ }
+ png_set_background(png_ptr, &my_background, PNG_BACKGROUND_GAMMA_SCREEN,
+ 0, Display_Gamma);
+- if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA ||
+- (info_ptr->color_type == PNG_COLOR_TYPE_GRAY && HAVE_tRNS)) &&
++ if ((png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA ||
++ (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY && HAVE_tRNS)) &&
+ (imagebgR != imagebgG || imagebgR != imagebgB)) /* i.e., colored bg */
+ {
+ png_set_gray_to_rgb(png_ptr);
+@@ -1022,8 +1068,10 @@ int LoadPNG(fname, pinfo)
+ gray_to_rgb = 1;
+ }
+ } else {
+- if (info_ptr->valid & PNG_INFO_bKGD) {
+- png_set_background(png_ptr, &info_ptr->background,
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) {
++ png_color_16p background;
++ png_get_bKGD(png_ptr, info_ptr, &background);
++ png_set_background(png_ptr, background,
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
+ } else {
+ my_background.red = my_background.green = my_background.blue =
+@@ -1033,13 +1081,13 @@ int LoadPNG(fname, pinfo)
+ }
+ }
+
+- if (info_ptr->bit_depth == 16)
++ if (png_get_bit_depth(png_ptr, info_ptr) == 16)
+ png_set_strip_16(png_ptr);
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
+- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY ||
++ png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
+ {
+- if (info_ptr->bit_depth == 1)
++ if (png_get_bit_depth(png_ptr, info_ptr) == 1)
+ pinfo->colType = F_BWDITHER;
+ else
+ pinfo->colType = F_GREYSCALE;
+@@ -1050,8 +1098,8 @@ int LoadPNG(fname, pinfo)
+
+ png_read_update_info(png_ptr, info_ptr);
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB ||
+- info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || gray_to_rgb)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB ||
++ png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA || gray_to_rgb)
+ {
+ linesize = 3 * pinfo->w;
+ if (linesize/3 < pinfo->w) { /* know pinfo->w > 0 (see above) */
+@@ -1065,16 +1113,20 @@ int LoadPNG(fname, pinfo)
+ } else {
+ linesize = pinfo->w;
+ pinfo->type = PIC8;
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
+- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY ||
++ png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA) {
+ for (i = 0; i < 256; i++)
+ pinfo->r[i] = pinfo->g[i] = pinfo->b[i] = i;
+ } else {
++ png_colorp palette;
++ int num_palette;
++
++ png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette);
+ pinfo->colType = F_FULLCOLOR;
+- for (i = 0; i < info_ptr->num_palette; i++) {
+- pinfo->r[i] = info_ptr->palette[i].red;
+- pinfo->g[i] = info_ptr->palette[i].green;
+- pinfo->b[i] = info_ptr->palette[i].blue;
++ for (i = 0; i < num_palette; i++) {
++ pinfo->r[i] = palette[i].red;
++ pinfo->g[i] = palette[i].green;
++ pinfo->b[i] = palette[i].blue;
+ }
+ }
+ }
+@@ -1092,7 +1144,17 @@ int LoadPNG(fname, pinfo)
+ png_error(png_ptr, "can't allocate space for PNG image");
+ }
+
+- png_start_read_image(png_ptr);
++ /*
++ * In png 1.5 (or at least 1.5.1beta06) calling this after calling
++ * png_read_update_info() does nothing besides issue a misleading
++ * warning message. The png docs are not at all clear on what an
++ * application is *supposed* to do, so I'm not sure if this is a
++ * problem with xv or with libpng. However, for now I'll comment
++ * this out as according to the png source that should be harmless
++ * and we don't want to see the warning message every time someone
++ * opens a png.
++ */
++ /*png_start_read_image(png_ptr);*/
+
+ for (i = 0; i < pass; i++) {
+ byte *p = pinfo->pic;
+@@ -1106,22 +1168,24 @@ int LoadPNG(fname, pinfo)
+
+ png_read_end(png_ptr, info_ptr);
+
+- if (info_ptr->num_text > 0) {
++ png_get_text(png_ptr, info_ptr, &text, &num_text);
++ if (num_text > 0) {
+ commentsize = 1;
+
+- for (i = 0; i < info_ptr->num_text; i++)
+- commentsize += strlen(info_ptr->text[i].key) + 1 +
+- info_ptr->text[i].text_length + 2;
++ for (i = 0; i < num_text; i++)
++ commentsize += strlen(text[i].key) + 1 +
++ text[i].text_length + 2;
+
+ if ((pinfo->comment = malloc(commentsize)) == NULL) {
+ png_warning(png_ptr,"can't allocate comment string");
+ }
+ else {
+ pinfo->comment[0] = '\0';
+- for (i = 0; i < info_ptr->num_text; i++) {
+- strcat(pinfo->comment, info_ptr->text[i].key);
++ for (i = 0; i < num_text; i++) {
++ strcat(pinfo->comment, text[i].key);
+ strcat(pinfo->comment, "::");
+- strcat(pinfo->comment, info_ptr->text[i].text);
++ if (text[i].text_length != 0)
++ strcat(pinfo->comment, text[i].text);
+ strcat(pinfo->comment, "\n");
+ }
+ }
+@@ -1143,7 +1207,7 @@ png_xv_error(png_ptr, message)
+ {
+ SetISTR(ISTR_WARNING,"%s: libpng error: %s", fbasename, message);
+
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+
diff --git a/source/xap/xv/xv.SlackBuild b/source/xap/xv/xv.SlackBuild
index 95042cd8b..9b5b4cd31 100755
--- a/source/xap/xv/xv.SlackBuild
+++ b/source/xap/xv/xv.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,7 +21,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION=3.10a
-BUILD=${BUILD:-6}
+BUILD=${BUILD:-7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -54,7 +54,8 @@ if [ "$ARCH" = "x86_64" ]; then
zcat $CWD/xv.prefix_x86_64.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
fi
zcat $CWD/xv.jasper.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
-make -f Makefile.std
+zcat $CWD/xv-libpng-1.5.patch.gz | patch -p0 --verbose --backup --suffix=.orig || exit 1
+make -f Makefile.std || exit 1
strip --strip-unneeded bggen vdcomp xcmap xv xvpictoppm
mkdir -p $PKG/usr/bin
cat bggen > $PKG/usr/bin/bggen
diff --git a/source/xfce/Thunar/0001-Deactivate-SEND_MOVED-code-paths.patch b/source/xfce/Thunar/0001-Deactivate-SEND_MOVED-code-paths.patch
new file mode 100644
index 000000000..ed1e9ecaa
--- /dev/null
+++ b/source/xfce/Thunar/0001-Deactivate-SEND_MOVED-code-paths.patch
@@ -0,0 +1,48 @@
+From 95ed18a7322c5cb27024547425a05522d5f34d7b Mon Sep 17 00:00:00 2001
+From: Harald Judt <h.judt@gmx.at>
+Date: Fri, 13 Nov 2015 13:29:49 +0100
+Subject: Deactivate SEND_MOVED code paths
+
+---
+ thunar/thunar-file.c | 4 ++--
+ thunar/thunar-folder.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
+index 3262dfb..e3f9076 100644
+--- a/thunar/thunar-file.c
++++ b/thunar/thunar-file.c
+@@ -853,7 +853,7 @@ thunar_file_watch_reconnect (ThunarFile *file)
+ }
+
+ /* create a file or directory monitor */
+- file_watch->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_WATCH_MOUNTS | G_FILE_MONITOR_SEND_MOVED, NULL, NULL);
++ file_watch->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_WATCH_MOUNTS, NULL, NULL);
+ if (G_LIKELY (file_watch->monitor != NULL))
+ {
+ /* watch monitor for file changes */
+@@ -3854,7 +3854,7 @@ thunar_file_watch (ThunarFile *file)
+ file_watch->watch_count = 1;
+
+ /* create a file or directory monitor */
+- file_watch->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_WATCH_MOUNTS | G_FILE_MONITOR_SEND_MOVED, NULL, NULL);
++ file_watch->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_WATCH_MOUNTS, NULL, NULL);
+ if (G_LIKELY (file_watch->monitor != NULL))
+ {
+ /* watch monitor for file changes */
+diff --git a/thunar/thunar-folder.c b/thunar/thunar-folder.c
+index 9decb89..bd8249d 100644
+--- a/thunar/thunar-folder.c
++++ b/thunar/thunar-folder.c
+@@ -569,7 +569,7 @@ thunar_folder_finished (ExoJob *job,
+
+ /* add us to the file alteration monitor */
+ folder->monitor = g_file_monitor_directory (thunar_file_get_file (folder->corresponding_file),
+- G_FILE_MONITOR_SEND_MOVED, NULL, NULL);
++ G_FILE_MONITOR_NONE, NULL, NULL);
+ if (G_LIKELY (folder->monitor != NULL))
+ g_signal_connect (folder->monitor, "changed", G_CALLBACK (thunar_folder_monitor), folder);
+
+--
+2.6.3
+
diff --git a/source/xfce/Thunar/Thunar.SlackBuild b/source/xfce/Thunar/Thunar.SlackBuild
index 9a49b089d..012b24e4d 100755
--- a/source/xfce/Thunar/Thunar.SlackBuild
+++ b/source/xfce/Thunar/Thunar.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=Thunar
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -73,6 +73,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+zcat $CWD/0001-Deactivate-SEND_MOVED-code-paths.patch.gz | patch -p1 --verbose || exit 1
+
# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/xfce/exo/exo.SlackBuild b/source/xfce/exo/exo.SlackBuild
index efb86758a..ee299a2e3 100755
--- a/source/xfce/exo/exo.SlackBuild
+++ b/source/xfce/exo/exo.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=exo
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -64,8 +64,6 @@ rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1
-zcat $CWD/exo.magnet.uri.diff.gz | patch -p1 --verbose || exit 1
-
find . -exec touch {} \;
chown -R root:root .
@@ -75,6 +73,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+patch -p1 < $CWD/0001-Do-not-use-x-scheme-handler-file-mimetype-bug-7257.patch
+
# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/xfce/exo/exo.magnet.uri.diff b/source/xfce/exo/exo.magnet.uri.diff
deleted file mode 100644
index 336ca2121..000000000
--- a/source/xfce/exo/exo.magnet.uri.diff
+++ /dev/null
@@ -1,49 +0,0 @@
-From 05848bb3cb10ea19ef8cba607bdabcd25560063c Mon Sep 17 00:00:00 2001
-From: Felipe Contreras <felipe.contreras@gmail.com>
-Date: Sun, 19 May 2013 03:50:01 +0000
-Subject: Fix exo_str_looks_like_an_uri() (bug #10098).
-
-Commit d11199b (Check if uris also contain a slash (bug #9244)) tried to
-fix a hang in thunar by properly recognizing that 'http:' is not an URI,
-however, while doing so, it broke proper URIs like 'magnet:foo'.
-
-As the RFC clearly states:
-
- The following are two example URIs and their component parts:
-
- foo://example.com:8042/over/there?name=ferret#nose
- \_/ \______________/\_________/ \_________/ \__/
- | | | | |
- scheme authority path query fragment
- | _____________________|__
- / \ / \
- urn:example:animal:ferret:nose
-
-But even with this succinct example exo_str_looks_like_an_uri() fails.
-
-There is an easy solution; fail only when component part is missing
-('urn:'), but succeed otherwise.
-
-This solution fixes 'magnet:foo', and doesn't break the current
-expectation from thunar that 'http:' should fail, having the best of
-both worlds.
-
-[1] http://www.ietf.org/rfc/rfc3986.txt
-
-Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
----
-diff --git a/exo/exo-string.c b/exo/exo-string.c
-index 33f86f9..056b36a 100644
---- a/exo/exo-string.c
-+++ b/exo/exo-string.c
-@@ -429,7 +429,7 @@ exo_str_looks_like_an_uri (const gchar *str)
- for (++s; g_ascii_isalnum (*s) || *s == '+' || *s == '-' || *s == '.'; ++s);
-
- /* <scheme> must be followed by ":" */
-- return (*s == ':' && *(s+1) == '/');
-+ return (*s == ':' && *(s+1) != '\0');
- }
-
- return FALSE;
---
-cgit v0.9.2
diff --git a/source/xfce/exo/exo.url b/source/xfce/exo/exo.url
new file mode 100644
index 000000000..9a66d2ebd
--- /dev/null
+++ b/source/xfce/exo/exo.url
@@ -0,0 +1 @@
+http://archive.xfce.org:/src/xfce/exo/0.10/
diff --git a/source/xfce/garcon/garcon.SlackBuild b/source/xfce/garcon/garcon.SlackBuild
index f60c47f92..6f7c6d59c 100755
--- a/source/xfce/garcon/garcon.SlackBuild
+++ b/source/xfce/garcon/garcon.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=garcon
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -71,6 +71,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+patch -p1 < $CWD/0013-Don-t-force-URLs-to-be-opened-in-a-web-browser-bug-1.patch
+patch -p1 < $CWD/0014-Add-case-insensitive-sorting-to-the-menu-bug-10594.patch
+patch -p1 < $CWD/0017-Fix-menu-icons-for-misconfigured-desktop-files-Bug-1.patch
+
# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/xfce/gtk-xfce-engine/gtk-xfce-engine.SlackBuild b/source/xfce/gtk-xfce-engine/gtk-xfce-engine.SlackBuild
index 8e9454c1c..ae7f56661 100755
--- a/source/xfce/gtk-xfce-engine/gtk-xfce-engine.SlackBuild
+++ b/source/xfce/gtk-xfce-engine/gtk-xfce-engine.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=gtk-xfce-engine
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/xfce/libxfce4ui/libxfce4ui.SlackBuild b/source/xfce/libxfce4ui/libxfce4ui.SlackBuild
index e1e02e9d0..e707077b0 100755
--- a/source/xfce/libxfce4ui/libxfce4ui.SlackBuild
+++ b/source/xfce/libxfce4ui/libxfce4ui.SlackBuild
@@ -28,7 +28,7 @@ BUILD=${BUILD:-2}
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -88,9 +88,9 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# Add vendor info in /usr/share/xfce4/Slackware
+# Add vendor info in /usr/share/xfce4/vendorinfo
mkdir -p $PKG/usr/share/xfce4
-echo "http://slackware.com/" > $PKG/usr/share/xfce4/Slackware
+cat $CWD/vendorinfo > $PKG/usr/share/xfce4/vendorinfo
# Strip binaries:
( cd $PKG
diff --git a/source/xfce/libxfce4ui/vendorinfo b/source/xfce/libxfce4ui/vendorinfo
new file mode 100644
index 000000000..b2818ba14
--- /dev/null
+++ b/source/xfce/libxfce4ui/vendorinfo
@@ -0,0 +1,7 @@
+The Official Release of Slackware Linux by Patrick Volkerding is an advanced Linux operating system, designed with the twin goals of ease of use and stability as top priorities. Including the latest popular software while retaining a sense of tradition, providing simplicity and ease of use alongside flexibility and power, Slackware brings the best of all worlds to the table.
+
+Originally developed by Linus Torvalds in 1991, the UNIX®-like Linux operating system now benefits from the contributions of millions of users and developers around the world. Slackware Linux provides new and experienced users alike with a fully-featured system, equipped to serve in any capacity from desktop workstation to machine-room server. Web, ftp, and email servers are ready to go out of the box, as are a wide selection of popular desktop environments. A full range of development tools, editors, and current libraries is included for users who wish to develop or compile additional software.
+
+Since its first beta release in April of 1993, the Slackware Linux Project has aimed at producing the most "UNIX-like" Linux distribution out there. Slackware complies with the published Linux standards, such as the Linux File System Standard. We have always considered simplicity and stability paramount, and as a result Slackware has become one of the most popular, stable, and friendly distributions available.
+
+See http://slackware.com/ for more information.
diff --git a/source/xfce/libxfce4util/libxfce4util.SlackBuild b/source/xfce/libxfce4util/libxfce4util.SlackBuild
index 8d19530dc..a7b107179 100755
--- a/source/xfce/libxfce4util/libxfce4util.SlackBuild
+++ b/source/xfce/libxfce4util/libxfce4util.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=libxfce4util
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/xfce/orage/orage.SlackBuild b/source/xfce/orage/orage.SlackBuild
index ffa62aeb2..81e57e0f7 100755
--- a/source/xfce/orage/orage.SlackBuild
+++ b/source/xfce/orage/orage.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for orage
-# Copyright 2010,2011,2012 Robby Workman, Northport, Alabama, USA
+# Copyright 2010-2014 Robby Workman, Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,11 +24,11 @@
PKGNAM=orage
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +40,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
diff --git a/source/xfce/thunar-volman/0001-Fix-return-with-no-value-in-function-returning-non-v.patch b/source/xfce/thunar-volman/0001-Fix-return-with-no-value-in-function-returning-non-v.patch
new file mode 100644
index 000000000..4e379ae9d
--- /dev/null
+++ b/source/xfce/thunar-volman/0001-Fix-return-with-no-value-in-function-returning-non-v.patch
@@ -0,0 +1,26 @@
+From 2e295e9ce8f7f60a271adf004588b0d8db88db09 Mon Sep 17 00:00:00 2001
+From: Matt Thirtytwo <matt.59491@gmail.com>
+Date: Sat, 7 Mar 2015 22:50:32 +0100
+Subject: [PATCH] Fix return with no value in function returning non-void (bug
+ #11656)
+
+---
+ thunar-volman/tvm-block-device.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/thunar-volman/tvm-block-device.c b/thunar-volman/tvm-block-device.c
+index da31efa..edb6cad 100644
+--- a/thunar-volman/tvm-block-device.c
++++ b/thunar-volman/tvm-block-device.c
+@@ -714,7 +714,7 @@ tvm_block_device_mount (TvmContext *context)
+ GMountOperation *mount_operation;
+ GVolume *volume;
+
+- g_return_if_fail (context != NULL);
++ g_return_val_if_fail ((context != NULL), FALSE);
+
+ /* determine the GVolume corresponding to the udev device */
+ volume =
+--
+2.3.3
+
diff --git a/source/xfce/thunar-volman/thunar-volman.SlackBuild b/source/xfce/thunar-volman/thunar-volman.SlackBuild
index 89fd5ab82..37918aa9f 100755
--- a/source/xfce/thunar-volman/thunar-volman.SlackBuild
+++ b/source/xfce/thunar-volman/thunar-volman.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for thunar-volman
-# Copyright 2007-2012 Robby Workman, Northport, Alabama, USA
+# Copyright 2007-2015 Robby Workman, Tuscaloosa, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,11 +25,11 @@
PKGNAM=thunar-volman
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -41,8 +41,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -68,6 +68,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+patch -p1 < $CWD/0001-Fix-return-with-no-value-in-function-returning-non-v.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/xfce/tumbler/set-gststate-on-error.diff b/source/xfce/tumbler/set-gststate-on-error.diff
deleted file mode 100644
index 042c03ecd..000000000
--- a/source/xfce/tumbler/set-gststate-on-error.diff
+++ /dev/null
@@ -1,23 +0,0 @@
-Description: Close file on error
-Origin: other, https://bugzilla.xfce.org/attachment.cgi?id=4447
-Bug: https://bugzilla.xfce.org/show_bug.cgi?id=8303
-Bug-Ubuntu: https://launchpad.net/bugs/995918
-
---- tumbler-0.1.25.orig/plugins/gst-thumbnailer/gst-thumbnailer.c
-+++ tumbler-0.1.25/plugins/gst-thumbnailer/gst-thumbnailer.c
-@@ -233,6 +233,7 @@ make_pipeline (TumblerFileInfo *info,
- if (state == GST_STATE_CHANGE_FAILURE || state == GST_STATE_CHANGE_ASYNC)
- {
- LOG ("failed to or still changing state, aborting (state change %d)", state);
-+ gst_element_set_state (playbin, GST_STATE_NULL);
- g_object_unref (playbin);
- return NULL;
- }
-@@ -241,6 +242,7 @@ make_pipeline (TumblerFileInfo *info,
- if (n_video == 0)
- {
- LOG ("no video stream, aborting");
-+ gst_element_set_state (playbin, GST_STATE_NULL);
- g_object_unref (playbin);
- return NULL;
- }
diff --git a/source/xfce/tumbler/tumbler.SlackBuild b/source/xfce/tumbler/tumbler.SlackBuild
index 97c3ff5aa..a6e538d75 100755
--- a/source/xfce/tumbler/tumbler.SlackBuild
+++ b/source/xfce/tumbler/tumbler.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,13 @@
PKGNAM=tumbler
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-8}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -64,8 +64,6 @@ rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1
-zcat $CWD/set-gststate-on-error.diff.gz | patch -p1 --verbose || exit 1
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/source/xfce/xfce-build-all.sh b/source/xfce/xfce-build-all.sh
index bf249216e..5a67a4ba2 100755
--- a/source/xfce/xfce-build-all.sh
+++ b/source/xfce/xfce-build-all.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2012, 2015, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -31,7 +31,6 @@ for package in \
libxfce4util \
xfconf \
libxfce4ui \
- libxfcegui4 \
exo \
garcon \
tumbler \
@@ -43,14 +42,12 @@ for package in \
xfwm4 \
xfce4-appfinder \
gtk-xfce-engine \
- xfwm4-themes \
xfce4-terminal \
orage \
- xfce4-mixer \
thunar-volman \
xfce4-power-manager \
+ xfce4-pulseaudio-plugin \
xfce4-notifyd \
- xfce4-volumed \
xfce4-clipman-plugin \
xfce4-screenshooter \
xfce4-systemload-plugin \
diff --git a/source/xfce/xfce4-appfinder/xfce4-appfinder.SlackBuild b/source/xfce/xfce4-appfinder/xfce4-appfinder.SlackBuild
index dffff6897..4fe30b44e 100755
--- a/source/xfce/xfce4-appfinder/xfce4-appfinder.SlackBuild
+++ b/source/xfce/xfce4-appfinder/xfce4-appfinder.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=xfce4-appfinder
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/xfce/xfce4-clipman-plugin/xfce4-clipman-plugin.SlackBuild b/source/xfce/xfce4-clipman-plugin/xfce4-clipman-plugin.SlackBuild
index 01329094c..1ab4e87d5 100755
--- a/source/xfce/xfce4-clipman-plugin/xfce4-clipman-plugin.SlackBuild
+++ b/source/xfce/xfce4-clipman-plugin/xfce4-clipman-plugin.SlackBuild
@@ -24,12 +24,12 @@
PKGNAM=xfce4-clipman-plugin
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
@@ -42,8 +42,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
diff --git a/source/xfce/xfce4-dev-tools/xfce4-dev-tools.SlackBuild b/source/xfce/xfce4-dev-tools/xfce4-dev-tools.SlackBuild
index 0924180e5..6389c8f33 100755
--- a/source/xfce/xfce4-dev-tools/xfce4-dev-tools.SlackBuild
+++ b/source/xfce/xfce4-dev-tools/xfce4-dev-tools.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=xfce4-dev-tools
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/xfce/xfce4-notifyd/0001-Set-notifications-as-override-redirect-windows-bug-1.patch b/source/xfce/xfce4-notifyd/0001-Set-notifications-as-override-redirect-windows-bug-1.patch
new file mode 100644
index 000000000..140e1d126
--- /dev/null
+++ b/source/xfce/xfce4-notifyd/0001-Set-notifications-as-override-redirect-windows-bug-1.patch
@@ -0,0 +1,25 @@
+From 24d77f5b06c704506b4ae9d2eabdb96e56e12dae Mon Sep 17 00:00:00 2001
+From: Liquider <liquiderz@gmail.com>
+Date: Sun, 16 Feb 2014 14:04:20 +0100
+Subject: [PATCH 1/3] Set notifications as override redirect windows (bug
+ #10686).
+
+---
+ xfce4-notifyd/xfce-notify-window.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c
+index f8ffdf6..29287fa 100644
+--- a/xfce4-notifyd/xfce-notify-window.c
++++ b/xfce4-notifyd/xfce-notify-window.c
+@@ -318,6 +318,7 @@ xfce_notify_window_realize(GtkWidget *widget)
+
+ gdk_window_set_type_hint(widget->window,
+ GDK_WINDOW_TYPE_HINT_NOTIFICATION);
++ gdk_window_set_override_redirect(gtk_widget_get_window(widget), TRUE);
+ xfce_notify_window_start_expiration(window);
+ }
+
+--
+2.3.0
+
diff --git a/source/xfce/xfce4-notifyd/0002-Use-accessor-function-to-get-the-GdkWindow.patch b/source/xfce/xfce4-notifyd/0002-Use-accessor-function-to-get-the-GdkWindow.patch
new file mode 100644
index 000000000..a50d31856
--- /dev/null
+++ b/source/xfce/xfce4-notifyd/0002-Use-accessor-function-to-get-the-GdkWindow.patch
@@ -0,0 +1,25 @@
+From 93123ab4b7b73e8295102e709d5eeea398774650 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Guelfucci?= <jeromeg@xfce.org>
+Date: Sun, 16 Feb 2014 14:09:36 +0100
+Subject: [PATCH 2/3] Use accessor function to get the GdkWindow.
+
+---
+ xfce4-notifyd/xfce-notify-window.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c
+index 29287fa..e2fc40a 100644
+--- a/xfce4-notifyd/xfce-notify-window.c
++++ b/xfce4-notifyd/xfce-notify-window.c
+@@ -316,7 +316,7 @@ xfce_notify_window_realize(GtkWidget *widget)
+
+ GTK_WIDGET_CLASS(xfce_notify_window_parent_class)->realize(widget);
+
+- gdk_window_set_type_hint(widget->window,
++ gdk_window_set_type_hint(gtk_widget_get_window(widget),
+ GDK_WINDOW_TYPE_HINT_NOTIFICATION);
+ gdk_window_set_override_redirect(gtk_widget_get_window(widget), TRUE);
+ xfce_notify_window_start_expiration(window);
+--
+2.3.0
+
diff --git a/source/xfce/xfce4-notifyd/xfce4-notifyd.SlackBuild b/source/xfce/xfce4-notifyd/xfce4-notifyd.SlackBuild
index af500ff2b..aa5ead86c 100755
--- a/source/xfce/xfce4-notifyd/xfce4-notifyd.SlackBuild
+++ b/source/xfce/xfce4-notifyd/xfce4-notifyd.SlackBuild
@@ -26,12 +26,12 @@
PKGNAM=xfce4-notifyd
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -44,8 +44,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -71,6 +71,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+patch -p1 < $CWD/0001-Set-notifications-as-override-redirect-windows-bug-1.patch
+patch -p1 < $CWD/0002-Use-accessor-function-to-get-the-GdkWindow.patch
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/source/xfce/xfce4-panel/libxfce4panel.max_blinking_count.8.diff b/source/xfce/xfce4-panel/libxfce4panel.max_blinking_count.8.diff
new file mode 100644
index 000000000..3a2df6751
--- /dev/null
+++ b/source/xfce/xfce4-panel/libxfce4panel.max_blinking_count.8.diff
@@ -0,0 +1,12 @@
+--- libxfce4panel/xfce-arrow-button.c.old 2013-05-05 17:47:07.000000000 +0200
++++ libxfce4panel/xfce-arrow-button.c 2013-09-17 10:09:51.162754511 +0200
+@@ -52,7 +52,7 @@
+
+
+ #define ARROW_WIDTH (8)
+-#define MAX_BLINKING_COUNT (G_MAXUINT)
++#define MAX_BLINKING_COUNT (8)
+
+ enum
+ {
+
diff --git a/source/xfce/xfce4-panel/xfce4-panel.SlackBuild b/source/xfce/xfce4-panel/xfce4-panel.SlackBuild
index 37620b8c1..6d98f8ad5 100755
--- a/source/xfce/xfce4-panel/xfce4-panel.SlackBuild
+++ b/source/xfce/xfce4-panel/xfce4-panel.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2012, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,13 @@
PKGNAM=xfce4-panel
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -64,6 +64,9 @@ rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1
+# Blink to notify 4 times (4 on, 4 off), not G_MAXUINT times:
+zcat $CWD/libxfce4panel.max_blinking_count.8.diff.gz | patch -p0 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -81,6 +84,7 @@ CFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/$PKGNAM-$VERSION \
--disable-static \
--disable-debug \
+ --enable-gtk3 \
--build=$ARCH-slackware-linux || exit 1
# Build and install:
diff --git a/source/xfce/xfce4-power-manager/xfce4-power-manager.SlackBuild b/source/xfce/xfce4-power-manager/xfce4-power-manager.SlackBuild
index f378984fb..d4130a3a8 100755
--- a/source/xfce/xfce4-power-manager/xfce4-power-manager.SlackBuild
+++ b/source/xfce/xfce4-power-manager/xfce4-power-manager.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for xfce4-power-manager
# Copyright 2006-2012 Robby Workman Northport, Alabama, USA
-# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,11 +26,11 @@
PKGNAM=xfce4-power-manager
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-4}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
*) export ARCH=$( uname -m ) ;;
esac
@@ -42,8 +42,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -79,7 +79,7 @@ CFLAGS="$SLKCFLAGS" \
--enable-shared=yes \
--enable-static=no \
--enable-debug=no \
- --enable-network-manager \
+ --disable-network-manager \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
@@ -107,10 +107,6 @@ mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/html
cp -a \
AUTHORS COPYING* NEWS README* TODO \
$PKG/usr/doc/$PKGNAM-$VERSION
-( cd $PKG/usr/doc/$PKGNAM-$VERSION/html
- ln -s /usr/share/xfce4/doc/C/xfce4-power-manager.html index.html
- ln -s /usr/share/xfce4/doc/C/images .
-)
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
diff --git a/source/xfce/xfce4-pulseaudio-plugin/slack-desc b/source/xfce/xfce4-pulseaudio-plugin/slack-desc
new file mode 100644
index 000000000..1417d6764
--- /dev/null
+++ b/source/xfce/xfce4-pulseaudio-plugin/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+xfce4-pulseaudio-plugin: xfce4-pulseaudio-plugin (PulseAudio plugin for Xfce panel)
+xfce4-pulseaudio-plugin:
+xfce4-pulseaudio-plugin: xfce4-pulseaudio-plugin is a plugin for the Xfce panel which provides
+xfce4-pulseaudio-plugin: a convenient way to adjust the audio volume of the PulseAudio sound
+xfce4-pulseaudio-plugin: system and to an auto mixer tool like pavucontrol. It can optionally
+xfce4-pulseaudio-plugin: handle multimedia keys for controlling the audio volume.
+xfce4-pulseaudio-plugin:
+xfce4-pulseaudio-plugin:
+xfce4-pulseaudio-plugin:
+xfce4-pulseaudio-plugin:
+xfce4-pulseaudio-plugin:
diff --git a/source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme.patch b/source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme.patch
new file mode 100644
index 000000000..717cfbe1e
--- /dev/null
+++ b/source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme.patch
@@ -0,0 +1,12 @@
+diff -U3 -d -r -N xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-button.c xfce4-pulseaudio-plugin-0.2.4.fixed/panel-plugin/pulseaudio-button.c
+--- xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-button.c 2015-06-06 23:57:55.000000000 +0200
++++ xfce4-pulseaudio-plugin-0.2.4.fixed/panel-plugin/pulseaudio-button.c 2016-06-22 21:51:07.258482863 +0200
+@@ -137,7 +137,7 @@
+
+ /* Setup Gtk style */
+ css_provider = gtk_css_provider_new ();
+- gtk_css_provider_load_from_data (css_provider, "#pulseaudio-button { -GtkWidget-focus-padding: 0; -GtkWidget-focus-line-width: 0; -GtkButton-default-border: 0; -GtkButton-inner-border: 0; padding: 1px; border-width: 1px;}", -1, NULL);
++ gtk_css_provider_load_from_data (css_provider, "#pulseaudio-button { -GtkWidget-focus-padding: 0; -GtkWidget-focus-line-width: 0; -GtkButton-default-border: 0; -GtkButton-inner-border: 0; padding: 1px; border-width: 0px; border-radius: 0px; background-color:@theme_bg_color;}", -1, NULL);
+ gtk_style_context_add_provider (GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (button))), GTK_STYLE_PROVIDER (css_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+
+ /* Intercept scroll events */
diff --git a/source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme_clean.patch b/source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme_clean.patch
new file mode 100644
index 000000000..5f9358b42
--- /dev/null
+++ b/source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme_clean.patch
@@ -0,0 +1,12 @@
+diff -U3 -d -r -N xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-button.c xfce4-pulseaudio-plugin-0.2.4.fixed/panel-plugin/pulseaudio-button.c
+--- xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-button.c 2015-06-06 23:57:55.000000000 +0200
++++ xfce4-pulseaudio-plugin-0.2.4.fixed/panel-plugin/pulseaudio-button.c 2016-06-22 21:51:07.258482863 +0200
+@@ -137,7 +137,7 @@
+
+ /* Setup Gtk style */
+ css_provider = gtk_css_provider_new ();
+- gtk_css_provider_load_from_data (css_provider, "#pulseaudio-button { -GtkWidget-focus-padding: 0; -GtkWidget-focus-line-width: 0; -GtkButton-default-border: 0; -GtkButton-inner-border: 0; padding: 1px; border-width: 1px;}", -1, NULL);
++ gtk_css_provider_load_from_data (css_provider, "#pulseaudio-button { -GtkWidget-focus-padding: 0; -GtkWidget-focus-line-width: 0; -GtkButton-default-border: 0; -GtkButton-inner-border: 0; padding: 0px; border-width: 5px; border-radius: 13px; color:@theme_fg_color;}", -1, NULL);
+ gtk_style_context_add_provider (GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (button))), GTK_STYLE_PROVIDER (css_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+
+ /* Intercept scroll events */
diff --git a/source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin.SlackBuild b/source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin.SlackBuild
new file mode 100755
index 000000000..7d3984c32
--- /dev/null
+++ b/source/xfce/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin.SlackBuild
@@ -0,0 +1,127 @@
+#!/bin/sh
+
+# Slackware build script for xfce4-pulseaudio-plugin
+
+# Copyright 2015 Robby Workman, Tuscaloosa, Alabama, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=xfce4-pulseaudio-plugin
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# These are proposed patches to fix the background color of the plugin icon.
+# However, both of them have some issues with artifacts or with changing the
+# dimensions of the icon in unpleasant ways. Supposedly the correct way to
+# fix the issue is in the theme css, but since it's an issue with GTK+2 and
+# GTK+3 not getting along, few theme maintainers can be bothered with this
+# since GNOME has moved on to GTK+3.
+#
+# If you want to try them, apply one or the other. Unless the theme you're using
+# supports both GTK+2 and GTK+3 it's not likely to help, though.
+
+# Patch one (thanks to DarkVision):
+#zcat ${CWD}/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme.patch.gz | patch -p1 --verbose || exit 1
+
+# Patch two (thanks to Jean-Philippe Guillemin):
+#zcat ${CWD}/xfce4-pulseaudio-plugin-0.2.4-gtk3_theme_clean.patch.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc/xfce \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-debug \
+ --enable-libnotify \
+ --enable-keybinder \
+ --with-mixer-command=pavucontrol \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* THANKS \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/xfce/xfce4-screenshooter/xfce4-screenshooter.SlackBuild b/source/xfce/xfce4-screenshooter/xfce4-screenshooter.SlackBuild
index 91bcba5fd..244a7bb6e 100755
--- a/source/xfce/xfce4-screenshooter/xfce4-screenshooter.SlackBuild
+++ b/source/xfce/xfce4-screenshooter/xfce4-screenshooter.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for xfce4-screenshooter
-# Copyright 2006-2012 Robby Workman, Northport, Alabama, USA
+# Copyright 2006-2015 Robby Workman, Tuscaloosa, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -29,7 +29,7 @@ BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
@@ -43,8 +43,8 @@ TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
diff --git a/source/xfce/xfce4-session/xfce4-session.SlackBuild b/source/xfce/xfce4-session/xfce4-session.SlackBuild
index 27385bb0b..03308f697 100755
--- a/source/xfce/xfce4-session/xfce4-session.SlackBuild
+++ b/source/xfce/xfce4-session/xfce4-session.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=xfce4-session
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -79,7 +79,6 @@ CFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
- --disable-systemd \
--disable-static \
--disable-debug \
--build=$ARCH-slackware-linux || exit 1
diff --git a/source/xfce/xfce4-settings/0001-Make-sure-icon-NULL-if-no-icon-is-found.patch b/source/xfce/xfce4-settings/0001-Make-sure-icon-NULL-if-no-icon-is-found.patch
new file mode 100644
index 000000000..c8f9cd8ca
--- /dev/null
+++ b/source/xfce/xfce4-settings/0001-Make-sure-icon-NULL-if-no-icon-is-found.patch
@@ -0,0 +1,24 @@
+From b2c3df6015d2ab1b57e2532b05298803b28f2902 Mon Sep 17 00:00:00 2001
+From: Peter de Ridder <peter@xfce.org>
+Date: Wed, 4 Mar 2015 11:03:28 +0100
+Subject: [PATCH] Make sure icon == NULL if no icon is found
+
+---
+ dialogs/appearance-settings/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/dialogs/appearance-settings/main.c b/dialogs/appearance-settings/main.c
+index 3eeb348..6532182 100644
+--- a/dialogs/appearance-settings/main.c
++++ b/dialogs/appearance-settings/main.c
+@@ -720,6 +720,7 @@ appearance_settings_load_icon_themes (preview_data *pd)
+
+ for (p = 0; p < 4; p++)
+ {
++ icon = NULL;
+ if (gtk_icon_theme_has_icon (icon_theme, preview_icons[p]))
+ icon = gtk_icon_theme_load_icon (icon_theme, preview_icons[p], 16, 0, NULL);
+ else if (gtk_icon_theme_has_icon (icon_theme, "image-missing"))
+--
+2.3.1
+
diff --git a/source/xfce/xfce4-settings/xfce.xfsettingsd.display.crtc.diff b/source/xfce/xfce4-settings/xfce.xfsettingsd.display.crtc.diff
new file mode 100644
index 000000000..73fc826be
--- /dev/null
+++ b/source/xfce/xfce4-settings/xfce.xfsettingsd.display.crtc.diff
@@ -0,0 +1,51 @@
+diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
+index 095e323..af70256 100644
+--- a/xfsettingsd/displays.c
++++ b/xfsettingsd/displays.c
+@@ -415,6 +415,7 @@ xfce_displays_helper_screen_on_event (GdkXEvent *xevent,
+ XfceRROutput *output, *o;
+ XEvent *e = xevent;
+ gint event_num;
++ gint j;
+ guint n, m, nactive = 0;
+ gboolean found = FALSE, changed = FALSE;
+
+@@ -496,9 +497,37 @@ xfce_displays_helper_screen_on_event (GdkXEvent *xevent,
+ {
+ xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "New output connected: %s",
+ output->info->name);
++ /* need to enable crtc for output ? */
++ if (output->info->crtc == None)
++ {
++ xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "enabling crtc for %s", output->info->name);
++ crtc = xfce_displays_helper_find_usable_crtc (helper, output);
++ if (crtc)
++ {
++ crtc->mode = output->preferred_mode;
++ crtc->rotation = RR_Rotate_0;
++ crtc->x = crtc->y = 0;
++ /* set width and height */
++ for (j = 0; j < helper->resources->nmode; ++j)
++ {
++ if (helper->resources->modes[j].id == output->preferred_mode)
++ {
++ crtc->width = helper->resources->modes[j].width;
++ crtc->height = helper->resources->modes[j].height;
++ break;
++ }
++ }
++ xfce_displays_helper_set_outputs (crtc, output);
++ crtc->changed = TRUE;
++ }
++ }
++
+ changed = TRUE;
+ }
+ }
++ if (changed)
++ xfce_displays_helper_apply_all (helper);
++
+ /* Start the minimal dialog according to the user preferences */
+ if (changed && xfconf_channel_get_bool (helper->channel, NOTIFY_PROP, FALSE))
+ xfce_spawn_command_line_on_screen (NULL, "xfce4-display-settings -m", FALSE,
+
diff --git a/source/xfce/xfce4-settings/xfce4-settings.SlackBuild b/source/xfce/xfce4-settings/xfce4-settings.SlackBuild
index 6e400455a..cc85ed8ce 100755
--- a/source/xfce/xfce4-settings/xfce4-settings.SlackBuild
+++ b/source/xfce/xfce4-settings/xfce4-settings.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2012, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,13 @@
PKGNAM=xfce4-settings
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -74,6 +74,11 @@ find . \
zcat $CWD/xfce4-settings.theme.diff.gz | patch -p1 --verbose || exit 1
zcat $CWD/xfce4-settings.xft.defaults.diff.gz | patch -p1 --verbose || exit 1
+# Fix monitor wake from standby with 4.4.x kernel:
+zcat $CWD/xfce.xfsettingsd.display.crtc.diff.gz | patch -p1 --verbose || exit 1
+
+patch -p1 < $CWD/0001-Make-sure-icon-NULL-if-no-icon-is-found.patch
+
# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/xfce/xfce4-settings/xfce4-settings.theme.diff b/source/xfce/xfce4-settings/xfce4-settings.theme.diff
index ebdcf88f2..7b18303bd 100644
--- a/source/xfce/xfce4-settings/xfce4-settings.theme.diff
+++ b/source/xfce/xfce4-settings/xfce4-settings.theme.diff
@@ -1,12 +1,14 @@
-diff -Nur xfce4-settings-4.10.0.orig/xfsettingsd/xsettings.xml xfce4-settings-4.10.0/xfsettingsd/xsettings.xml
---- xfce4-settings-4.10.0.orig/xfsettingsd/xsettings.xml 2012-04-28 15:48:30.000000000 -0500
-+++ xfce4-settings-4.10.0/xfsettingsd/xsettings.xml 2012-05-02 10:16:35.422408879 -0500
-@@ -7,7 +7,7 @@
+diff -Nur xfce4-settings-4.11.4.orig/xfsettingsd/xsettings.xml xfce4-settings-4.11.4/xfsettingsd/xsettings.xml
+--- xfce4-settings-4.11.4.orig/xfsettingsd/xsettings.xml 2015-02-16 15:03:11.000000000 -0600
++++ xfce4-settings-4.11.4/xfsettingsd/xsettings.xml 2015-02-17 21:01:05.021259913 -0600
+@@ -6,8 +6,8 @@
+ <?xml version="1.0" encoding="UTF-8"?>
<channel name="xsettings" version="1.0">
<property name="Net" type="empty">
- <property name="ThemeName" type="empty"/>
+- <property name="ThemeName" type="empty"/>
- <property name="IconThemeName" type="empty"/>
-+ <property name="IconThemeName" type="string" value="gnome"/>
- <property name="DoubleClickTime" type="int" value="250"/>
++ <property name="ThemeName" type="string" value="Adwaita"/>
++ <property name="IconThemeName" type="string" value="Adwaita"/>
+ <property name="DoubleClickTime" type="int" value="400"/>
<property name="DoubleClickDistance" type="int" value="5"/>
<property name="DndDragThreshold" type="int" value="8"/>
diff --git a/source/xfce/xfce4-systemload-plugin/0001-g_free-on-a-GtkWidget-is-wrong-on-so-many-levels.-bu.patch b/source/xfce/xfce4-systemload-plugin/0001-g_free-on-a-GtkWidget-is-wrong-on-so-many-levels.-bu.patch
new file mode 100644
index 000000000..a40bedff0
--- /dev/null
+++ b/source/xfce/xfce4-systemload-plugin/0001-g_free-on-a-GtkWidget-is-wrong-on-so-many-levels.-bu.patch
@@ -0,0 +1,25 @@
+From ca2b7fdf3f684a55280174ecf20935c7f2e7c897 Mon Sep 17 00:00:00 2001
+From: Robby Workman <rw@rlworkman.net>
+Date: Tue, 17 Mar 2015 22:10:56 +0100
+Subject: [PATCH] g_free() on a GtkWidget is wrong on so many levels.. (bug
+ #11713)
+
+---
+ panel-plugin/systemload.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
+index 628947e..4df29e5 100644
+--- a/panel-plugin/systemload.c
++++ b/panel-plugin/systemload.c
+@@ -394,7 +394,6 @@ monitor_free(XfcePanelPlugin *plugin, t_global_monitor *global)
+ g_source_remove(global->timeout_id);
+
+ g_free(global->command.command_text);
+- g_free(global->menu_item);
+
+ for(count = 0; count < 3; count++)
+ {
+--
+2.3.3
+
diff --git a/source/xfce/xfce4-systemload-plugin/xfce4-systemload-plugin.SlackBuild b/source/xfce/xfce4-systemload-plugin/xfce4-systemload-plugin.SlackBuild
index 35501f90a..427a3487d 100755
--- a/source/xfce/xfce4-systemload-plugin/xfce4-systemload-plugin.SlackBuild
+++ b/source/xfce/xfce4-systemload-plugin/xfce4-systemload-plugin.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -42,8 +42,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -69,6 +69,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+patch -p1 < $CWD/0001-g_free-on-a-GtkWidget-is-wrong-on-so-many-levels.-bu.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/xfce/xfce4-taskmanager/xfce4-taskmanager.SlackBuild b/source/xfce/xfce4-taskmanager/xfce4-taskmanager.SlackBuild
index 7deedb8bc..9485ec772 100755
--- a/source/xfce/xfce4-taskmanager/xfce4-taskmanager.SlackBuild
+++ b/source/xfce/xfce4-taskmanager/xfce4-taskmanager.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for xfce4-taskmanager
-# Copyright 2006-2011 Robby Workman, Northport, Alabama, USA
+# Copyright 2006-2014 Robby Workman, Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,7 +28,7 @@ BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +40,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
diff --git a/source/xfce/xfce4-terminal/xfce4-terminal.SlackBuild b/source/xfce/xfce4-terminal/xfce4-terminal.SlackBuild
index 2be3045a7..182886e34 100755
--- a/source/xfce/xfce4-terminal/xfce4-terminal.SlackBuild
+++ b/source/xfce/xfce4-terminal/xfce4-terminal.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for xfce4-terminal
-# Copyright 2010,2011,2012 Robby Workman, Northport, Alabama, USA
+# Copyright 2010-2014 Robby Workman, Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,13 +24,13 @@
PKGNAM=xfce4-terminal
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:--j6}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +40,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
diff --git a/source/xfce/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild b/source/xfce/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild
index 6a1d0cf26..dca7152ae 100755
--- a/source/xfce/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild
+++ b/source/xfce/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild
@@ -24,12 +24,12 @@
PKGNAM=xfce4-weather-plugin
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
@@ -42,8 +42,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
diff --git a/source/xfce/xfconf/xfconf.SlackBuild b/source/xfce/xfconf/xfconf.SlackBuild
index af252f62f..8e6604040 100755
--- a/source/xfce/xfconf/xfconf.SlackBuild
+++ b/source/xfce/xfconf/xfconf.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=xfconf
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/xfce/xfdesktop/xfdesktop.SlackBuild b/source/xfce/xfdesktop/xfdesktop.SlackBuild
index 15c6e575d..aabc3537f 100755
--- a/source/xfce/xfdesktop/xfdesktop.SlackBuild
+++ b/source/xfce/xfdesktop/xfdesktop.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=xfdesktop
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/xfce/xfwm4/xfwm4.SlackBuild b/source/xfce/xfwm4/xfwm4.SlackBuild
index e9ad40dc2..3ad03bf4d 100755
--- a/source/xfce/xfwm4/xfwm4.SlackBuild
+++ b/source/xfce/xfwm4/xfwm4.SlackBuild
@@ -22,13 +22,13 @@
PKGNAM=xfwm4
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -38,8 +38,8 @@ fi
NUMJOBS=${NUMJOBS:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"