--- /usr/portage/x11-misc/linuxwacom/linuxwacom-0.7.2.ebuild 2006-07-02 21:06:39.000000000 +0200 +++ /usr/portage/x11-misc/linuxwacom/linuxwacom-0.7.2.ebuild 2006-08-13 15:41:27.313892500 +0200 @@ -1,33 +1,40 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/linuxwacom/linuxwacom-0.7.2.ebuild,v 1.11 2006/07/02 18:50:37 spyderous Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/linuxwacom/linuxwacom-0.7.2.ebuild,v 1.3 2006/02/15 22:31:22 corsair Exp $ -IUSE="dlloader gtk gtk2 tcltk sdk usb" - -inherit multilib eutils linux-info +inherit multilib eutils +MY_PV="${PV/_p/-}" DESCRIPTION="Input driver for Wacom tablets and drawing devices" HOMEPAGE="http://linuxwacom.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" +SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.bz2" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ppc ppc64 x86" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="dlloader gtk tcl tk sdk usb" -RDEPEND="|| ( ( x11-proto/inputproto - x11-base/xorg-server ) - virtual/x11 ) +RDEPEND="|| ( ( + x11-proto/inputproto + x11-base/xorg-server ) + virtual/x11 ) gtk? ( - gtk2? ( >=x11-libs/gtk+-2 ) - !gtk2? ( =x11-libs/gtk+-1.2* ) + || ( >=x11-libs/gtk+-2 + =x11-libs/gtk+-1.2* ) + ) + tcl? ( + dev-lang/tcl + tk? ( dev-lang/tk ) ) - tcltk? ( dev-lang/tcl dev-lang/tk ) sys-libs/ncurses" DEPEND="${RDEPEND} dev-util/pkgconfig + usb? ( >=sys-kernel/linux-headers-2.6 ) >=sys-apps/sed-4" +S="${WORKDIR}/${PN}-${MY_PV}" + pkg_setup() { if use sdk || has_version ">=x11-base/xorg-server-0.1" ; then if ! built_with_use x11-base/xorg-x11 sdk && ! has_version ">=x11-base/xorg-server-0.1" @@ -42,71 +49,43 @@ ewarn "the updated external driver for your X server, please remerge your X11 package with" ewarn "the USE=sdk flag enabled." fi - - if use usb; then - if ! has_version ">=sys-kernel/linux-headers-2.6"; then - if kernel_is 2 6; then - local msg - msg="USB Wacom tablets require 2.6 linux-headers. Please upgrade." - eerror "$msg" - die "$msg" - fi - fi - fi } src_unpack() { unpack ${A} - cd ${S} - - # Fix multilib-strict error for Tcl/Tk library install - sed -i -e "s:WCM_EXECDIR/lib:WCM_EXECDIR/$(get_libdir):" configure.in - - if use sdk && ! has_version ">=x11-base/xorg-server-0.1" ; then - cd ${S} - - # Simple fixes to configure to check the actual location of the XFree86 SDK - # No need to check if just building userland tools - sed -i -e "s:XF86SUBDIR=.*:XF86SUBDIR=include: - s:XF86V3SUBDIR=.*:XF86V3SUBDIR=include:" configure - fi - if has_version ">=x11-base/xorg-server-0.1"; then + if has_version ">=x11-base/xorg-server-1.1"; then cd ${S} - epatch ${FILESDIR}/${P}-modular-x.patch - # moved to end of src_unpack to fix multilib issue -Jon - # autoreconf -v --install - # libtoolize --force --copy + epatch ${FILESDIR}/xorg-7.1.patch fi - autoreconf -v --install - libtoolize --force --copy } src_compile() { + + myconf="${myconf} \ + $(use_enable usb wacom) \ + $(use_with tcl) \ + $(use_with tk) \ + $(use_enable amd64 xserver64)" + if use gtk; then - if use gtk2; then + if has_version x11-libs/gtk+-2* ; then myconf="${myconf} --with-gtk=2.0" - else + fi + + if has_version x11-libs/gtk+-1.2* ; then myconf="${myconf} --with-gtk=1.2" fi else myconf="${myconf} --with-gtk=no" fi - if use tcltk ; then - myconf="${myconf} --with-tcl --with-tk" - else - myconf="${myconf} --without-tcl --without-tk" - fi - - if use amd64 ; then - myconf="${myconf} --enable-xserver64" - fi - if use sdk || has_version ">=x11-base/xorg-server-0.1" ; then myconf="${myconf} --enable-wacomdrv --enable-wacdump --enable-xsetwacom" - has_version ">=x11-base/xorg-server-0.1" || \ - myconf="${myconf} --with-xf86=/usr/$(get_libdir)/Server --with-xorg-sdk=/usr/$(get_libdir)/Server --with-xlib=/usr/$(get_libdir)" + + if has_version ">=x11-base/xorg-server-0.1"; then + myconf="${myconf} --with-xorg-sdk=/usr --with-xlib=/usr/$(get_libdir)" + fi if use dlloader || has_version ">=x11-base/xorg-x11-6.8.99.15" || has_version ">=x11-base/xorg-server-0.1" ; then myconf="${myconf} --enable-dlloader" @@ -121,6 +100,7 @@ myconf="${myconf} --disable-wacomdrv --enable-wacdump --enable-xsetwacom --without-xf86-sdk" econf ${myconf} || die "configure failed." fi + cd ${S} unset ARCH emake || die "build failed."