# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 KEYWORDS="~amd64 ~x86" RESTRICT="mirror" SLOT="0" USE_DOTNET="net45" inherit msbuild gac IUSE="+${USE_DOTNET}" NAME="Core" HOMEPAGE="https://www.castleproject.org" EGIT_COMMIT="9a033d8a69535e9078a3344e1ceddf18b60f9324" SRC_URI="https://github.com/castleproject/${NAME}/archive/${EGIT_COMMIT}.tar.gz -> ${PF}.tar.gz https://github.com/mono/mono/raw/main/mcs/class/mono.snk" S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" DESCRIPTION="simple set of tools to speed up the development" LICENSE="Apache-2.0" # https://github.com/castleproject/Core/blob/master/LICENSE CDEPEND="|| ( >=dev-lang/mono-5.4.0.167 "${S}/Core/Castle.Core/AssemblyInfo.cs" || die [assembly: System.Reflection.AssemblyVersion("2.1.0.0")] METADATA cat <<-METADATA >"${S}/Tools/Castle.DynamicProxy2/Castle.DynamicProxy/AssemblyInfo.cs" || die [assembly: System.Reflection.AssemblyVersion("2.1.0.0")] METADATA # other initialization eapply_user } src_compile() { emsbuild /p:SignAssembly=true /p:PublicSign=true "/p:AssemblyOriginatorKeyFile=${KEY2}" "${S}/${PROJECT_PATH2}/${PROJECT_NAME2}.csproj" sn -R "$(output_filename1)" "${KEY2}" || die sn -R "$(output_filename2)" "${KEY2}" || die } src_install() { insinto "/gac" doins "$(output_filename1)" doins "$(output_filename2)" } pkg_preinst() { echo mv "${D}/gac/${PROJECT_OUT1}.dll" "${T}/${PROJECT_OUT1}.dll" echo mv "${D}/gac/${PROJECT_OUT2}.dll" "${T}/${PROJECT_OUT2}.dll" mv "${D}/gac/${PROJECT_OUT1}.dll" "${T}/${PROJECT_OUT1}.dll" || die mv "${D}/gac/${PROJECT_OUT2}.dll" "${T}/${PROJECT_OUT2}.dll" || die echo rm -rf "${D}/gac" rm -rf "${D}/gac" || die } pkg_postinst() { egacadd "${T}/${PROJECT_OUT1}.dll" egacadd "${T}/${PROJECT_OUT2}.dll" rm "${T}/${PROJECT_OUT1}.dll" || die rm "${T}/${PROJECT_OUT2}.dll" || die } pkg_prerm() { egacdel "${PROJECT_OUT1}, Version=${ASSEMBLY_VERSION}, Culture=neutral, PublicKeyToken=0738eb9f132ed756" egacdel "${PROJECT_OUT2}, Version=${ASSEMBLY_VERSION}, Culture=neutral, PublicKeyToken=0738eb9f132ed756" }