diff -Naurp cups.old/ChangeLog cups/ChangeLog --- cups.old/cups-1.5.2-r21.ebuild 2012-05-11 17:49:11.000000000 +0900 +++ cups/cups-1.5.2-r21.ebuild 2012-05-16 17:01:09.361013634 +0900 @@ -99,6 +99,7 @@ PATCHES=( "${WORKDIR}/${PN}-1.5.2-avahi.patch" # avahi support from debian "${FILESDIR}/${PN}-1.5.2-browsing.patch" # browsing off by default "${WORKDIR}/${PN}-1.5.2-locales.patch" # patch locales back into existence + "${FILESDIR}/${PN}-1.5.2-libexec.patch" ) pkg_setup() { @@ -178,17 +179,22 @@ src_configure() { fi econf \ - --libdir=/usr/$(get_libdir) \ - --localstatedir=/var \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --exec-prefix="${EPREFIX}"/usr \ + --localstatedir="${EPREFIX}"/var \ --with-cups-user=lp \ --with-cups-group=lp \ - --with-docdir=/usr/share/cups/html \ + --with-docdir="${EPREFIX}"/usr/share/cups/html \ + --with-icondir="${EPREFIX}"/usr/share/icon \ --with-languages="${LINGUAS}" \ - --with-pdftops=/usr/bin/pdftops \ + --with-menudir="${EPREFIX}"/usr/share/menu \ + --with-pdftops="${EPREFIX}"/usr/bin/pdftops \ + --with-rcdir="${EPREFIX}"/etc \ --with-system-groups=lpadmin \ $(use_enable acl) \ $(use_enable avahi) \ $(use_enable dbus) \ + --with-dbusdir=$(use dbus && echo "${EPREFIX}"/etc/dbus || echo "") \ $(use_enable debug) \ $(use_enable debug debug-guards) \ $(use_enable jpeg) \ @@ -210,12 +216,6 @@ src_configure() { --disable-dnssd \ $(use_with systemd systemdsystemunitdir "$(systemd_get_unitdir)") \ ${myconf} - - # install in /usr/libexec always, instead of using /usr/lib/cups, as that - # makes more sense when facing multilib support. - sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs || die - sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h || die - sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config || die } src_compile() { diff -Naurp cups.old/files/cups-1.5.2-libexec.patch cups/files/cups-1.5.2-libexec.patch --- cups.old/files/cups-1.5.2-libexec.patch 1970-01-01 09:00:00.000000000 +0900 +++ cups/files/cups-1.5.2-libexec.patch 2012-05-16 17:01:09.361013634 +0900 @@ -0,0 +1,20 @@ +install in /usr/libexec always, instead of using /usr/lib/cups, as that makes more +sense when facing multilib support. +--- config-scripts/cups-directories.m4 2011-05-12 14:21:56.000000000 +0900 ++++ config-scripts/cups-directories.m4.new 2012-05-16 17:00:22.000000000 +0900 +@@ -403,14 +403,13 @@ case "$uname" in + *BSD* | Darwin*) + # *BSD and Darwin (MacOS X) + INSTALL_SYSV="" +- CUPS_SERVERBIN="$exec_prefix/libexec/cups" + ;; + *) + # All others + INSTALL_SYSV="install-sysv" +- CUPS_SERVERBIN="$exec_prefix/lib/cups" + ;; + esac ++CUPS_SERVERBIN="$exec_prefix/libexec/cups" + + AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN") + AC_SUBST(CUPS_SERVERBIN)