1 |
commit: d4fe989f5fef08990bb2ae6535b33563597c4f58 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 4 10:54:18 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 4 10:57:28 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4fe989f |
7 |
|
8 |
dev-libs/libg15render: Don't use freetype-config |
9 |
|
10 |
Package-Manager: Portage-2.3.35, Repoman-2.3.9 |
11 |
|
12 |
.../libg15render-1.2-freetype_pkgconfig.patch | 35 ++++++++++++++++++++++ |
13 |
.../files/libg15render-1.2-pixel-c.patch | 24 ++++++++------- |
14 |
dev-libs/libg15render/libg15render-1.2-r2.ebuild | 30 ++++++++++++------- |
15 |
3 files changed, 69 insertions(+), 20 deletions(-) |
16 |
|
17 |
diff --git a/dev-libs/libg15render/files/libg15render-1.2-freetype_pkgconfig.patch b/dev-libs/libg15render/files/libg15render-1.2-freetype_pkgconfig.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..83df9fa4f0f |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/libg15render/files/libg15render-1.2-freetype_pkgconfig.patch |
22 |
@@ -0,0 +1,35 @@ |
23 |
+--- libg15render-1.2/configure.in |
24 |
++++ libg15render-1.2/configure.in |
25 |
+@@ -13,19 +13,20 @@ |
26 |
+ AC_PROG_LIBTOOL |
27 |
+ |
28 |
+ # Checks for --enable args |
29 |
+-AC_MSG_CHECKING(whether to enable FreeType2 support) |
30 |
+-AC_ARG_ENABLE(ttf, [ --enable-ttf enable FreeType2 support], |
31 |
+- if [[[ "$enableval" = "yes" ]]]; then |
32 |
+- AC_DEFINE(TTF_SUPPORT, [1], [Define to 1 to enable FreeType2 support]) |
33 |
+- CFLAGS="$CFLAGS `freetype-config --cflags`" |
34 |
+- FTLIB="-lfreetype" |
35 |
+- ttf_support="yes" |
36 |
+- else |
37 |
+- ttf_support="no" |
38 |
+- fi, |
39 |
+- ttf_support="no" |
40 |
++AC_ARG_ENABLE(ttf, [ --enable-ttf enable FreeType2 support],,enable_ttf=no) |
41 |
++AS_IF([test "x$enable_ttf" = "xyes"], [ |
42 |
++ PKG_PROG_PKG_CONFIG |
43 |
++ PKG_CHECK_MODULES(FREETYPE, freetype2, |
44 |
++ [ |
45 |
++ AC_DEFINE(TTF_SUPPORT, [1], [Define to 1 to enable FreeType2 support]) |
46 |
++ CFLAGS="$CFLAGS $FREETYPE_CFLAGS" |
47 |
++ FTLIB="$FREETYPE_LIBS" |
48 |
++ ], |
49 |
++ AC_MSG_ERROR([Cannot find freetype2]) |
50 |
++ ) |
51 |
++], |
52 |
++ AC_MSG_RESULT(No Freetype is being used) |
53 |
+ ) |
54 |
+-AC_MSG_RESULT($ttf_support) |
55 |
+ |
56 |
+ # Checks for libraries. |
57 |
+ AC_CHECK_LIB([g15], [writePixmapToLCD], ,AC_MSG_ERROR(["libg15 not found. please install it"])) |
58 |
|
59 |
diff --git a/dev-libs/libg15render/files/libg15render-1.2-pixel-c.patch b/dev-libs/libg15render/files/libg15render-1.2-pixel-c.patch |
60 |
index 3f7ecc2ff7b..9b1ab60860b 100644 |
61 |
--- a/dev-libs/libg15render/files/libg15render-1.2-pixel-c.patch |
62 |
+++ b/dev-libs/libg15render/files/libg15render-1.2-pixel-c.patch |
63 |
@@ -1,19 +1,23 @@ |
64 |
-dev-libs/libg15render-1.2: |
65 |
- |
66 |
* QA Notice: Package has poor programming practices which may compile |
67 |
* fine but exhibit random runtime failures. |
68 |
* pixel.c:356: warning: incompatible implicit declaration of built-in function 'ceil' |
69 |
- |
70 |
- |
71 |
-Should be fixed by including math.h: |
72 |
- |
73 |
---- libg15render-1.2_old/pixel.c 2007-03-14 23:37:42.000000000 +0100 |
74 |
-+++ libg15render-1.2/pixel.c 2007-03-14 23:36:29.000000000 +0100 |
75 |
-@@ -17,6 +17,7 @@ |
76 |
+ |
77 |
+Should be fixed by including math.h |
78 |
+ |
79 |
+ * QA Notice: Package triggers severe warnings which indicate that it |
80 |
+ * may exhibit random runtime failures. |
81 |
+ * pixel.c:504:16: warning: incompatible implicit declaration of built-in function ‘malloc’ |
82 |
+ |
83 |
+Should be fixed by including stdlib.h |
84 |
+ |
85 |
+--- libg15render-1.2/pixel.c |
86 |
++++ libg15render-1.2/pixel.c |
87 |
+@@ -17,6 +17,8 @@ |
88 |
*/ |
89 |
|
90 |
#include <fcntl.h> |
91 |
++#include <stdlib.h> |
92 |
+#include <math.h> |
93 |
#include "libg15render.h" |
94 |
|
95 |
- void |
96 |
\ No newline at end of file |
97 |
+ void |
98 |
|
99 |
diff --git a/dev-libs/libg15render/libg15render-1.2-r2.ebuild b/dev-libs/libg15render/libg15render-1.2-r2.ebuild |
100 |
index 61782d60444..816da20255e 100644 |
101 |
--- a/dev-libs/libg15render/libg15render-1.2-r2.ebuild |
102 |
+++ b/dev-libs/libg15render/libg15render-1.2-r2.ebuild |
103 |
@@ -1,9 +1,9 @@ |
104 |
-# Copyright 1999-2017 Gentoo Foundation |
105 |
+# Copyright 1999-2018 Gentoo Foundation |
106 |
# Distributed under the terms of the GNU General Public License v2 |
107 |
|
108 |
-EAPI=4 |
109 |
+EAPI=6 |
110 |
|
111 |
-inherit eutils |
112 |
+inherit autotools |
113 |
|
114 |
DESCRIPTION="Small library for display text and graphics on a Logitech G15 keyboard" |
115 |
HOMEPAGE="https://sourceforge.net/projects/g15tools/" |
116 |
@@ -19,22 +19,32 @@ RDEPEND=" |
117 |
dev-libs/libg15 |
118 |
truetype? ( media-libs/freetype ) |
119 |
" |
120 |
-DEPEND=${RDEPEND} |
121 |
+DEPEND="${RDEPEND} |
122 |
+ truetype? ( virtual/pkgconfig )" |
123 |
+ |
124 |
+PATCHES=( |
125 |
+ "${FILESDIR}/${P}-pixel-c.patch" |
126 |
+ "${FILESDIR}/${P}-freetype_pkgconfig.patch" |
127 |
+) |
128 |
|
129 |
src_prepare() { |
130 |
- epatch "${FILESDIR}/${P}-pixel-c.patch" |
131 |
+ default |
132 |
+ mv configure.{in,ac} || die |
133 |
+ eautoreconf |
134 |
} |
135 |
|
136 |
src_configure() { |
137 |
- econf \ |
138 |
- --disable-static \ |
139 |
+ local myeconfargs=( |
140 |
+ --disable-static |
141 |
$(use_enable truetype ttf ) |
142 |
+ ) |
143 |
+ econf "${myeconfargs[@]}" |
144 |
} |
145 |
|
146 |
src_install() { |
147 |
emake DESTDIR="${D}" \ |
148 |
- docdir=/usr/share/doc/${PF} install || die "make install failed" |
149 |
- rm "${ED}/usr/share/doc/${PF}/COPYING" |
150 |
+ docdir=/usr/share/doc/${PF} install |
151 |
+ rm "${ED%/}/usr/share/doc/${PF}/COPYING" |
152 |
|
153 |
- find "${ED}" -name '*.la' -exec rm -f {} + |
154 |
+ find "${ED}" -name '*.la' -delete || die |
155 |
} |