--- /usr/portage/x11-libs/wxGTK/wxGTK-2.4.1-r1.ebuild 2003-09-10 06:39:56.000000000 +0200 +++ /usr/local/portage/x11-libs/wxGTK/wxGTK-2.4.1-r1.ebuild 2003-09-14 12:19:20.000000000 +0200 @@ -9,20 +9,21 @@ LICENSE="LGPL-2" SLOT="0" KEYWORDS="~x86 ~ppc ~sparc" -IUSE="nls odbc opengl gtk2" +IUSE="nls odbc opengl gtk2 png jpeg tiff" -DEPEND="virtual/x11 - media-libs/netpbm - media-libs/giflib - media-libs/libpng - media-libs/jpeg - media-libs/tiff +RDEPEND="virtual/x11 sys-libs/zlib + png? ( media-libs/libpng ) + jpeg? ( media-libs/jpeg ) + tiff? ( media-libs/tiff ) odbc? ( dev-db/unixODBC ) opengl? ( virtual/opengl ) - gtk2? ( >=x11-libs/gtk+-2.0* dev-libs/libunicode ) : ( =x11-libs/gtk+-1.2* )" + gtk2? ( >=x11-libs/gtk+-2.0* ) : ( =x11-libs/gtk+-1.2* )" -RDEPEND="nls? ( sys-devel/gettext )" + # Note: gettext is not runtime dependency even if nls? because wxWindows + # has its own implementation of it + +DEPEND="${RDEPEND}" src_unpack() { unpack ${A} @@ -33,8 +34,12 @@ src_compile() { local myconf - myconf="--enable-gif --with-libtiff --with-zlib --with-libpng \ - --enable-png --with-libjpeg" + myconf="" + + # Configurable image handlers that depend on external libraries: + use png || myconf="${myconf} --without-libpng" + use jpeg || myconf="${myconf} --without-libjpeg" + use tiff || myconf="${myconf} --without-libtiff" #Note: pcx image support enabled by default if found. #Also, all wxWindows gui features are enabled by default. If you @@ -48,17 +53,25 @@ # We only use --enable-unicode (if at all) when we use # gtk2. + # Note: this ebuild no longer builds wxGTK with --enable-unicode --> commented out, + # should be restored when this changes - if [ `use odbc` ] && [ ! `use gtk2` ]; then + #if [ `use odbc` ] && [ ! `use gtk2` ]; then + # myconf="${myconf} --with-odbc" + #elif [ `use odbc` ] && [ `use gtk2` ]; then + # ewarn "" + # einfo "you cannot specify both odbc and gtk2" + # einfo "Choosing gtk2 over odbc" + # einfo "re-run with USE=\"-gtk2\" to enable odbc" + # ewarn "" + # sleep 5 + # myconf="${myconf} --without-odbc" + #else + # myconf="${myconf} --without-odbc" + #fi + + if [ `use odbc` ]; then myconf="${myconf} --with-odbc" - elif [ `use odbc` ] && [ `use gtk2` ]; then - ewarn "" - einfo "you cannot specify both odbc and gtk2" - einfo "Choosing gtk2 over odbc" - einfo "re-run with USE=\"-gtk2\" to enable odbc" - ewarn "" - sleep 5 - myconf="${myconf} --without-odbc" else myconf="${myconf} --without-odbc" fi