1 |
commit: a5d62a3560a1d960c641722879d33e94ceb28926 |
2 |
Author: Michael Weber <xmw <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 28 20:51:14 2017 +0000 |
4 |
Commit: Michael Weber <xmw <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 28 20:51:31 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5d62a35 |
7 |
|
8 |
app-text/llpp: Version bump. |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
app-text/llpp/Manifest | 1 + |
13 |
app-text/llpp/files/llpp-26b-WM_CLASS.patch | 41 ++++++++++++++ |
14 |
app-text/llpp/llpp-26b.ebuild | 86 +++++++++++++++++++++++++++++ |
15 |
3 files changed, 128 insertions(+) |
16 |
|
17 |
diff --git a/app-text/llpp/Manifest b/app-text/llpp/Manifest |
18 |
index abff6c4dd4e..cbc881550cc 100644 |
19 |
--- a/app-text/llpp/Manifest |
20 |
+++ b/app-text/llpp/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST llpp-23.tar.gz 159922 SHA256 83bf72ad88f0532a0163a6dc9bd285ad5ce8604116ec64764738cdb066748927 SHA512 ef89bead66c22ed218a4f7eb06f6f7d9b1d48f6ab6ef4785a5dc73ad486cdf4a5b1131a8a8cec9020e9caa14468528d9f27c88a29ab221e13c9c55616d20c296 WHIRLPOOL e2c5468b744e71036745de63e9172b32cfa7cb2aae3c61c2a71d0ffe8b3a8b0e2502ff300d1a23446619353c6e43b7b6e051a6126ddc45b1997213c67cfd2764 |
23 |
+DIST llpp-26b.tar.gz 169385 SHA256 1c14c794cefddc38c2acb72233ded21380184333571c9b2b01cfc108c9068798 SHA512 ce7d743d8ec998a93cf272083dc5926ce6a250aee6ac768814f511ecb309ffe94fb0e2561ca1778e1c7fbd5824545477937618c8e66d32fd273f9b5e5e3fd143 WHIRLPOOL 2f5c85d56cf1ba3c33012fe7c9b783fb343b752a28ffef56bef2e82d560489e55f0fe090261f6582fc1a28fad0b5260e1dc7abe3e106ed24b74ff355def6cb0b |
24 |
|
25 |
diff --git a/app-text/llpp/files/llpp-26b-WM_CLASS.patch b/app-text/llpp/files/llpp-26b-WM_CLASS.patch |
26 |
new file mode 100644 |
27 |
index 00000000000..e99d9a4e4e5 |
28 |
--- /dev/null |
29 |
+++ b/app-text/llpp/files/llpp-26b-WM_CLASS.patch |
30 |
@@ -0,0 +1,41 @@ |
31 |
+--- llpp-26b/link.c |
32 |
++++ llpp-26b/link.c |
33 |
+@@ -4392,6 +4392,31 @@ |
34 |
+ return caml_copy_string (FZ_VERSION); |
35 |
+ } |
36 |
+ |
37 |
++#if !defined (_WIN32) && !defined (__APPLE__) |
38 |
++#undef pixel |
39 |
++#include <X11/X.h> |
40 |
++#include <X11/Xlib.h> |
41 |
++#include <X11/Xutil.h> |
42 |
++#include <GL/glx.h> |
43 |
++ |
44 |
++static void set_wm_class (void) |
45 |
++{ |
46 |
++ Display *dpy; |
47 |
++ Window win; |
48 |
++ XClassHint hint; |
49 |
++ |
50 |
++ dpy = XOpenDisplay (getenv ("DISPLAY")); |
51 |
++ DefaultScreen (dpy); |
52 |
++ hint.res_name = "llpp"; |
53 |
++ hint.res_class = "llpp"; |
54 |
++ win = glXGetCurrentDrawable (); |
55 |
++ XSetClassHint (dpy, win, &hint); |
56 |
++ XCloseDisplay (dpy); |
57 |
++} |
58 |
++#else |
59 |
++#define set_wm_class() |
60 |
++#endif |
61 |
++ |
62 |
+ CAMLprim void ml_init (value csock_v, value params_v) |
63 |
+ { |
64 |
+ CAMLparam2 (csock_v, params_v); |
65 |
+@@ -4460,5 +4485,6 @@ |
66 |
+ errx (1, "pthread_create: %s", strerror (ret)); |
67 |
+ } |
68 |
+ |
69 |
++ set_wm_class (); |
70 |
+ CAMLreturn0; |
71 |
+ } |
72 |
|
73 |
diff --git a/app-text/llpp/llpp-26b.ebuild b/app-text/llpp/llpp-26b.ebuild |
74 |
new file mode 100644 |
75 |
index 00000000000..fc38b4614cc |
76 |
--- /dev/null |
77 |
+++ b/app-text/llpp/llpp-26b.ebuild |
78 |
@@ -0,0 +1,86 @@ |
79 |
+# Copyright 1999-2017 Gentoo Foundation |
80 |
+# Distributed under the terms of the GNU General Public License v2 |
81 |
+ |
82 |
+EAPI=6 |
83 |
+ |
84 |
+inherit eutils multilib toolchain-funcs vcs-snapshot |
85 |
+ |
86 |
+DESCRIPTION="graphical PDF viewer which aims to superficially resemble less(1)" |
87 |
+HOMEPAGE="http://repo.or.cz/w/llpp.git" |
88 |
+SRC_URI="http://repo.or.cz/llpp.git/snapshot/606ca0f5b7d9c1f031e558c17d66591daa04e3a4.tar.gz -> ${P}.tar.gz" |
89 |
+ |
90 |
+LICENSE="GPL-3" |
91 |
+SLOT="0" |
92 |
+KEYWORDS="~amd64 ~ppc ~x86" |
93 |
+IUSE="+ocamlopt static" |
94 |
+ |
95 |
+LIB_DEPEND=">=app-text/mupdf-1.11:0=[static-libs] |
96 |
+ media-libs/openjpeg:2[static-libs] |
97 |
+ media-libs/fontconfig:1.0[static-libs] |
98 |
+ media-libs/freetype:2[static-libs] |
99 |
+ media-libs/jbig2dec[static-libs] |
100 |
+ sys-libs/zlib[static-libs] |
101 |
+ virtual/jpeg:0[static-libs] |
102 |
+ x11-libs/libX11[static-libs]" |
103 |
+RDEPEND="x11-misc/xsel |
104 |
+ !static? ( ${LIB_DEPEND//\[static-libs]} )" |
105 |
+DEPEND="${RDEPEND} |
106 |
+ static? ( ${LIB_DEPEND} |
107 |
+ app-arch/bzip2[static-libs] |
108 |
+ media-libs/libXcm[static-libs] |
109 |
+ x11-libs/libXau[static-libs] |
110 |
+ x11-libs/libXdmcp[static-libs] |
111 |
+ x11-libs/libXmu[static-libs] ) |
112 |
+ >=dev-lang/ocaml-4.02[ocamlopt?] |
113 |
+ dev-ml/lablgl[glut,ocamlopt?]" |
114 |
+ |
115 |
+RESTRICT="!ocamlopt? ( strip )" |
116 |
+ |
117 |
+PATCHES=( "${FILESDIR}"/${PN}-26b-WM_CLASS.patch ) |
118 |
+ |
119 |
+src_compile() { |
120 |
+ local ocaml=$(usex ocamlopt ocamlopt.opt ocamlc.opt) |
121 |
+ local cmo=$(usex ocamlopt cmx cmo) |
122 |
+ local cma=$(usex ocamlopt cmxa cma) |
123 |
+ local ccopt="$(freetype-config --cflags ) -O -include ft2build.h -D_GNU_SOURCE -DUSE_FONTCONFIG -std=c99 -Wextra -Wall -pedantic-errors -Wunused-parameter -Wsign-compare -Wshadow" |
124 |
+ if use static ; then |
125 |
+ local cclib="" |
126 |
+ local slib="" |
127 |
+ local spath=( ${EROOT}usr/$(get_libdir) $($(tc-getPKG_CONFIG) --libs-only-L --static mupdf x11 ${egl} | sed 's:-L::g') ) |
128 |
+ for slib in $($(tc-getPKG_CONFIG) --libs-only-l --static mupdf x11 ${egl} fontconfig) -ljpeg -ljbig2dec ; do |
129 |
+ case ${slib} in |
130 |
+ -lm|-ldl|-lpthread) |
131 |
+ einfo "${slib}: shared" |
132 |
+ cclib+="${slib} " ;; |
133 |
+ *) |
134 |
+ local ccnew=$(find ${spath} -name "lib${slib/-l}.a") |
135 |
+ einfo "${slib}: use ${ccnew}" |
136 |
+ cclib+="${ccnew} " ;; |
137 |
+ esac |
138 |
+ done |
139 |
+ else |
140 |
+ local cclib="$($(tc-getPKG_CONFIG) --libs mupdf x11 ${egl} fontconfig) -lpthread" |
141 |
+ fi |
142 |
+ |
143 |
+ verbose() { echo "$@" >&2 ; "$@" || die ; } |
144 |
+ verbose sh mkhelp.sh KEYS ${PV} > help.ml |
145 |
+ verbose printf 'let version ="%s";;\n' ${PV} >> help.ml |
146 |
+ verbose ${ocaml} -c -o link.o -ccopt "${ccopt}" link.c |
147 |
+ verbose ${ocaml} -c -o keys.${cmo} keys.ml |
148 |
+ verbose ${ocaml} -c -o help.${cmo} help.ml |
149 |
+ verbose ${ocaml} -c -o utils.${cmo} utils.ml |
150 |
+ verbose ${ocaml} -c -o wsi/x11/wsi.cmi wsi/x11/wsi.mli |
151 |
+ verbose ${ocaml} -c -o wsi/x11/wsi.${cmo} -I wsi/x11 wsi/x11/wsi.ml |
152 |
+ verbose ${ocaml} -c -o parser.${cmo} parser.ml |
153 |
+ verbose ${ocaml} -c -o config.${cmo} -I +lablGL -I wsi/x11 config.ml |
154 |
+ verbose ${ocaml} -c -o main.${cmo} -I +lablGL -I wsi/x11 main.ml |
155 |
+ verbose ${ocaml} $(usex ocamlopt "" -custom) -o llpp -I +lablGL -I wsi/x11 \ |
156 |
+ str.${cma} unix.${cma} lablgl.${cma} link.o \ |
157 |
+ -cclib "${cclib}" \ |
158 |
+ help.${cmo} utils.${cmo} parser.${cmo} wsi.${cmo} config.${cmo} main.${cmo} |
159 |
+} |
160 |
+ |
161 |
+src_install() { |
162 |
+ dobin ${PN} misc/${PN}ac |
163 |
+ dodoc KEYS README Thanks |
164 |
+} |