Re: [gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092

2013-05-02 Thread hasufell
-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-



Re: [gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092

2013-05-02 Thread hasufell
-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 
> 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-



Re: [gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092

2013-05-02 Thread Michał Górny
On Thu, 02 May 2013 18:24:19 +0200
hasufell  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


signature.asc
Description: PGP signature


[gentoo-dev] [PATCH] multilib-minimal.eclass: allow relative paths to $S for DOCS variable wrt #468092

2013-05-02 Thread hasufell
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 )
--- 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
 }