Gentoo Archives: gentoo-commits

From: Ben Kohler <bkohler@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/links/
Date: Mon, 22 Nov 2021 17:38:02
Message-Id: 1637602651.43964fb5582198d01faf181e7a814cd38c7324d3.bkohler@gentoo
1 commit: 43964fb5582198d01faf181e7a814cd38c7324d3
2 Author: Ben Kohler <bkohler <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 22 17:36:57 2021 +0000
4 Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 22 17:37:31 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43964fb5
7
8 www-client/links: add include path for freetype
9
10 Bug: https://bugs.gentoo.org/825318
11 Package-Manager: Portage-3.0.28, Repoman-3.0.3
12 Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>
13
14 www-client/links/links-2.25-r2.ebuild | 173 ++++++++++++++++++++++++++++++++++
15 1 file changed, 173 insertions(+)
16
17 diff --git a/www-client/links/links-2.25-r2.ebuild b/www-client/links/links-2.25-r2.ebuild
18 new file mode 100644
19 index 000000000000..46cc889e2924
20 --- /dev/null
21 +++ b/www-client/links/links-2.25-r2.ebuild
22 @@ -0,0 +1,173 @@
23 +# Copyright 1999-2021 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=8
27 +
28 +inherit autotools desktop xdg-utils
29 +
30 +DESCRIPTION="A fast and lightweight web browser running in both graphics and text mode"
31 +HOMEPAGE="http://links.twibright.com/"
32 +SRC_URI="http://${PN}.twibright.com/download/${P}.tar.bz2"
33 +
34 +LICENSE="GPL-2"
35 +SLOT="2"
36 +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"
37 +IUSE="brotli bzip2 fbcon freetype gpm ipv6 jpeg libevent livecd lzip lzma ssl suid svga tiff unicode X zlib zstd"
38 +
39 +GRAPHICS_DEPEND="media-libs/libpng:0="
40 +
41 +RDEPEND="
42 + dev-libs/libbsd
43 + brotli? (
44 + app-arch/brotli
45 + )
46 + bzip2? (
47 + app-arch/bzip2
48 + )
49 + fbcon? (
50 + ${GRAPHICS_DEPEND}
51 + )
52 + freetype? (
53 + media-libs/fontconfig
54 + media-libs/freetype
55 + )
56 + gpm? (
57 + sys-libs/gpm
58 + )
59 + jpeg? (
60 + virtual/jpeg:0
61 + )
62 + libevent? (
63 + dev-libs/libevent:0=
64 + )
65 + livecd? (
66 + ${GRAPHICS_DEPEND}
67 + sys-libs/gpm
68 + virtual/jpeg:0
69 + )
70 + lzip? (
71 + app-arch/lzip
72 + )
73 + lzma? (
74 + app-arch/xz-utils
75 + )
76 + ssl? (
77 + dev-libs/openssl:0=
78 + )
79 + svga? (
80 + ${GRAPHICS_DEPEND}
81 + media-libs/svgalib
82 + )
83 + tiff? (
84 + media-libs/tiff:0
85 + )
86 + X? (
87 + ${GRAPHICS_DEPEND}
88 + x11-libs/libXext
89 + )
90 + zlib? (
91 + sys-libs/zlib
92 + )
93 + zstd? (
94 + app-arch/zstd
95 + )"
96 +
97 +DEPEND="${RDEPEND}
98 + fbcon? ( virtual/os-headers )
99 + livecd? ( virtual/os-headers )"
100 +
101 +BDEPEND="virtual/pkgconfig"
102 +
103 +IDEPEND="X? ( dev-util/desktop-file-utils )"
104 +
105 +REQUIRED_USE="!livecd? ( fbcon? ( gpm ) )
106 + svga? ( suid )"
107 +
108 +DOCS=( AUTHORS BRAILLE_HOWTO ChangeLog KEYS NEWS README SITES )
109 +
110 +src_prepare() {
111 + use X && xdg_environment_reset
112 +
113 + if use unicode; then
114 + pushd intl > /dev/null || die
115 + ./gen-intl || die
116 + ./synclang || die
117 + popd > /dev/null || die
118 + fi
119 +
120 + # error: conditional "am__fastdepCXX" was never defined (for eautoreconf)
121 + sed -i \
122 + -e '/AC_PROG_CXX/s:dnl ::' \
123 + -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
124 + configure.in || die #467020
125 +
126 + # Upstream configure produced by broken autoconf-2.13. This also fixes
127 + # toolchain detection.
128 + mv configure.in configure.ac || die
129 +
130 + default
131 + eautoreconf #131440 and #103483#c23
132 +}
133 +
134 +src_configure() {
135 + local myconf
136 +
137 + if use livecd; then
138 + export ac_cv_lib_gpm_Gpm_Open=yes
139 + myconf+=' --with-fb --with-libjpeg'
140 + else
141 + export ac_cv_lib_gpm_Gpm_Open=$(usex gpm)
142 + fi
143 +
144 + if use X || use fbcon || use svga || use livecd; then
145 + myconf+=' --enable-graphics'
146 + fi
147 +
148 + use freetype && append-cppflags -I${ESYSROOT}/usr/include/freetype2
149 +
150 + econf \
151 + --without-directfb \
152 + --without-librsvg \
153 + $(use_with brotli) \
154 + $(use_with bzip2) \
155 + $(use_with fbcon fb) \
156 + $(use_with freetype) \
157 + $(use_with ipv6) \
158 + $(use_with jpeg libjpeg) \
159 + $(use_with libevent) \
160 + $(use_with lzip) \
161 + $(use_with lzma) \
162 + $(use_with ssl) \
163 + $(use_with svga svgalib) \
164 + $(use_with tiff libtiff) \
165 + $(use_with X x) \
166 + $(use_with zlib) \
167 + $(use_with zstd) \
168 + ${myconf}
169 +}
170 +
171 +src_install() {
172 + HTML_DOCS="doc/links_cal/*"
173 + default
174 +
175 + if use X; then
176 + newicon Links_logo.png links.png
177 + make_desktop_entry 'links -g %u' Links links 'Network;WebBrowser'
178 + local d="${ED}"/usr/share/applications
179 + echo 'MimeType=x-scheme-handler/http;' >> "${d}"/*.desktop || die
180 + if use ssl; then
181 + sed -i -e 's:x-scheme-handler/http;:&x-scheme-handler/https;:' \
182 + "${d}"/*.desktop || die
183 + fi
184 + fi
185 +
186 + use suid && fperms 4755 /usr/bin/links
187 +}
188 +
189 +pkg_postinst() {
190 + use X && xdg_desktop_database_update
191 +}
192 +
193 +pkg_postrm() {
194 + use X && xdg_desktop_database_update
195 +}