From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5B14F138330 for ; Tue, 4 Oct 2016 06:15:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA542E0C4C; Tue, 4 Oct 2016 06:14:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C0337E0C4C for ; Tue, 4 Oct 2016 06:14:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E8888340F9A for ; Tue, 4 Oct 2016 06:14:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7BA0624AD for ; Tue, 4 Oct 2016 06:14:41 +0000 (UTC) From: "Mikhail Pukhlikov" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mikhail Pukhlikov" Message-ID: <1475296423.cc0a2b66478e7fa894eb63abb35902036014012b.cynede@gentoo> Subject: [gentoo-commits] proj/dotnet:master commit in: eclass/ X-VCS-Repository: proj/dotnet X-VCS-Files: eclass/gac.eclass X-VCS-Directories: eclass/ X-VCS-Committer: cynede X-VCS-Committer-Name: Mikhail Pukhlikov X-VCS-Revision: cc0a2b66478e7fa894eb63abb35902036014012b X-VCS-Branch: master Date: Tue, 4 Oct 2016 06:14:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 61203f60-195e-4119-87f5-73fffb1803c1 X-Archives-Hash: 3ab2a756ec22b2dc8851c05910ec34a2 commit: cc0a2b66478e7fa894eb63abb35902036014012b Author: ArsenShnurkov gmail com> AuthorDate: Sat Oct 1 04:33:43 2016 +0000 Commit: Mikhail Pukhlikov gentoo org> CommitDate: Sat Oct 1 04:33:43 2016 +0000 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=cc0a2b66 multiple assembly names support added eclass/gac.eclass | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/eclass/gac.eclass b/eclass/gac.eclass index 0c47445..2be4356 100644 --- a/eclass/gac.eclass +++ b/eclass/gac.eclass @@ -60,23 +60,42 @@ egacdel() { fi } +# http://www.gossamer-threads.com/lists/gentoo/dev/263462 +# pkg config files should always come from upstream +# but what if they are not? +# you can fork, or you can use a configuration system that upstream actually supports. +# both are more difficult than creating .pc in ebuilds. Forks requires maintenance, and +# second one requires rewriting the IDE (disrespecting the decision of IDE's authors who decide to use .pc-files) +# So, "keep fighting the good fight, don't stop believing, and let the haters hate" (q) desultory from #gentoo-dev-help @ freenode + # @FUNCTION: einstall_pc_file # @DESCRIPTION: installs .pc file # The file format contains predefined metadata keywords and freeform variables (like ${prefix} and ${exec_prefix}) # $1 = ${PN} # $2 = ${PV} -# $3 = myassembly.dll # should not contain path, it is calculated magically, see DLL_FILENAME variable +# $3 = myassembly1 # should not contain path, shouldn't contain .dll extension +# $4 = myassembly2 +# $N = myassemblyN-2 # see DLL_REFERENCES einstall_pc_file() { if use pkg-config; then local PC_NAME="$1" local PC_VERSION="$2" - local DLL_NAME="$3" + + shift 2 + if [ "$#" == "0" ]; then + die "no assembly names given" + fi + local DLL_REFERENCES="" + while (( "$#" )); do + DLL_REFERENCES+=" -r:\${libdir}/mono/${PC_NAME}/${1}.dll" + shift + done + local PC_FILENAME="${PC_NAME}-${PC_VERSION}" local PC_DIRECTORY="/usr/$(get_libdir)/pkgconfig" #local PC_DIRECTORY_DELTA="${CATEGORY}/${PN}" local PC_DIRECTORY_VER="${PC_DIRECTORY}/${PC_DIRECTORY_DELTA}" - local DLL_FILENAME="\${libdir}/mono/${PC_NAME}/${DLL_NAME}" dodir "${PC_DIRECTORY}" dodir "${PC_DIRECTORY_VER}" @@ -97,7 +116,7 @@ einstall_pc_file() -e "s:@Name@:${CATEGORY}/${PN}:" \ -e "s:@DESCRIPTION@:${DESCRIPTION}:" \ -e "s:@LIBDIR@:$(get_libdir):" \ - -e "s*@LIBS@*-r:${DLL_FILENAME}*" \ + -e "s*@LIBS@*${DLL_REFERENCES}*" \ <<-EOF >"${D}/${PC_DIRECTORY_VER}/${PC_FILENAME}.pc" || die prefix=\${pcfiledir}/../.. exec_prefix=\${prefix}