1 |
commit: a975bbac7fdb2ee7d70131caa9b039a5801ddd13 |
2 |
Author: Naohiro Aota <naota <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 8 21:43:02 2018 +0000 |
4 |
Commit: Naohiro Aota <naota <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 8 21:51:19 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a975bbac |
7 |
|
8 |
app-text/xdvik: use pkg-config instead of freetype-config |
9 |
|
10 |
Also, bump to EAPI=6 and introduced CDEPEND variable. |
11 |
|
12 |
Thanks to Aidan Thornton for the patch. |
13 |
|
14 |
Closes: https://bugs.gentoo.org/655358 |
15 |
Signed-off-by: Naohiro Aota <naota <AT> gentoo.org> |
16 |
Package-Manager: Portage-2.3.50, Repoman-2.3.11 |
17 |
|
18 |
.../files/xdvik-22.87.03-freetype2-config.patch | 23 +++++ |
19 |
app-text/xdvik/xdvik-22.87.03-r2.ebuild | 115 +++++++++++++++++++++ |
20 |
2 files changed, 138 insertions(+) |
21 |
|
22 |
diff --git a/app-text/xdvik/files/xdvik-22.87.03-freetype2-config.patch b/app-text/xdvik/files/xdvik-22.87.03-freetype2-config.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..6387b28c8ba |
25 |
--- /dev/null |
26 |
+++ b/app-text/xdvik/files/xdvik-22.87.03-freetype2-config.patch |
27 |
@@ -0,0 +1,23 @@ |
28 |
+--- a/m4/kpse-freetype2-flags.m4 2018-09-19 10:19:06.437789178 +0100 |
29 |
++++ b/m4/kpse-freetype2-flags.m4 2018-09-19 10:23:48.556050046 +0100 |
30 |
+@@ -21,17 +21,10 @@ |
31 |
+ |
32 |
+ # KPSE_FREETYPE2_OPTIONS([WITH-SYSTEM]) |
33 |
+ # ------------------------------------- |
34 |
+-AC_DEFUN([KPSE_FREETYPE2_OPTIONS], [_KPSE_LIB_OPTIONS([freetype2], [$1], [freetype-config])]) |
35 |
++AC_DEFUN([KPSE_FREETYPE2_OPTIONS], [_KPSE_LIB_OPTIONS([freetype2], [$1], [pkg-config])]) |
36 |
+ |
37 |
+ # KPSE_FREETYPE2_SYSTEM_FLAGS |
38 |
+ # --------------------------- |
39 |
+ AC_DEFUN([KPSE_FREETYPE2_SYSTEM_FLAGS], [dnl |
40 |
+-AC_REQUIRE([AC_CANONICAL_HOST])[]dnl |
41 |
+-AC_CHECK_TOOL([FT2_CONFIG], [freetype-config], [false])[]dnl |
42 |
+-if $FT2_CONFIG --ftversion >/dev/null 2>&1; then |
43 |
+- FREETYPE2_INCLUDES=`$FT2_CONFIG --cflags` |
44 |
+- FREETYPE2_LIBS=`$FT2_CONFIG --libs` |
45 |
+-elif test "x$need_freetype2:$with_system_freetype2" = xyes:yes; then |
46 |
+- AC_MSG_ERROR([did not find freetype-config required for system freetype2 library]) |
47 |
+-fi |
48 |
+-]) # KPSE_FREETYPE2_SYSTEM_FLAGS |
49 |
++_KPSE_PKG_CONFIG_FLAGS([freetype2], [freetype2])]) |
50 |
++ |
51 |
|
52 |
diff --git a/app-text/xdvik/xdvik-22.87.03-r2.ebuild b/app-text/xdvik/xdvik-22.87.03-r2.ebuild |
53 |
new file mode 100644 |
54 |
index 00000000000..30720be2062 |
55 |
--- /dev/null |
56 |
+++ b/app-text/xdvik/xdvik-22.87.03-r2.ebuild |
57 |
@@ -0,0 +1,115 @@ |
58 |
+# Copyright 1999-2018 Gentoo Authors |
59 |
+# Distributed under the terms of the GNU General Public License v2 |
60 |
+ |
61 |
+EAPI=6 |
62 |
+inherit autotools elisp-common eutils flag-o-matic multilib toolchain-funcs xdg-utils |
63 |
+ |
64 |
+DESCRIPTION="DVI previewer for X Window System" |
65 |
+HOMEPAGE="http://xdvi.sourceforge.net/" |
66 |
+SRC_URI="mirror://sourceforge/xdvi/${P}.tar.gz" |
67 |
+ |
68 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
69 |
+SLOT="0" |
70 |
+LICENSE="GPL-2" |
71 |
+IUSE="motif neXt Xaw3d emacs" |
72 |
+ |
73 |
+CDEPEND=">=media-libs/freetype-2.9.1-r2:2 |
74 |
+ x11-libs/libX11 |
75 |
+ x11-libs/libXi |
76 |
+ x11-libs/libXmu |
77 |
+ x11-libs/libXpm |
78 |
+ x11-libs/libXt |
79 |
+ motif? ( >=x11-libs/motif-2.3:0 ) |
80 |
+ !motif? ( |
81 |
+ neXt? ( x11-libs/neXtaw ) |
82 |
+ !neXt? ( |
83 |
+ Xaw3d? ( x11-libs/libXaw3d ) |
84 |
+ !Xaw3d? ( x11-libs/libXaw ) |
85 |
+ ) |
86 |
+ ) |
87 |
+ dev-libs/kpathsea" |
88 |
+DEPEND="sys-devel/flex |
89 |
+ virtual/yacc |
90 |
+ virtual/pkgconfig |
91 |
+ ${CDEPEND}" |
92 |
+RDEPEND="${CDEPEND} |
93 |
+ virtual/latex-base |
94 |
+ !<app-text/texlive-2007" |
95 |
+S=${WORKDIR}/${P}/texk/xdvik |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ local i |
99 |
+ # Make sure system kpathsea headers are used |
100 |
+ cd "${WORKDIR}/${P}/texk/kpathsea" |
101 |
+ for i in *.h ; do echo "#include_next \"$i\"" > $i; done |
102 |
+ |
103 |
+ cd "${WORKDIR}/${P}" |
104 |
+ eapply "${FILESDIR}"/${P}-freetype2-config.patch |
105 |
+ cd "${S}" |
106 |
+ eautoreconf |
107 |
+ |
108 |
+ eapply_user |
109 |
+} |
110 |
+ |
111 |
+src_configure() { |
112 |
+ has_version '>=dev-libs/kpathsea-6.2.1' && append-cppflags "$($(tc-getPKG_CONFIG) --cflags kpathsea)" |
113 |
+ |
114 |
+ local toolkit |
115 |
+ |
116 |
+ if use motif ; then |
117 |
+ toolkit="motif" |
118 |
+ use neXt && ewarn "neXt USE flag ignored (superseded by motif)" |
119 |
+ use Xaw3d && ewarn "Xaw3d USE flag ignored (superseded by motif)" |
120 |
+ elif use neXt ; then |
121 |
+ toolkit="neXtaw" |
122 |
+ use Xaw3d && ewarn "Xaw3d USE flag ignored (superseded by neXt)" |
123 |
+ elif use Xaw3d ; then |
124 |
+ toolkit="xaw3d" |
125 |
+ else |
126 |
+ toolkit="xaw" |
127 |
+ fi |
128 |
+ |
129 |
+ econf \ |
130 |
+ --with-system-freetype2 \ |
131 |
+ --with-system-kpathsea \ |
132 |
+ --with-kpathsea-include="${EPREFIX}"/usr/include/kpathsea \ |
133 |
+ --with-xdvi-x-toolkit="${toolkit}" \ |
134 |
+ --x-includes="${SYSROOT}${EPREFIX}"/usr/include \ |
135 |
+ --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir) |
136 |
+} |
137 |
+ |
138 |
+src_compile() { |
139 |
+ emake kpathsea_dir="${EPREFIX}/usr/include/kpathsea" |
140 |
+ use emacs && elisp-compile xdvi-search.el |
141 |
+} |
142 |
+ |
143 |
+src_install() { |
144 |
+ dodir /usr/share/texmf-dist/dvips/config |
145 |
+ |
146 |
+ emake DESTDIR="${D}" install |
147 |
+ |
148 |
+ dosym ../../texmf-dist/xdvi/XDvi /usr/share/X11/app-defaults/XDvi |
149 |
+ |
150 |
+ dodoc BUGS FAQ README.* |
151 |
+ |
152 |
+ use emacs && elisp-install tex-utils *.el *.elc |
153 |
+ |
154 |
+ doicon "${FILESDIR}"/${PN}.xpm |
155 |
+ make_desktop_entry xdvi "XDVI" xdvik "Graphics;Viewer" |
156 |
+ echo "MimeType=application/x-dvi;" >> "${ED}"usr/share/applications/xdvi-"${PN}".desktop |
157 |
+} |
158 |
+ |
159 |
+pkg_postinst() { |
160 |
+ xdg_desktop_database_update |
161 |
+ |
162 |
+ if use emacs; then |
163 |
+ elog "Add" |
164 |
+ elog " (add-to-list 'load-path \"${EPREFIX}${SITELISP}/tex-utils\")" |
165 |
+ elog " (require 'xdvi-search)" |
166 |
+ elog "to your ~/.emacs file" |
167 |
+ fi |
168 |
+} |
169 |
+ |
170 |
+pkg_postrm() { |
171 |
+ xdg_desktop_database_update |
172 |
+} |