media-libs/flac: Call einstalldocs and minor fixups
authorDavid Seifert <soap@gentoo.org>
Sun, 8 Jan 2017 21:27:19 +0000 (23:27 +0200)
committerDavid Seifert <soap@gentoo.org>
Sun, 8 Jan 2017 21:27:42 +0000 (23:27 +0200)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

media-libs/flac/files/flac-1.3.2-honor-htmldir.patch [new file with mode: 0644]
media-libs/flac/flac-1.3.2.ebuild

diff --git a/media-libs/flac/files/flac-1.3.2-honor-htmldir.patch b/media-libs/flac/files/flac-1.3.2-honor-htmldir.patch
new file mode 100644 (file)
index 0000000..2f93a67
--- /dev/null
@@ -0,0 +1,55 @@
+HTML files should be installed to $(htmldir), and $(docdir) should
+not be changed, as this is a user flag in the GNU conventions.
+
+--- a/doc/html/images/Makefile.am
++++ b/doc/html/images/Makefile.am
+@@ -16,9 +16,9 @@
+ #  restrictive of those mentioned above.  See the file COPYING.Xiph in this
+ #  distribution.
+ 
+-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html/images
++logosdir = $(htmldir)/images
+ 
+-doc_DATA = \
++logos_DATA = \
+       logo.svg \
+       logo130.gif
+ 
+--- a/doc/html/Makefile.am
++++ b/doc/html/Makefile.am
+@@ -18,9 +18,7 @@
+ 
+ SUBDIRS = images
+ 
+-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html
+-
+-doc_DATA = \
++html_DATA = \
+       changelog.html \
+       developers.html \
+       documentation.html \
+@@ -46,10 +44,10 @@
+ # The install targets don't copy whole directories so we have to
+ # handle 'api/' specially:
+ install-data-local:
+-      $(mkinstalldirs) $(DESTDIR)$(docdir)/api
+-      (cd $(builddir)/api && $(INSTALL_DATA) * $(DESTDIR)$(docdir)/api)
++      $(mkinstalldirs) $(DESTDIR)$(htmldir)/api
++      (cd $(builddir)/api && $(INSTALL_DATA) * $(DESTDIR)$(htmldir)/api)
+ uninstall-local:
+-      rm -rf $(DESTDIR)$(docdir)/api
++      rm -rf $(DESTDIR)$(htmldir)/api
+ distclean-local:
+       -rm -rf api
+ endif
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -31,8 +31,6 @@
+       mkdir -p html/api
+ endif
+ 
+-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
+-
+ doc_DATA = \
+       FLAC.tag
+ 
index 5b5d6bfd6922dc230673bc7c34033935335a951d..5786d31794e56dad4c5d9b017520f1aa994b3450 100644 (file)
@@ -28,16 +28,15 @@ src_prepare() {
                "${FILESDIR}"/${PN}-1.3.2-asneeded.patch
                "${FILESDIR}"/${PN}-1.3.0-dontbuild-tests.patch
                "${FILESDIR}"/${PN}-1.3.2-dontbuild-examples.patch
+               "${FILESDIR}"/${PN}-1.3.2-honor-htmldir.patch
        )
 
        default
-
        eautoreconf
 }
 
 multilib_src_configure() {
        local myeconfargs=(
-               --docdir="${EPREFIX}"/usr/share/doc/${PF}/html
                --disable-doxygen-docs
                --disable-examples
                --disable-xmms-plugin
@@ -47,6 +46,7 @@ multilib_src_configure() {
                $(use_enable cxx cpplibs)
                $(use_enable debug)
                $(use_enable ogg)
+               $(use_enable static-libs static)
 
                # cross-compile fix (bug #521446)
                # no effect if ogg support is disabled
@@ -64,7 +64,6 @@ multilib_src_test() {
 }
 
 multilib_src_install_all() {
-       if ! use static-libs ; then
-               find "${ED}" \( -name "*.la" -o -name "*.a" \) -delete || die
-       fi
+       einstalldocs
+       find "${D}" -name '*.la' -delete || die
 }