public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092
@ 2013-05-02 16:24 hasufell
  2013-05-02 16:31 ` Michał Górny
  0 siblings, 1 reply; 4+ messages in thread
From: hasufell @ 2013-05-02 16:24 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

currently default_src_install is carried out in $BUILD_DIR and not in $S

that means people have to do something like this:
DOCS=( "${S}"/ChangeLog{,.libffi,.libgcj,.v1} "${S}"/README )

The attached patch is a bit ugly, but I don't see a better way. It will
allow:
DOCS=( ChangeLog{,.libffi,.libgcj,.v1} README )

[-- Attachment #2: multilib-minimal.eclass.patch --]
[-- Type: text/x-patch, Size: 813 bytes --]

--- eclass/multilib-minimal.eclass
+++ eclass/multilib-minimal.eclass
@@ -84,7 +84,7 @@
 		if declare -f multilib_src_install >/dev/null ; then
 			multilib_src_install
 		else
-			default_src_install	
+			DOCS="" default_src_install
 		fi
 		multilib_prepare_wrappers
 		multilib_check_headers
@@ -96,4 +96,18 @@
 	if declare -f multilib_src_install_all >/dev/null ; then
 		multilib_src_install_all
 	fi
+
+	# install docs from ${S} as basedir, see #468092
+	# this is synced with __eapi4_src_install
+	if ! declare -p DOCS &>/dev/null ; then
+		local d
+		for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
+				THANKS BUGS FAQ CREDITS CHANGELOG ; do
+			[[ -s "${d}" ]] && dodoc "${d}"
+		done
+	elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then
+		dodoc "${DOCS[@]}"
+	else
+		dodoc ${DOCS}
+	fi
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092
  2013-05-02 16:24 [gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092 hasufell
@ 2013-05-02 16:31 ` Michał Górny
  2013-05-02 16:51   ` hasufell
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2013-05-02 16:31 UTC (permalink / raw
  To: gentoo-dev; +Cc: hasufell

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

On Thu, 02 May 2013 18:24:19 +0200
hasufell <hasufell@gentoo.org> wrote:

> currently default_src_install is carried out in $BUILD_DIR and not in $S
> 
> that means people have to do something like this:
> DOCS=( "${S}"/ChangeLog{,.libffi,.libgcj,.v1} "${S}"/README )
> 
> The attached patch is a bit ugly, but I don't see a better way. It will
> allow:
> DOCS=( ChangeLog{,.libffi,.libgcj,.v1} README )

Erm, now you're hacking default_src_install in one place, and inlining
it in the other. Please keep it consistent and either inline it in both
places, or hack in both places.

Also, HTML_DOCS suffer the same issue.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092
  2013-05-02 16:31 ` Michał Górny
@ 2013-05-02 16:51   ` hasufell
  2013-05-02 16:56     ` hasufell
  0 siblings, 1 reply; 4+ messages in thread
From: hasufell @ 2013-05-02 16:51 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/02/2013 06:31 PM, Michał Górny wrote:
> On Thu, 02 May 2013 18:24:19 +0200 hasufell <hasufell@gentoo.org>
> wrote:
> 
>> currently default_src_install is carried out in $BUILD_DIR and
>> not in $S
>> 
>> that means people have to do something like this: DOCS=(
>> "${S}"/ChangeLog{,.libffi,.libgcj,.v1} "${S}"/README )
>> 
>> The attached patch is a bit ugly, but I don't see a better way.
>> It will allow: DOCS=( ChangeLog{,.libffi,.libgcj,.v1} README )
> 
> Erm, now you're hacking default_src_install in one place, and
> inlining it in the other. Please keep it consistent and either
> inline it in both places, or hack in both places.

why?

> 
> Also, HTML_DOCS suffer the same issue.
> 

not a PMS function afais


what I don't know for sure is: do all PMs accept empty string as
argument for "dodoc" without failing?
Otherwise I could just use a second variable and unset DOCS.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRgpmsAAoJEFpvPKfnPDWz5V4IAIe3lOIYMFU4j9i3qJ/roR/G
Z9qZFNDDHBzGhq8ycQ7rswrIE54FhTJ56Y/9l1ng4eutvRly4DCCBd9wT3FISPCq
3W3ltA/l78vd+iFsFHrUqnyUBCpi9gVEp59uvZrWzjRquVsnUuYv72wpVl2k4+2z
PV4iP6SbUBQJzMlQSsixAnMbJKtPstMFRAG83bLhy4IrvNBC9bRaFqO09De07IX+
VFcKoSJMy+NrVblrm9E9HjaxA48z0Od0EcLHvODAPscv9+auSsF9boWZyjCY2iZ0
lKhthUv7ymZExpYE7tBtq13ykw1g7irID8UxVZdg53FOihO8TjIB0kxkAFDjK7I=
=jBrb
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092
  2013-05-02 16:51   ` hasufell
@ 2013-05-02 16:56     ` hasufell
  0 siblings, 0 replies; 4+ messages in thread
From: hasufell @ 2013-05-02 16:56 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



> Otherwise I could just use a second variable and unset DOCS.
> 

Hm no, that would suck too, cause it will jump into the the first if
clause. I'll probably inline it all then.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRgprMAAoJEFpvPKfnPDWzquEIAJawL43muyuL2M8HWrNBNmIS
/ZbmcMes1ZeOw9D05saznZWNNVkUm4IxPv2xYMUsUjqiIm29gi41cMWn+Oxk1IiJ
E75/RnaYcHVxh9zV1m05N7a9Q74xkbYE7aAB/CDikL2QP76RKtC5cGjyYlV6Ewg4
1brgmMGcayVNvQM/7JyjU0lOEf8jGBnoAMZ4iBJUxV3Kn8sZrYPK28mUdMfQ568T
lK51XGYS9UIsJkPYgYQhxfI+b0E1fgaNgw+dm16kYUSYCjO5rTCe3Oypa/T/oWt0
+VPug+pfjOJVCHcjK3TwueS4FFGx7xxGTUsatMMqbsCQGDkjv1SF2xxKxMgcKP8=
=woGL
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-02 16:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 16:24 [gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092 hasufell
2013-05-02 16:31 ` Michał Górny
2013-05-02 16:51   ` hasufell
2013-05-02 16:56     ` hasufell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox