Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 464490 - media-libs/flac - Please add multilib ABI support.
Summary: media-libs/flac - Please add multilib ABI support.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords: EBUILD, PATCH, PMASKED
Depends on: 464486
Blocks: gx86-multilib 464704 466608
  Show dependency tree
 
Reported: 2013-04-03 22:15 UTC by Karl Lindén
Modified: 2013-05-07 11:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A proposed ebuild supporting multilib ABIs. (flac-1.2.1-r5.ebuild,1.85 KB, text/plain)
2013-04-03 22:15 UTC, Karl Lindén
Details
The patch to disable installation of html documentation. (flac-1.2.1-no-html-doc.patch,793 bytes, patch)
2013-04-03 22:16 UTC, Karl Lindén
Details | Diff
Ebuild using autotools-multilib (flac-1.2.1-r5.ebuild,1.80 KB, text/plain)
2013-05-01 15:21 UTC, Michał Górny
Details
Ebuild w/doc-install fixed (flac-1.2.1-r5.ebuild,1.98 KB, text/plain)
2013-05-05 08:37 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Lindén 2013-04-03 22:15:34 UTC
Created attachment 344304 [details]
A proposed ebuild supporting multilib ABIs.

media-libs/flac does not currently support multilib ABIs. I'm attaching an ebuild and a needed patch to brute force disable installation of documentation. libFLAC and libFLAC++ are provided by app-emulation/emul-linux-x86-soundlibs too so a conditional block on that package is added.

The patch is not very nice but the ebuild handles installation of all the documentation. This is because, firstly, the api reference cannot be installed from an out of source build because Doxygen is used to generate it and, secondly, because the build system does not honour docdir so it would end up in the wrong directory anyways.

I'm attaching both a proposed ebuild and the patch. The ebuild depends on a multilib'd version of libogg so I'm adding a dependency on that bug.

I have tested it, but not the testing functionality. It won't probably work, but the ebuild should atleast run the tests in the correct directory. Please see #245391 for reference.
Comment 1 Karl Lindén 2013-04-03 22:16:24 UTC
Created attachment 344306 [details, diff]
The patch to disable installation of html documentation.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-01 15:21:07 UTC
Thanks for your patch, Karl. Great work filing the bugs and adding the dependency chain. However, a few notes:

1. 'x86?' needs to be applied to 32-bit amd64 build too. with the multilib eclass, the easy way of doing that is using 'abi_x86_32?' instead which is true for x86 & multilib amd64.

2. AUTOTOOLS_AUTORECONF needs to come before inherits, or otherwise autoconf/automake dependencies won't be added.

3. you could have taken the test conditional out of the loop :).


I'm attaching an ebuild based on yours. Aside of the fixes I mentioned above, I also:

1. added WANT_AUTOMAKE as necessary to build it,

2. used simpler 'sed' rather than the complete patch to disable doc rebuild (which fails with multilib for some reason),

3. added USE=doc to control HTML doc install.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-01 15:21:28 UTC
Created attachment 347048 [details]
Ebuild using autotools-multilib
Comment 4 Karl Lindén 2013-05-01 19:18:43 UTC
(In reply to comment #2)
> Thanks for your patch, Karl. Great work filing the bugs and adding the
> dependency chain. However, a few notes:
> 
> 1. 'x86?' needs to be applied to 32-bit amd64 build too. with the multilib
> eclass, the easy way of doing that is using 'abi_x86_32?' instead which is
> true for x86 & multilib amd64.
> 
> 2. AUTOTOOLS_AUTORECONF needs to come before inherits, or otherwise
> autoconf/automake dependencies won't be added.
> 
> 3. you could have taken the test conditional out of the loop :).
> 
> 
> I'm attaching an ebuild based on yours. Aside of the fixes I mentioned
> above, I also:
> 
> 1. added WANT_AUTOMAKE as necessary to build it,
> 
> 2. used simpler 'sed' rather than the complete patch to disable doc rebuild
> (which fails with multilib for some reason),
> 
> 3. added USE=doc to control HTML doc install.

