1 |
commit: 119f2ff74998a57d25770ed806f9371c8fbbecad |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 19 15:28:35 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 14 00:45:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=119f2ff7 |
7 |
|
8 |
app-text/xdvik: [QA] inline ESYSROOT, EAPI 8 |
9 |
|
10 |
ESYSROOT is SYSROOT/EPREFIX in >= EAPI 7 |
11 |
|
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
app-text/xdvik/xdvik-22.87.03-r4.ebuild | 114 ++++++++++++++++++++++++++++++++ |
15 |
1 file changed, 114 insertions(+) |
16 |
|
17 |
diff --git a/app-text/xdvik/xdvik-22.87.03-r4.ebuild b/app-text/xdvik/xdvik-22.87.03-r4.ebuild |
18 |
new file mode 100644 |
19 |
index 000000000000..1d19d16bb0f7 |
20 |
--- /dev/null |
21 |
+++ b/app-text/xdvik/xdvik-22.87.03-r4.ebuild |
22 |
@@ -0,0 +1,114 @@ |
23 |
+# Copyright 1999-2022 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=8 |
27 |
+ |
28 |
+inherit autotools desktop elisp-common flag-o-matic toolchain-funcs xdg |
29 |
+ |
30 |
+DESCRIPTION="DVI previewer for X Window System" |
31 |
+HOMEPAGE="http://xdvi.sourceforge.net/" |
32 |
+SRC_URI="mirror://sourceforge/xdvi/${P}.tar.gz" |
33 |
+S="${WORKDIR}"/${P}/texk/xdvik |
34 |
+ |
35 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
36 |
+SLOT="0" |
37 |
+LICENSE="GPL-2" |
38 |
+IUSE="motif neXt Xaw3d emacs" |
39 |
+ |
40 |
+DEPEND=">=media-libs/freetype-2.9.1-r2:2 |
41 |
+ x11-libs/libX11 |
42 |
+ x11-libs/libXi |
43 |
+ x11-libs/libXmu |
44 |
+ x11-libs/libXpm |
45 |
+ x11-libs/libXt |
46 |
+ emacs? ( >=app-editors/emacs-23.1:* ) |
47 |
+ motif? ( >=x11-libs/motif-2.3:0 ) |
48 |
+ !motif? ( |
49 |
+ neXt? ( x11-libs/neXtaw ) |
50 |
+ !neXt? ( |
51 |
+ Xaw3d? ( x11-libs/libXaw3d ) |
52 |
+ !Xaw3d? ( x11-libs/libXaw ) |
53 |
+ ) |
54 |
+ ) |
55 |
+ dev-libs/kpathsea:=" |
56 |
+RDEPEND="${DEPEND} |
57 |
+ virtual/latex-base |
58 |
+ !<app-text/texlive-2007" |
59 |
+BDEPEND="sys-devel/flex |
60 |
+ virtual/yacc |
61 |
+ virtual/pkgconfig" |
62 |
+ |
63 |
+src_prepare() { |
64 |
+ default |
65 |
+ |
66 |
+ # Make sure system kpathsea headers are used |
67 |
+ cd "${WORKDIR}/${P}/texk/kpathsea" || die |
68 |
+ local i |
69 |
+ for i in *.h ; do |
70 |
+ echo "#include_next \"$i\"" > ${i} || die |
71 |
+ done |
72 |
+ |
73 |
+ cd "${WORKDIR}/${P}" || die |
74 |
+ eapply "${FILESDIR}"/${P}-freetype2-config.patch |
75 |
+ cd "${S}" || die |
76 |
+ eautoreconf |
77 |
+} |
78 |
+ |
79 |
+src_configure() { |
80 |
+ has_version '>=dev-libs/kpathsea-6.2.1' && append-cppflags "$($(tc-getPKG_CONFIG) --cflags kpathsea)" |
81 |
+ |
82 |
+ local toolkit |
83 |
+ if use motif ; then |
84 |
+ toolkit="motif" |
85 |
+ use neXt && ewarn "neXt USE flag ignored (superseded by motif)" |
86 |
+ use Xaw3d && ewarn "Xaw3d USE flag ignored (superseded by motif)" |
87 |
+ elif use neXt ; then |
88 |
+ toolkit="neXtaw" |
89 |
+ use Xaw3d && ewarn "Xaw3d USE flag ignored (superseded by neXt)" |
90 |
+ elif use Xaw3d ; then |
91 |
+ toolkit="xaw3d" |
92 |
+ else |
93 |
+ toolkit="xaw" |
94 |
+ fi |
95 |
+ |
96 |
+ econf \ |
97 |
+ --with-system-freetype2 \ |
98 |
+ --with-system-kpathsea \ |
99 |
+ --with-kpathsea-include="${EPREFIX}"/usr/include/kpathsea \ |
100 |
+ --with-xdvi-x-toolkit="${toolkit}" \ |
101 |
+ --x-includes="${ESYSROOT}"/usr/include \ |
102 |
+ --x-libraries="${ESYSROOT}"/usr/$(get_libdir) |
103 |
+} |
104 |
+ |
105 |
+src_compile() { |
106 |
+ emake kpathsea_dir="${EPREFIX}"/usr/include/kpathsea |
107 |
+ |
108 |
+ use emacs && elisp-compile xdvi-search.el |
109 |
+} |
110 |
+ |
111 |
+src_install() { |
112 |
+ dodir /usr/share/texmf-dist/dvips/config |
113 |
+ |
114 |
+ emake DESTDIR="${D}" install |
115 |
+ |
116 |
+ dosym ../../texmf-dist/xdvi/XDvi /usr/share/X11/app-defaults/XDvi |
117 |
+ |
118 |
+ dodoc BUGS FAQ README.* |
119 |
+ |
120 |
+ use emacs && elisp-install tex-utils *.el *.elc |
121 |
+ |
122 |
+ doicon "${FILESDIR}"/${PN}.xpm |
123 |
+ make_desktop_entry xdvi "XDVI" xdvik "Graphics;Viewer" |
124 |
+ echo "MimeType=application/x-dvi;" >> "${ED}"/usr/share/applications/xdvi-"${PN}".desktop |
125 |
+} |
126 |
+ |
127 |
+pkg_postinst() { |
128 |
+ xdg_pkg_postinst |
129 |
+ |
130 |
+ if use emacs; then |
131 |
+ elog "Add" |
132 |
+ elog " (add-to-list 'load-path \"${EPREFIX}${SITELISP}/tex-utils\")" |
133 |
+ elog " (require 'xdvi-search)" |
134 |
+ elog "to your ~/.emacs file" |
135 |
+ fi |
136 |
+} |