--- /usr/portage/www-client/links/links-2.1_pre15.ebuild 2005-03-14 18:20:56.000000000 +0100 +++ links-2.1_pre15.ebuild 2005-03-25 01:08:37.201491632 +0100 @@ -26,10 +26,13 @@ png? ( >=media-libs/libpng-1.2.1 ) jpeg? ( >=media-libs/jpeg-6b ) tiff? ( >=media-libs/tiff-3.5.7 ) - svga? ( >=media-libs/svgalib-1.4.3 >=media-libs/libpng-1.2.1 ) - X? ( virtual/x11 >=media-libs/libpng-1.2.1 ) + svga? ( >=media-libs/svgalib-1.4.3 + >=media-libs/libpng-1.2.1 ) + X? ( virtual/x11 + >=media-libs/libpng-1.2.1 ) directfb? ( dev-libs/DirectFB ) - fbcon? ( >=media-libs/libpng-1.2.1 sys-libs/gpm ) + fbcon? ( >=media-libs/libpng-1.2.1 + sys-libs/gpm ) sys-libs/zlib virtual/libc sys-libs/ncurses" @@ -64,55 +67,31 @@ } src_compile (){ - local myconf - myconf="--program-suffix=2" - use X \ - && myconf="${myconf} --enable-graphics --with-x" \ - || myconf="${myconf} --without-x" - - use png \ - && myconf="${myconf} --with-libpng" \ - || myconf="${myconf} --without-libpng" - - use jpeg \ - && myconf="${myconf} --with-libjpeg" \ - || myconf="${myconf} --without-libjpeg" - - use tiff \ - && myconf="${myconf} --with-libtiff" \ - || myconf="${myconf} --without-libtiff" - - use svga \ - && myconf="${myconf} --enable-graphics --with-svgalib" \ - || myconf="${myconf} --without-svgalib" - - use fbcon \ - && myconf="${myconf} --enable-graphics --with-fb" \ - || myconf="${myconf} --without-fb" - - use directfb \ - && myconf="${myconf} --enable-graphics --with-directfb" \ - || myconf="${myconf} --without-directfb" - - use ssl \ - && myconf="${myconf} --with-ssl" \ - || myconf="${myconf} --without-ssl" - - use javascript \ - && myconf="${myconf} --enable-javascript" \ - || myconf="${myconf} --disable-javascript" + if use X || use fbcon || use directfb || use svga; then + myconf="${myconf} --enable-graphics" + fi # Note: --enable-static breaks. - # Note: ./configure only support 'gpm' features auto-detection, so if - # 'sys-libs/gpm' is compiled on your system, you'll compile links - # with gpm support ... + # Note: ./configure only support 'gpm' features auto-detection, so + # we use the autoconf trick + ( use gpm || use fbcon ) || export ac_cv_lib_gpm_Gpm_Open="no" export LANG=C - econf ${myconf} || die "configure failed" + econf --program-suffix=2 \ + $(use_with X x) \ + $(use_with png libpng) \ + $(use_with jpeg libjpeg) \ + $(use_with tiff libtiff) \ + $(use_with svga svgalib) \ + $(use_with fbcon fb) \ + $(use_with directfb) \ + $(use_with ssl) \ + $(use_enable javascript) \ + ${myconf} || die "configure failed" emake || die "make failed" }