1 |
commit: f1f4574fb3c4c11795e38421ba58597c7c34d57c |
2 |
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Sep 30 05:14:58 2016 +0000 |
4 |
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 30 05:14:58 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=f1f4574f |
7 |
|
8 |
.pc file installation for Ionic |
9 |
|
10 |
...mu-control-winforms-1.0.0_p2016051802-r1.ebuild | 2 +- |
11 |
.../dotnetzip-semverd-1.9.3-r1.ebuild | 48 ++++++++++++++++++++ |
12 |
eclass/gac.eclass | 53 ++++++++++++++++------ |
13 |
3 files changed, 89 insertions(+), 14 deletions(-) |
14 |
|
15 |
diff --git a/dev-dotnet/conemu-control-winforms/conemu-control-winforms-1.0.0_p2016051802-r1.ebuild b/dev-dotnet/conemu-control-winforms/conemu-control-winforms-1.0.0_p2016051802-r1.ebuild |
16 |
index 1fd1b47..62fc3b1 100644 |
17 |
--- a/dev-dotnet/conemu-control-winforms/conemu-control-winforms-1.0.0_p2016051802-r1.ebuild |
18 |
+++ b/dev-dotnet/conemu-control-winforms/conemu-control-winforms-1.0.0_p2016051802-r1.ebuild |
19 |
@@ -46,5 +46,5 @@ src_install() { |
20 |
DIR=Release |
21 |
fi |
22 |
egacinstall "${S}/ConEmuWinForms/bin/${DIR}/ConEmu.WinForms.dll" |
23 |
- einstall_pc_file "${PN}" "ConEmu.WinForms.dll" |
24 |
+ einstall_pc_file "${PN}" "${PV}" "ConEmu.WinForms.dll" |
25 |
} |
26 |
|
27 |
diff --git a/dev-dotnet/dotnetzip-semverd/dotnetzip-semverd-1.9.3-r1.ebuild b/dev-dotnet/dotnetzip-semverd/dotnetzip-semverd-1.9.3-r1.ebuild |
28 |
new file mode 100644 |
29 |
index 0000000..7eab427 |
30 |
--- /dev/null |
31 |
+++ b/dev-dotnet/dotnetzip-semverd/dotnetzip-semverd-1.9.3-r1.ebuild |
32 |
@@ -0,0 +1,48 @@ |
33 |
+# Copyright 1999-2016 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+# $Id$ |
36 |
+ |
37 |
+EAPI=6 |
38 |
+SLOT="0" |
39 |
+ |
40 |
+KEYWORDS="~amd64 ~ppc ~x86" |
41 |
+USE_DOTNET="net45" |
42 |
+ |
43 |
+inherit gac dotnet |
44 |
+ |
45 |
+SRC_URI="https://github.com/haf/DotNetZip.Semverd/archive/v1.9.3.tar.gz -> ${PV}.tar.gz" |
46 |
+RESTRICT="mirror" |
47 |
+S="${WORKDIR}/DotNetZip.Semverd-${PV}" |
48 |
+ |
49 |
+HOMEPAGE="https://github.com/haf/DotNetZip.Semverd" |
50 |
+DESCRIPTION="create, extract, or update zip files with C# (=DotNetZip+SemVer)" |
51 |
+LICENSE="MS-PL" # https://github.com/haf/DotNetZip.Semverd/blob/master/LICENSE |
52 |
+ |
53 |
+IUSE="net45 +gac +nupkg developer debug doc" |
54 |
+ |
55 |
+COMMON_DEPEND=">=dev-lang/mono-4.0.2.5 |
56 |
+" |
57 |
+RDEPEND="${COMMON_DEPEND} |
58 |
+" |
59 |
+DEPEND="${COMMON_DEPEND} |
60 |
+" |
61 |
+ |
62 |
+src_prepare() { |
63 |
+ eapply "${FILESDIR}/version-${PV}.patch" |
64 |
+ eapply_user |
65 |
+} |
66 |
+ |
67 |
+src_compile() { |
68 |
+ #exbuild "/p:SignAssembly=true" "/p:AssemblyOriginatorKeyFile=${S}/src/Ionic.snk" "src/Zip Reduced/Zip Reduced.csproj" |
69 |
+ exbuild_strong "src/Zip Reduced/Zip Reduced.csproj" |
70 |
+} |
71 |
+ |
72 |
+src_install() { |
73 |
+ if use debug; then |
74 |
+ DIR="Debug" |
75 |
+ else |
76 |
+ DIR="Release" |
77 |
+ fi |
78 |
+ egacinstall "src/Zip Reduced/bin/${DIR}/Ionic.Zip.Reduced.dll" |
79 |
+ einstall_pc_file "${PN}" "${PV}" "Ionic.Zip.Reduced.dll" |
80 |
+} |
81 |
|
82 |
diff --git a/eclass/gac.eclass b/eclass/gac.eclass |
83 |
index 1523301..0c47445 100644 |
84 |
--- a/eclass/gac.eclass |
85 |
+++ b/eclass/gac.eclass |
86 |
@@ -13,7 +13,7 @@ case ${EAPI:-0} in |
87 |
6) ;; |
88 |
esac |
89 |
|
90 |
-IUSE+=" +gac" |
91 |
+IUSE+=" +gac +pkg-config +symlink" |
92 |
|
93 |
DEPEND+=" dev-lang/mono" |
94 |
RDEPEND+=" dev-lang/mono" |
95 |
@@ -64,30 +64,57 @@ egacdel() { |
96 |
# @DESCRIPTION: installs .pc file |
97 |
# The file format contains predefined metadata keywords and freeform variables (like ${prefix} and ${exec_prefix}) |
98 |
# $1 = ${PN} |
99 |
-# $2 = myassembly.dll |
100 |
+# $2 = ${PV} |
101 |
+# $3 = myassembly.dll # should not contain path, it is calculated magically, see DLL_FILENAME variable |
102 |
einstall_pc_file() |
103 |
{ |
104 |
if use pkg-config; then |
105 |
- dodir /usr/$(get_libdir)/pkgconfig |
106 |
- ebegin "Installing ${PC_FILE_NAME}.pc file" |
107 |
+ local PC_NAME="$1" |
108 |
+ local PC_VERSION="$2" |
109 |
+ local DLL_NAME="$3" |
110 |
+ local PC_FILENAME="${PC_NAME}-${PC_VERSION}" |
111 |
+ local PC_DIRECTORY="/usr/$(get_libdir)/pkgconfig" |
112 |
+ #local PC_DIRECTORY_DELTA="${CATEGORY}/${PN}" |
113 |
+ local PC_DIRECTORY_VER="${PC_DIRECTORY}/${PC_DIRECTORY_DELTA}" |
114 |
+ local DLL_FILENAME="\${libdir}/mono/${PC_NAME}/${DLL_NAME}" |
115 |
+ |
116 |
+ dodir "${PC_DIRECTORY}" |
117 |
+ dodir "${PC_DIRECTORY_VER}" |
118 |
+ |
119 |
+ ebegin "Installing ${PC_DIRECTORY_VER}/${PC_FILENAME}.pc file" |
120 |
+ |
121 |
+ # @Name@: A human-readable name for the library or package. This does not affect usage of the pkg-config tool, |
122 |
+ # which uses the name of the .pc file. |
123 |
+ # see https://people.freedesktop.org/~dbn/pkg-config-guide.html |
124 |
+ |
125 |
+ # \${name} variables going directly into .pc file after unescaping $ sign |
126 |
+ # |
127 |
+ # other variables are not substituted to sed input directly |
128 |
+ # to protect them from processing by bash |
129 |
+ # (they only requires sed escaping for replacement path) |
130 |
sed \ |
131 |
- -e "s:@LIBDIR@:$(get_libdir):" \ |
132 |
- -e "s:@PACKAGENAME@:$1:" \ |
133 |
+ -e "s:@PC_VERSION@:${PC_VERSION}:" \ |
134 |
+ -e "s:@Name@:${CATEGORY}/${PN}:" \ |
135 |
-e "s:@DESCRIPTION@:${DESCRIPTION}:" \ |
136 |
- -e "s:@VERSION@:${PV}:" \ |
137 |
- -e 's*@LIBS@*-r:${libdir}'"/mono/$1/$2"'*' \ |
138 |
- <<-EOF >"${D}/usr/$(get_libdir)/pkgconfig/$1.pc" || die |
139 |
+ -e "s:@LIBDIR@:$(get_libdir):" \ |
140 |
+ -e "s*@LIBS@*-r:${DLL_FILENAME}*" \ |
141 |
+ <<-EOF >"${D}/${PC_DIRECTORY_VER}/${PC_FILENAME}.pc" || die |
142 |
prefix=\${pcfiledir}/../.. |
143 |
exec_prefix=\${prefix} |
144 |
libdir=\${exec_prefix}/@LIBDIR@ |
145 |
- Name: @PACKAGENAME@ |
146 |
+ Version: @PC_VERSION@ |
147 |
+ Name: @Name@ |
148 |
Description: @DESCRIPTION@ |
149 |
- Version: @VERSION@ |
150 |
Libs: @LIBS@ |
151 |
EOF |
152 |
|
153 |
- einfo PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "$1" |
154 |
- PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "$1" || die ".pc file failed to validate." |
155 |
+ einfo PKG_CONFIG_PATH="${D}/${PC_DIRECTORY_VER}" pkg-config --exists "${PC_FILENAME}" |
156 |
+ PKG_CONFIG_PATH="${D}/${PC_DIRECTORY_VER}" pkg-config --exists "${PC_FILENAME}" || die ".pc file failed to validate." |
157 |
eend $? |
158 |
+ |
159 |
+ if use symlink; then |
160 |
+ einfo "SymLinking ${PC_DIRECTORY_VER}/${PC_FILENAME}.pc file as ${PC_DIRECTORY}/${PC_NAME}.pc" |
161 |
+ dosym "./${PC_DIRECTORY_DELTA}/${PC_FILENAME}.pc" "${PC_DIRECTORY}/${PC_NAME}.pc" |
162 |
+ fi |
163 |
fi |
164 |
} |