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 3B993138331 for ; Fri, 30 Sep 2016 08:45:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 797FD21C039; Fri, 30 Sep 2016 08:45:28 +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 4AA09E0AF0 for ; Fri, 30 Sep 2016 08:45:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 47ED13406F2 for ; Fri, 30 Sep 2016 08:45:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 702C8249F for ; Fri, 30 Sep 2016 08:45:25 +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: <1474961329.a5cc83c1a83841b8a54e9501a12df6a04f73252b.cynede@gentoo> Subject: [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/system-web/files/, dev-dotnet/system-web/ X-VCS-Repository: proj/dotnet X-VCS-Files: dev-dotnet/system-web/files/autofac.patch dev-dotnet/system-web/system-web-4.6.0.182-r1.ebuild X-VCS-Directories: dev-dotnet/system-web/ dev-dotnet/system-web/files/ X-VCS-Committer: cynede X-VCS-Committer-Name: Mikhail Pukhlikov X-VCS-Revision: a5cc83c1a83841b8a54e9501a12df6a04f73252b X-VCS-Branch: master Date: Fri, 30 Sep 2016 08:45:25 +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: ea30dbc2-9441-4f81-bc8e-eb43b7a8421f X-Archives-Hash: 3135eae28c9be8c3fedeac5315cbf4a9 commit: a5cc83c1a83841b8a54e9501a12df6a04f73252b Author: ArsenShnurkov gmail com> AuthorDate: Tue Sep 27 07:28:49 2016 +0000 Commit: Mikhail Pukhlikov gentoo org> CommitDate: Tue Sep 27 07:28:49 2016 +0000 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=a5cc83c1 patch for AutoFac dev-dotnet/system-web/files/autofac.patch | 24 +++++ .../system-web/system-web-4.6.0.182-r1.ebuild | 108 +++++++++++++++++++++ 2 files changed, 132 insertions(+) diff --git a/dev-dotnet/system-web/files/autofac.patch b/dev-dotnet/system-web/files/autofac.patch new file mode 100644 index 0000000..1983c1d --- /dev/null +++ b/dev-dotnet/system-web/files/autofac.patch @@ -0,0 +1,24 @@ +--- a/mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs ++++ b/mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs +@@ -156,9 +156,18 @@ + + HttpContext context = HttpContext.Current; + HttpRequest req = context == null ? null : context.Request; +- if (req == null) +- return null; +- ++ if (req == null) // ADDED for Orchard ++ { ++ var pp = HostingEnvironment.ApplicationPhysicalPath; ++ String vp=virtualPath; ++ if (vp.IndexOf("~/") == 0) ++ { ++ vp = pp + virtualPath.Substring(2); ++ } ++ // TODO: if not "~/" ???? then what? ++ return vp; ++ } // END added for Orchard ++ else + return req.MapPath (virtualPath); + } + diff --git a/dev-dotnet/system-web/system-web-4.6.0.182-r1.ebuild b/dev-dotnet/system-web/system-web-4.6.0.182-r1.ebuild new file mode 100644 index 0000000..4bf29d9 --- /dev/null +++ b/dev-dotnet/system-web/system-web-4.6.0.182-r1.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +USE_DOTNET="net45" +inherit gac dotnet +IUSE+=" +net45 +pkg-config debug" + +DESCRIPTION="Framework for developing web-applications" +HOMEPAGE="https://www.asp.net/" +SRC_URI="https://github.com/ArsenShnurkov/shnurise-tarballs/archive/dev-dotnet/system-web/system-web-4.6.0.182.tar.gz" +RESTRICT="mirror" +S="${WORKDIR}/shnurise-tarballs-${CATEGORY}-${PN}-${PN}-${PV}" + +NAME=System.Web + +LICENSE="Apache-2.0" +SLOT="0" + +KEYWORDS="~amd64 ~x86" + +# dependency on mono is included in dotnet.eclass which is inherited with nupkg.eclass (so no need to include >=dev-lang/mono-4.0.2.5 here) +# dependency on nuget is included in nupkg.eclass when USE="nupkg" is set +COMMONDEPEND=" +" +RDEPEND="${COMMONDEPEND} +" +DEPEND="${COMMONDEPEND} +" + +CSPROJ=${NAME}.csproj + +src_prepare() +{ + sed -i 's/public const string FxVersion = "4.0.0.0";/public const string FxVersion = "'${PV}'";/g' "${S}/mcs/build/common/Consts.cs" || die + sed "s/4.6.0.150/4.6.0.182/g" "${FILESDIR}/policy.4.0.System.Web.config" > "${S}/policy.4.0.System.Web.config" || die + eapply "${FILESDIR}/add-system-diagnostics-namespace.patch" + eapply "${FILESDIR}/autofac.patch" + eapply_user +} + +src_configure() +{ + :; +} + +KEYFILE1=${S}/mcs/class/msfinal.pub +KEYFILE2=${S}/mcs/class/mono.snk + +src_compile() +{ + # System.Web.dll + exbuild /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=${KEYFILE1} /p:DelaySign=true "${S}/mcs/class/${NAME}/${CSPROJ}" + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + sn -R "${S}/mcs/class/${NAME}/obj/${DIR}/${NAME}.dll" ${KEYFILE2} || die + + # Policy file + al "/link:${S}/policy.4.0.System.Web.config" "/out:${S}/policy.4.0.System.Web.dll" "/keyfile:${KEYFILE1}" /delaysign+ || die + sn -R "${S}/policy.4.0.System.Web.dll" ${KEYFILE2} || die +} + +src_install() +{ + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + egacinstall "${S}/mcs/class/${NAME}/obj/${DIR}/${NAME}.dll" + egacinstall "${S}/policy.4.0.System.Web.dll" + install_pc_file "${PN}" "${NAME}.dll" +} + +# The file format contains predefined metadata keywords and freeform variables (like ${prefix} and ${exec_prefix}) +# $1 = ${PN} +# $2 = myassembly.dll +install_pc_file() +{ + if use pkg-config; then + dodir /usr/$(get_libdir)/pkgconfig + ebegin "Installing ${PC_FILE_NAME}.pc file" + sed \ + -e "s:@LIBDIR@:$(get_libdir):" \ + -e "s:@PACKAGENAME@:$1:" \ + -e "s:@DESCRIPTION@:${DESCRIPTION}:" \ + -e "s:@VERSION@:${PV}:" \ + -e 's*@LIBS@*-r:${libdir}'"/mono/$1/$2"'*' \ + <<-EOF >"${D}/usr/$(get_libdir)/pkgconfig/$1.pc" || die + prefix=\${pcfiledir}/../.. + exec_prefix=\${prefix} + libdir=\${exec_prefix}/@LIBDIR@ + Name: @PACKAGENAME@ + Description: @DESCRIPTION@ + Version: @VERSION@ + Libs: @LIBS@ + EOF + + einfo PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "$1" + PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "$1" || die ".pc file failed to validate." + eend $? + fi +}