--- /home/vidagabor/usr/roots/gentoo/usr/portage/x11-wm/fvwm/fvwm-2.6.5-r1.ebuild 2016-11-03 13:10:55.327996307 +0100 +++ /home/vidagabor/usr/roots/gentoo/usr/portage/x11-wm/fvwm/fvwm-2.6.5-r2.ebuild 2016-11-04 15:39:25.040824611 +0100 @@ -83,7 +83,18 @@ } src_configure() { - local myconf="--libexecdir=/usr/lib --with-imagepath=/usr/include/X11/bitmaps:/usr/include/X11/pixmaps:/usr/share/icons/fvwm --enable-package-subdirs --without-gnome" + local imagepath + imagepath+="--with-imagepath=" + imagepath+="${EPREFIX}/usr/include/X11/bitmaps" + imagepath+=":${EPREFIX}/usr/include/X11/pixmaps" + imagepath+=":${EPREFIX}/usr/share/icons/fvwm" + + declare -a myconf + myconf=("--docdir=${EPREFIX}/usr/doc/${P}" + "$imagepath" + "--enable-package-subdirs" + "--without-gnome" + ) # Non-upstream email where bugs should be sent; used in fvwm-bug. export FVWM_BUGADDR="desktop-wm@gentoo.org" @@ -94,11 +105,11 @@ # Signed chars are required. use ppc && append-flags -fsigned-char - myconf="${myconf} --disable-gtk" + myconf+=("--disable-gtk") - use readline && myconf="${myconf} --without-termcap-library" + use readline && myconf+=("--without-termcap-library") - econf ${myconf} \ + econf "${myconf[@]}" \ $(use_enable bidi) \ $(use_enable debug debug-msgs) \ $(use_enable debug command-log) \ @@ -112,40 +123,39 @@ $(use_with stroke stroke-library) \ $(use_enable svg rsvg) \ $(use_enable truetype xft) \ - $(use_enable xinerama) \ - --docdir="/usr/share/doc/${P}" + $(use_enable xinerama) } src_install() { - emake DESTDIR="${D}" docdir="/usr/share/doc/${P}" install + emake DESTDIR="${D}" install # These are always removed, because gentoo doesn't have anymore # a dev-perl/gtk-perl package, so, these modules are pointless. - rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Gtk.pm" - find "${D}" -name '*FvwmGtkDebug*' -exec rm -f '{}' \; 2>/dev/null + rm -f "${ED}/usr/share/fvwm/perllib/FVWM/Module/Gtk.pm" + find "${ED}" -name '*FvwmGtkDebug*' -exec rm -f '{}' \; 2>/dev/null if ! use lock; then - find "${D}" -name '*fvwm-menu-xlock' -exec rm -f '{}' \; 2>/dev/null + find "${ED}" -name '*fvwm-menu-xlock' -exec rm -f '{}' \; 2>/dev/null fi if use perl; then if ! use tk; then - rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Tk.pm" + rm -f "${ED}/usr/share/fvwm/perllib/FVWM/Module/Tk.pm" if ! use gtk2-perl; then # no tk and no gtk2 bindings - rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Toolkit.pm" - find "${D}/usr/share/fvwm/perllib" -depth -type d -exec rmdir '{}' \; 2>/dev/null + rm -f "${ED}/usr/share/fvwm/perllib/FVWM/Module/Toolkit.pm" + find "${ED}/usr/share/fvwm/perllib" -depth -type d -exec rmdir '{}' \; 2>/dev/null fi fi # Now, the Gtk2.pm file, it will require dev-perl/gtk2-perl # so it implies gtk2 as well. That's why we need another use flag. if ! use gtk2-perl; then - rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Gtk2.pm" + rm -f "${ED}/usr/share/fvwm/perllib/FVWM/Module/Gtk2.pm" fi else # Completely wipe it if ! use perl - rm -rf "${D}/usr/bin/fvwm-perllib" \ - "${D}/usr/share/man/man1/fvwm-perllib.1" + rm -rf "${ED}/usr/bin/fvwm-perllib" \ + "${ED}/usr/share/man/man1/fvwm-perllib.1" fi # Utility for testing FVWM behaviour by creating a simple window with @@ -155,9 +165,9 @@ newdoc "${S}/tests/hints/README" README.hints fi - # dodir /etc/X11/Sessions - # echo "/usr/bin/fvwm" > "${D}/etc/X11/Sessions/${PN}" || die - # fperms a+x /etc/X11/Sessions/${PN} || die + dodir "/etc/X11/Sessions" + echo "${EPREFIX}/usr/bin/fvwm" > "${ED}/etc/X11/Sessions/${PN}" || die + fperms a+x "/etc/X11/Sessions/${PN}" || die dodoc AUTHORS ChangeLog NEWS README \ docs/{ANNOUNCE,BUGS,COMMANDS,CONVENTIONS} \