1 |
commit: 6e02c4b77546d48394a95310052463b4e643faf2 |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 3 21:21:52 2016 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 3 22:06:48 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e02c4b7 |
7 |
|
8 |
app-crypt/xca: add doc, qt4, qt5 USE flags |
9 |
|
10 |
Bug: 574734 |
11 |
Bug: 584774 |
12 |
|
13 |
Package-Manager: portage-2.2.28 |
14 |
|
15 |
app-crypt/xca/files/xca-1.3.2-build.patch | 180 ++++++++++++++++++++++++++++++ |
16 |
app-crypt/xca/xca-1.3.2-r2.ebuild | 53 +++++++++ |
17 |
2 files changed, 233 insertions(+) |
18 |
|
19 |
diff --git a/app-crypt/xca/files/xca-1.3.2-build.patch b/app-crypt/xca/files/xca-1.3.2-build.patch |
20 |
new file mode 100644 |
21 |
index 0000000..9ca8a67 |
22 |
--- /dev/null |
23 |
+++ b/app-crypt/xca/files/xca-1.3.2-build.patch |
24 |
@@ -0,0 +1,180 @@ |
25 |
+From 476aa73644e6b3d353a1ed1cf3982e7114875088 Mon Sep 17 00:00:00 2001 |
26 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
27 |
+Date: Fri, 3 Jun 2016 23:15:29 +0300 |
28 |
+Subject: [PATCH 1/2] build: add --with-qt-version to force specific qt linkage |
29 |
+ |
30 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
31 |
+--- |
32 |
+ configure.ac | 43 ++++++++++++++++++++++++++++--------------- |
33 |
+ 1 file changed, 28 insertions(+), 15 deletions(-) |
34 |
+ |
35 |
+diff --git a/configure.ac b/configure.ac |
36 |
+index 32ba42b..8490a88 100644 |
37 |
+--- a/configure.ac |
38 |
++++ b/configure.ac |
39 |
+@@ -90,18 +90,28 @@ if test -n "${_QTDIR}" && test -d "${_QTDIR}"; then |
40 |
+ DYLD_LIBRARY_PATH="${_QTDIR}/lib:${DYLD_LIBRARY_PATH}" |
41 |
+ fi |
42 |
+ |
43 |
+-PKG_CHECK_MODULES(Qt5, [Qt5Core >= 5.0, Qt5Widgets >= 5.0], [ |
44 |
+- _QT_HOST_BINS="`pkg-config --variable=host_bins Qt5Core`" |
45 |
+- QT_MOC="${_QT_HOST_BINS}/moc" |
46 |
+- QT_UIC="${_QT_HOST_BINS}/uic" |
47 |
+- if test -n "$DARWIN"; then |
48 |
+- FRAMEDIR=`pkg-config --variable=libdir Qt5Core` |
49 |
+- Qt5_CFLAGS="$Qt5_CFLAGS -F${FRAMEDIR} -I${FRAMEDIR}/QtCore.framework/Headers -I${FRAMEDIR}/QtGui.framework/Headers -I${FRAMEDIR}/QtWdgets.framework/Headers" |
50 |
+- fi |
51 |
+- QT_VERSION=5 |
52 |
+- QT_CFLAGS="${Qt5_CFLAGS} -fPIC" |
53 |
+- QT_LIBS="${Qt5_LIBS}" |
54 |
+-], [ |
55 |
++AC_ARG_WITH([qt-version], |
56 |
++ AS_HELP_STRING([--with-qt-version], [Select the Qt version]), |
57 |
++ [WANT_QT_VERSION="$withval"], |
58 |
++ [WANT_QT_VERSION=detect]) |
59 |
++ |
60 |
++if test "${WANT_QT_VERSION}" = detect -o "${WANT_QT_VERSION}" = 5; then |
61 |
++ PKG_CHECK_MODULES(Qt5, [Qt5Core >= 5.0, Qt5Widgets >= 5.0], [ |
62 |
++ _QT_HOST_BINS="`pkg-config --variable=host_bins Qt5Core`" |
63 |
++ QT_MOC="${_QT_HOST_BINS}/moc" |
64 |
++ QT_UIC="${_QT_HOST_BINS}/uic" |
65 |
++ if test -n "$DARWIN"; then |
66 |
++ FRAMEDIR=`pkg-config --variable=libdir Qt5Core` |
67 |
++ Qt5_CFLAGS="$Qt5_CFLAGS -F${FRAMEDIR} -I${FRAMEDIR}/QtCore.framework/Headers -I${FRAMEDIR}/QtGui.framework/Headers -I${FRAMEDIR}/QtWdgets.framework/Headers" |
68 |
++ fi |
69 |
++ WANT_QT_VERSION=5 |
70 |
++ QT_VERSION=5 |
71 |
++ QT_CFLAGS="${Qt5_CFLAGS} -fPIC" |
72 |
++ QT_LIBS="${Qt5_LIBS}" |
73 |
++]) |
74 |
++fi |
75 |
++ |
76 |
++if test "${WANT_QT_VERSION}" = detect -o "${WANT_QT_VERSION}" = 4; then |
77 |
+ PKG_CHECK_MODULES(Qt4, [QtCore >= 4.6, QtCore < 5.0, QtGui >= 4.6, QtGui < 5.0], [ |
78 |
+ QT_MOC="`pkg-config --variable=moc_location QtCore`" |
79 |
+ QT_UIC="`pkg-config --variable=uic_location QtCore`" |
80 |
+@@ -112,18 +122,21 @@ PKG_CHECK_MODULES(Qt5, [Qt5Core >= 5.0, Qt5Widgets >= 5.0], [ |
81 |
+ FRAMEDIR=`pkg-config --variable=libdir QtCore` |
82 |
+ Qt4_CFLAGS="$Qt4_CFLAGS -F${FRAMEDIR} -I${FRAMEDIR}/QtCore.framework/Headers -I${FRAMEDIR}/QtGui.framework/Headers" |
83 |
+ fi |
84 |
++ WANT_QT_VERSION=4 |
85 |
+ QT_VERSION=4 |
86 |
+ QT_CFLAGS="${Qt4_CFLAGS}" |
87 |
+ QT_LIBS="${Qt4_LIBS}" |
88 |
+- ], [ |
89 |
++ ]) |
90 |
++fi |
91 |
++ |
92 |
++if test -z "${QT_VERSION}"; then |
93 |
+ if test -z "$DARWIN"; then |
94 |
+ QT_LIBS=" -lQtCore -lQtGui " |
95 |
+ else |
96 |
+ QT_LIBS=" -framework QtGui -framework QtCore " |
97 |
+ fi |
98 |
+ AC_MSG_WARN([Qt pkg-config failed, using fallback defaults (${QT_LIBS})]); |
99 |
+- ]) |
100 |
+-]) |
101 |
++fi |
102 |
+ |
103 |
+ AC_SUBST([QT_CFLAGS]) |
104 |
+ AC_SUBST([QT_LIBS]) |
105 |
+-- |
106 |
+2.7.3 |
107 |
+ |
108 |
+From 7112df9532f71cb3a150fef61b2d7e5d9899634c Mon Sep 17 00:00:00 2001 |
109 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
110 |
+Date: Fri, 3 Jun 2016 23:58:01 +0300 |
111 |
+Subject: [PATCH 2/2] build: add --disable-doc to disable doc installation |
112 |
+ |
113 |
+--- |
114 |
+ Local.mak.in | 1 + |
115 |
+ configure.ac | 37 +++++++++++++++++++++++-------------- |
116 |
+ doc/Makefile | 10 +++++----- |
117 |
+ 3 files changed, 29 insertions(+), 19 deletions(-) |
118 |
+ |
119 |
+diff --git a/Local.mak.in b/Local.mak.in |
120 |
+index cd5ebfc..d993b8b 100644 |
121 |
+--- a/Local.mak.in |
122 |
++++ b/Local.mak.in |
123 |
+@@ -19,6 +19,7 @@ STRIP=@STRIP@ |
124 |
+ DOCTOOL=@DOCTOOL@ |
125 |
+ MACDEPLOYQT=@MACDEPLOYQT@ |
126 |
+ DARWIN=@DARWIN@ |
127 |
++ENABLE_DOC=@ENABLE_DOC@ |
128 |
+ |
129 |
+ PACKAGE_TARNAME=@PACKAGE_TARNAME@ |
130 |
+ HOST=linux |
131 |
+diff --git a/configure.ac b/configure.ac |
132 |
+index 8490a88..03d729e 100644 |
133 |
+--- a/configure.ac |
134 |
++++ b/configure.ac |
135 |
+@@ -202,20 +202,29 @@ AX_CHECK_GNU_MAKE() |
136 |
+ |
137 |
+ # linuxdoc application detection |
138 |
+ ################################## |
139 |
+-AC_CHECK_PROGS([DOCTOOL], [linuxdoc sgml2html], [":"]) |
140 |
+-AC_SUBST([DOCTOOL]) |
141 |
+- |
142 |
+-case "$DOCTOOL" in |
143 |
+- linuxdoc) DOCTOOL="linuxdoc -B html";; |
144 |
+- sgml2html) DOCTOOL="sgml2html -s 1";; |
145 |
+- :) |
146 |
+- if test "${srcdir}" != "."; then |
147 |
+- mkdir -p doc |
148 |
+- cp ${srcdir}/doc/xca-doc.tgz doc/ |
149 |
+- fi |
150 |
+- AC_MSG_WARN(['linuxdoc' or 'sgml2html' not found, using pre-compiled documentation]) |
151 |
+- ;; |
152 |
+-esac |
153 |
++AC_ARG_ENABLE([doc], |
154 |
++ AS_HELP_STRING([--disable-doc], [Disable documentation installation]), |
155 |
++ , |
156 |
++ [enable_doc=yes]) |
157 |
++test "${enable_doc}" = "yes" && ENABLE_DOC= || ENABLE_DOC='\#' |
158 |
++AC_SUBST([ENABLE_DOC]) |
159 |
++ |
160 |
++if test "${enable_doc}"; then |
161 |
++ AC_CHECK_PROGS([DOCTOOL], [linuxdoc sgml2html], [":"]) |
162 |
++ AC_SUBST([DOCTOOL]) |
163 |
++ |
164 |
++ case "$DOCTOOL" in |
165 |
++ linuxdoc) DOCTOOL="linuxdoc -B html";; |
166 |
++ sgml2html) DOCTOOL="sgml2html -s 1";; |
167 |
++ :) |
168 |
++ if test "${srcdir}" != "."; then |
169 |
++ mkdir -p doc |
170 |
++ cp ${srcdir}/doc/xca-doc.tgz doc/ |
171 |
++ fi |
172 |
++ AC_MSG_WARN(['linuxdoc' or 'sgml2html' not found, using pre-compiled documentation]) |
173 |
++ ;; |
174 |
++ esac |
175 |
++fi |
176 |
+ |
177 |
+ # Setup done. Write local.h and Local.mak |
178 |
+ ############################################ |
179 |
+diff --git a/doc/Makefile b/doc/Makefile |
180 |
+index fce4acf..7bf802f 100644 |
181 |
+--- a/doc/Makefile |
182 |
++++ b/doc/Makefile |
183 |
+@@ -17,13 +17,13 @@ xca.html: xca.sgml |
184 |
+ echo 'The documentation for XCA can be viewed online at: <a href="http://xca.sourceforge.net/">http://xca.sourceforge.net/</a>.' > $@ |
185 |
+ test ! -f xca-doc.tgz || tar zxf xca-doc.tgz |
186 |
+ @$(PRINT) " DOC [$(BASENAME)] $@" |
187 |
+- $(DOCTOOL) $< >/dev/null |
188 |
++ $(ENABLE_DOC)$(DOCTOOL) $< >/dev/null |
189 |
+ |
190 |
+ install: $(doc) |
191 |
+- install -m 755 -d $(destdir)$(htmldir) \ |
192 |
+- $(destdir)$(mandir)/man1 |
193 |
+- install -m 644 xca*.html $(destdir)$(htmldir) |
194 |
+- install *.1.gz $(destdir)/$(mandir)/man1 |
195 |
++ $(ENABLE_DOC)install -m 755 -d $(destdir)$(htmldir) |
196 |
++ $(ENABLE_DOC)install -m 644 xca*.html $(destdir)$(htmldir) |
197 |
++ install -m 755 -d $(destdir)$(mandir)/man1 |
198 |
++ install -m 644 *.1.gz $(destdir)/$(mandir)/man1 |
199 |
+ |
200 |
+ app: xca.html |
201 |
+ mkdir -p $(APPDIR)/Resources |
202 |
+-- |
203 |
+2.7.3 |
204 |
+ |
205 |
|
206 |
diff --git a/app-crypt/xca/xca-1.3.2-r2.ebuild b/app-crypt/xca/xca-1.3.2-r2.ebuild |
207 |
new file mode 100644 |
208 |
index 0000000..2e7e236 |
209 |
--- /dev/null |
210 |
+++ b/app-crypt/xca/xca-1.3.2-r2.ebuild |
211 |
@@ -0,0 +1,53 @@ |
212 |
+# Copyright 1999-2016 Gentoo Foundation |
213 |
+# Distributed under the terms of the GNU General Public License v2 |
214 |
+# $Id$ |
215 |
+ |
216 |
+EAPI="5" |
217 |
+ |
218 |
+inherit eutils toolchain-funcs autotools |
219 |
+ |
220 |
+DESCRIPTION="A GUI to OpenSSL, RSA public keys, certificates, signing requests etc" |
221 |
+HOMEPAGE="http://xca.sourceforge.net" |
222 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
223 |
+ |
224 |
+LICENSE="BSD" |
225 |
+SLOT="0" |
226 |
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
227 |
+IUSE="bindist doc libressl qt4 qt5" |
228 |
+ |
229 |
+REQUIRED_USE="|| ( qt4 qt5 )" |
230 |
+ |
231 |
+RDEPEND=" |
232 |
+ !libressl? ( dev-libs/openssl:0=[bindist=] ) |
233 |
+ libressl? ( dev-libs/libressl:0= ) |
234 |
+ doc? ( app-text/linuxdoc-tools ) |
235 |
+ qt5? ( dev-qt/qtgui:5 ) |
236 |
+ qt4? ( dev-qt/qtgui:4 )" |
237 |
+DEPEND="${RDEPEND}" |
238 |
+ |
239 |
+src_prepare() { |
240 |
+ epatch "${FILESDIR}"/${PN}-1.0.0-desktop.patch |
241 |
+ epatch "${FILESDIR}"/${P}-build.patch |
242 |
+ AT_M4DIR="m4" eautoreconf |
243 |
+} |
244 |
+ |
245 |
+src_configure() { |
246 |
+ econf \ |
247 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
248 |
+ --with-qt-version=$(use qt5 && echo 5 || echo 4) \ |
249 |
+ $(use_enable doc) \ |
250 |
+ STRIP=true |
251 |
+} |
252 |
+ |
253 |
+src_compile() { |
254 |
+ # enforce all to avoid the automatic silent rules |
255 |
+ emake all |
256 |
+} |
257 |
+ |
258 |
+src_install() { |
259 |
+ # non standard destdir |
260 |
+ emake install destdir="${ED}" |
261 |
+ |
262 |
+ insinto /etc/xca |
263 |
+ doins misc/*.txt |
264 |
+} |