app-office/orage: Stop hacking docdir over
authorMichał Górny <mgorny@gentoo.org>
Sat, 1 Jul 2017 07:37:10 +0000 (09:37 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sun, 9 Jul 2017 21:41:18 +0000 (23:41 +0200)
app-office/orage/orage-4.12.1-r1.ebuild

index 85e10a53d9861c60fadc8f78b5cae8137304cd6f..85276d99385fee6d0858285abef559c1dcb0ee6b 100644 (file)
@@ -27,11 +27,6 @@ DEPEND="${RDEPEND}
        >=sys-devel/libtool-2.2.6
        virtual/pkgconfig"
 
-pkg_setup() {
-       # PM doesn't let directory to be replaced by a symlink, see src_install()
-       rm -rf "${EROOT}"/usr/share/${PN}/doc || die
-}
-
 src_configure() {
        local myconf=(
                --libexecdir="${EPREFIX}/usr/$(get_libdir)"
@@ -46,16 +41,17 @@ src_configure() {
 }
 
 src_install() {
-       emake DESTDIR="${D}" install \
-               docdir="${EPREFIX}"/usr/share/doc/${PF}/html \
-               imagesdir="${EPREFIX}"/usr/share/doc/${PF}/html/images
-
-       # Create compability symlink for retarded path hardcoding in src/{mainbox,parameters}.c
-       dosym /usr/share/doc/${PF}/html /usr/share/${PN}/doc/C
-
+       default
        find "${D}" -name '*.la' -delete || die
 }
 
+pkg_preinst() {
+       # Replacing directory by symlink is unreliable
+       if [[ -L ${EROOT}/usr/share/orage/doc/C ]]; then
+               rm -f "${EROOT}/usr/share/orage/doc/C" || die
+       fi
+}
+
 pkg_postinst() {
        gnome2_icon_cache_update
        xdg_desktop_database_update