commit: 91dd57dca99c01b951b87d22e23e13e32a5f084f Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> AuthorDate: Sat Sep 10 18:35:39 2016 +0000 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> CommitDate: Sat Sep 10 18:35:39 2016 +0000 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=91dd57dc
dependency of GitExtensions ...onemu-control-winforms-1.0.0_p2016051802.ebuild | 50 ++++++++++++++++++++++ .../files/add-release-configuration.patch | 45 +++++++++++++++++++ dev-dotnet/conemu-control-winforms/metadata.xml | 21 +++++++++ eclass/gac.eclass | 32 ++++++++++++++ 4 files changed, 148 insertions(+) diff --git a/dev-dotnet/conemu-control-winforms/conemu-control-winforms-1.0.0_p2016051802.ebuild b/dev-dotnet/conemu-control-winforms/conemu-control-winforms-1.0.0_p2016051802.ebuild new file mode 100644 index 0000000..8b27e98 --- /dev/null +++ b/dev-dotnet/conemu-control-winforms/conemu-control-winforms-1.0.0_p2016051802.ebuild @@ -0,0 +1,50 @@ +# 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" + +KEYWORDS="~amd64 ~x86" + +DESCRIPTION="console emulator control, embeds a console view in a Windows Forms window" +HOMEPAGE="http://conemu.github.io/" +SRC_URI="http://download.mono-project.com/sources/mono/mono-4.6.0.150.tar.bz2" +RESTRICT="mirror" + +NAME="conemu-inside" +HOMEPAGE="https://github.com/Maximus5/${NAME}" + +EGIT_COMMIT="b4800195f09b86eca14c4b96141a78136ee1d872" +SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" + +LICENSE="BSD" # https://github.com/Maximus5/ConEmu/blob/master/Release/ConEmu/License.txt +SLOT="0" + +src_prepare() { + eapply "${FILESDIR}/add-release-configuration.patch" + eapply_user +} + +src_compile() { + if use debug; then + CONFIGURATION=Debug + else + CONFIGURATION=Release + fi + exbuild_raw /p:SignAssembly=true /p:AssemblyOriginatorKeyFile="${S}/ConEmuWinForms/Snk.Snk" /p:VersionNumber=1.0.0.2016051802 /p:Configuration=${CONFIGURATION} ConEmuWinForms/ConEmuWinForms.csproj +} + +src_install() { + if use debug; then + DIR=Debug + else + DIR=Release + fi + egacinstall "${S}/ConEmuWinForms/bin/${DIR}/ConEmu.WinForms.dll" + einstall_pc_file "${PN}" "${NAME}.dll" +} diff --git a/dev-dotnet/conemu-control-winforms/files/add-release-configuration.patch b/dev-dotnet/conemu-control-winforms/files/add-release-configuration.patch new file mode 100644 index 0000000..f46aee0 --- /dev/null +++ b/dev-dotnet/conemu-control-winforms/files/add-release-configuration.patch @@ -0,0 +1,45 @@ +diff -ur a/ConEmuWinForms/ConEmuWinForms.csproj b/ConEmuWinForms/ConEmuWinForms.csproj +--- a/ConEmuWinForms/ConEmuWinForms.csproj 2016-05-18 03:51:11.000000000 +0300 ++++ b/ConEmuWinForms/ConEmuWinForms.csproj 2016-09-10 21:08:35.859758408 +0300 +@@ -9,7 +9,6 @@ + <RootNamespace>ConEmu.WinForms</RootNamespace> + <AssemblyName>ConEmu.WinForms</AssemblyName> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> +- <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <NuGetPackageImportStamp> + </NuGetPackageImportStamp> + </PropertyGroup> +@@ -17,7 +16,19 @@ + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> +- <OutputPath>bin\</OutputPath> ++ <OutputPath>bin\Debug</OutputPath> ++ <DefineConstants>DEBUG;TRACE</DefineConstants> ++ <ErrorReport>prompt</ErrorReport> ++ <WarningLevel>4</WarningLevel> ++ <AllowUnsafeBlocks>true</AllowUnsafeBlocks> ++ <NoWarn>1696;1591</NoWarn> ++ <DocumentationFile>bin\ConEmu.WinForms.Xml</DocumentationFile> ++ </PropertyGroup> ++ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ++ <DebugSymbols>true</DebugSymbols> ++ <DebugType>pdbonly</DebugType> ++ <Optimize>true</Optimize> ++ <OutputPath>bin\Release</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> +@@ -88,11 +99,4 @@ + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +- <Import Project="..\packages\ConEmu.Core.16.4.3.1\build\ConEmu.Core.Targets" Condition="Exists('..\packages\ConEmu.Core.16.4.3.1\build\ConEmu.Core.Targets')" /> +- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> +- <PropertyGroup> +- <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> +- </PropertyGroup> +- <Error Condition="!Exists('..\packages\ConEmu.Core.16.4.3.1\build\ConEmu.Core.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ConEmu.Core.16.4.3.1\build\ConEmu.Core.Targets'))" /> +- </Target> + </Project> +\ No newline at end of file diff --git a/dev-dotnet/conemu-control-winforms/metadata.xml b/dev-dotnet/conemu-control-winforms/metadata.xml new file mode 100644 index 0000000..438a44a --- /dev/null +++ b/dev-dotnet/conemu-control-winforms/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>[email protected]</email> + <description>Gentoo Dotnet Project</description> + </maintainer> + <upstream> + <bugs-to>https://github.com/gentoo/dotnet/issues</bugs-to> + <remote-id type="github">Maximus5/conemu-inside</remote-id> + </upstream> + <use> + <flag name='pkg-config'>create .pc file(s) for .dll(s) installed to gac</flag> + </use> + <longdescription lang="en"> + This is a console emulator control that embeds a fully functional console view in a Windows Forms window. + It is capable of running any console application with full interactivity and advanced console functions. + Applications will detect it as an actual console and will not fall back + to the output redirection mode with reduced interactivity or formatting. + </longdescription> +</pkgmetadata> diff --git a/eclass/gac.eclass b/eclass/gac.eclass index c5b7e85..1523301 100644 --- a/eclass/gac.eclass +++ b/eclass/gac.eclass @@ -59,3 +59,35 @@ egacdel() { # don't die fi } + +# @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 = myassembly.dll +einstall_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 +}