Great! Thank you for the feedback! Nice work! :)
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-01 21:40:54 UTC
Committed as 1.2.1-r5, pmasked.
Comment 6 Alexis Ballier gentoo-dev 2013-05-01 21:48:39 UTC
(In reply to comment #3)
> Created attachment 347048 [details]
> Ebuild using autotools-multilib

this commit doesn't seem to be included:
  25 Apr 2013; Tim Harder <radhermit@gentoo.org> flac-1.2.1-r4.ebuild:
  Fix autoreconf failures with automake-1.13 (bug #466990).

Please rebase upon it so that you don't need to pin it to automate 1.12



	# html docgen seems to cause trouble
	sed -i -e '/SUBDIRS/s:html::' doc/Makefile.am || die


The ebuild passes --disable-doxygen-docs to econf, I'd rather see the build system honour this. Also, the comment is a bit useless :)

missing 'AUTOTOOLS_PRUNE_LIBTOOL_FILES=all'


rest is ok for me (or not related to this bug :) )
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-01 22:11:34 UTC
(In reply to comment #6)
> (In reply to comment #3)
> > Created attachment 347048 [details]
> > Ebuild using autotools-multilib
> 
> this commit doesn't seem to be included:
>   25 Apr 2013; Tim Harder <radhermit@gentoo.org> flac-1.2.1-r4.ebuild:
>   Fix autoreconf failures with automake-1.13 (bug #466990).
> 
> Please rebase upon it so that you don't need to pin it to automate 1.12

Ah, sorry, must've gotten too confused.

> 
> 
> 
> 	# html docgen seems to cause trouble
> 	sed -i -e '/SUBDIRS/s:html::' doc/Makefile.am || die
> 
> 
> The ebuild passes --disable-doxygen-docs to econf, I'd rather see the build
> system honour this. Also, the comment is a bit useless :)

I've improved the comment a bit. It's failing 'cd api', probably out-of-source build issue. I'll try to take a closer look at it tomorrow.

> missing 'AUTOTOOLS_PRUNE_LIBTOOL_FILES=all'

Added.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-05 08:37:41 UTC
Created attachment 347412 [details]
Ebuild w/doc-install fixed

Ok, found the out-of-source build issue and did a sed on it. Ok to commit this one?
Comment 9 Alexis Ballier gentoo-dev 2013-05-07 10:58:30 UTC
(In reply to comment #8)
> Created attachment 347412 [details]
> Ebuild w/doc-install fixed
> 
> Ok, found the out-of-source build issue and did a sed on it. Ok to commit
> this one?

sounds good to me, but you seem to be dropping your doc useflag improvements that I liked; why ?

also is /usr/share/doc/${P} empty now ? (you are dropping the rm -f for this)
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-07 11:23:16 UTC
Maybe I'll start with a diff.

Index: flac-1.2.1-r5.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/media-libs/flac/flac-1.2.1-r5.ebuild,v
retrieving revision 1.2
diff -u -B -r1.2 flac-1.2.1-r5.ebuild
--- flac-1.2.1-r5.ebuild	1 May 2013 22:11:27 -0000	1.2
+++ flac-1.2.1-r5.ebuild	7 May 2013 11:20:55 -0000
@@ -16,7 +16,7 @@
 LICENSE="BSD FDL-1.2 GPL-2 LGPL-2.1"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="3dnow altivec +cxx debug doc ogg sse static-libs"
+IUSE="3dnow altivec +cxx debug ogg sse static-libs"
 
 RDEPEND="ogg? ( >=media-libs/libogg-1.1.3[${MULTILIB_USEDEP}] )
 	abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224 )"
@@ -41,9 +41,8 @@
 	# bug 466990
 	sed -i "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" configure.in || die
 
-	# html install fails with out-of-source build
-	# XXX: take a closer look at it
-	sed -i -e '/SUBDIRS/s:html::' doc/Makefile.am || die
+	# fix html install with out-of-source build
+	sed -i -e 's:cd api:cd $(srcdir)/api:' doc/html/Makefile.am || die
 
 	AT_M4DIR="m4" \
 	autotools-multilib_src_prepare
@@ -73,9 +72,6 @@
 }
 
 src_install() {
-	use doc && local HTML_DOCS=( doc/html/. )
-
-	autotools-multilib_src_install
-
-	rm -rf "${D}"/usr/share/doc/${P}
+	autotools-multilib_src_install \
+		docdir=/usr/share/doc/${PF}/html
 }

(In reply to comment #9)
> (In reply to comment #8)
> > Created attachment 347412 [details]
> > Ebuild w/doc-install fixed
> > 
> > Ok, found the out-of-source build issue and did a sed on it. Ok to commit
> > this one?
> 
> sounds good to me, but you seem to be dropping your doc useflag improvements
> that I liked; why ?

Because now the build system installs docs correctly, and it does so unconditionally. I could add it with post-install removal though, if you like that. The 'use doc' variant installed the docs in place of build system.

> also is /usr/share/doc/${P} empty now ? (you are dropping the rm -f for this)

Yes. The 'docdir' makes it install docs correctly.
Comment 11 Alexis Ballier gentoo-dev 2013-05-07 11:50:11 UTC
then ok, thanks :)

the doc situation is the same as before multilib it seems, so let's keep it as such
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-07 11:58:19 UTC
Fix committed.