summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-05-04 12:54:18 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-05-04 12:57:28 +0200
commitd4fe989f5fef08990bb2ae6535b33563597c4f58 (patch)
tree0de3ac99ec45f372f5215858ef4fc75f8aa30f08 /dev-libs/libg15render
parentapp-admin/tripwire: amd64 stable wrt bug #654530 (diff)
downloadgentoo-d4fe989f5fef08990bb2ae6535b33563597c4f58.tar.gz
gentoo-d4fe989f5fef08990bb2ae6535b33563597c4f58.tar.bz2
gentoo-d4fe989f5fef08990bb2ae6535b33563597c4f58.zip
dev-libs/libg15render: Don't use freetype-config
Package-Manager: Portage-2.3.35, Repoman-2.3.9
Diffstat (limited to 'dev-libs/libg15render')
-rw-r--r--dev-libs/libg15render/files/libg15render-1.2-freetype_pkgconfig.patch35
-rw-r--r--dev-libs/libg15render/files/libg15render-1.2-pixel-c.patch24
-rw-r--r--dev-libs/libg15render/libg15render-1.2-r2.ebuild30
3 files changed, 69 insertions, 20 deletions
diff --git a/dev-libs/libg15render/files/libg15render-1.2-freetype_pkgconfig.patch b/dev-libs/libg15render/files/libg15render-1.2-freetype_pkgconfig.patch
new file mode 100644
index 000000000000..83df9fa4f0fa
--- /dev/null
+++ b/dev-libs/libg15render/files/libg15render-1.2-freetype_pkgconfig.patch
@@ -0,0 +1,35 @@
+--- libg15render-1.2/configure.in
++++ libg15render-1.2/configure.in
+@@ -13,19 +13,20 @@
+ AC_PROG_LIBTOOL
+
+ # Checks for --enable args
+-AC_MSG_CHECKING(whether to enable FreeType2 support)
+-AC_ARG_ENABLE(ttf, [ --enable-ttf enable FreeType2 support],
+- if [[[ "$enableval" = "yes" ]]]; then
+- AC_DEFINE(TTF_SUPPORT, [1], [Define to 1 to enable FreeType2 support])
+- CFLAGS="$CFLAGS `freetype-config --cflags`"
+- FTLIB="-lfreetype"
+- ttf_support="yes"
+- else
+- ttf_support="no"
+- fi,
+- ttf_support="no"
++AC_ARG_ENABLE(ttf, [ --enable-ttf enable FreeType2 support],,enable_ttf=no)
++AS_IF([test "x$enable_ttf" = "xyes"], [
++ PKG_PROG_PKG_CONFIG
++ PKG_CHECK_MODULES(FREETYPE, freetype2,
++ [
++ AC_DEFINE(TTF_SUPPORT, [1], [Define to 1 to enable FreeType2 support])
++ CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
++ FTLIB="$FREETYPE_LIBS"
++ ],
++ AC_MSG_ERROR([Cannot find freetype2])
++ )
++],
++ AC_MSG_RESULT(No Freetype is being used)
+ )
+-AC_MSG_RESULT($ttf_support)
+
+ # Checks for libraries.
+ AC_CHECK_LIB([g15], [writePixmapToLCD], ,AC_MSG_ERROR(["libg15 not found. please install it"]))
diff --git a/dev-libs/libg15render/files/libg15render-1.2-pixel-c.patch b/dev-libs/libg15render/files/libg15render-1.2-pixel-c.patch
index 3f7ecc2ff7b2..9b1ab60860b8 100644
--- a/dev-libs/libg15render/files/libg15render-1.2-pixel-c.patch
+++ b/dev-libs/libg15render/files/libg15render-1.2-pixel-c.patch
@@ -1,19 +1,23 @@
-dev-libs/libg15render-1.2:
-
* QA Notice: Package has poor programming practices which may compile
* fine but exhibit random runtime failures.
* pixel.c:356: warning: incompatible implicit declaration of built-in function 'ceil'
-
-
-Should be fixed by including math.h:
-
---- libg15render-1.2_old/pixel.c 2007-03-14 23:37:42.000000000 +0100
-+++ libg15render-1.2/pixel.c 2007-03-14 23:36:29.000000000 +0100
-@@ -17,6 +17,7 @@
+
+Should be fixed by including math.h
+
+ * QA Notice: Package triggers severe warnings which indicate that it
+ * may exhibit random runtime failures.
+ * pixel.c:504:16: warning: incompatible implicit declaration of built-in function ‘malloc’
+
+Should be fixed by including stdlib.h
+
+--- libg15render-1.2/pixel.c
++++ libg15render-1.2/pixel.c
+@@ -17,6 +17,8 @@
*/
#include <fcntl.h>
++#include <stdlib.h>
+#include <math.h>
#include "libg15render.h"
- void \ No newline at end of file
+ void
diff --git a/dev-libs/libg15render/libg15render-1.2-r2.ebuild b/dev-libs/libg15render/libg15render-1.2-r2.ebuild
index 61782d60444a..816da20255ea 100644
--- a/dev-libs/libg15render/libg15render-1.2-r2.ebuild
+++ b/dev-libs/libg15render/libg15render-1.2-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=6
-inherit eutils
+inherit autotools
DESCRIPTION="Small library for display text and graphics on a Logitech G15 keyboard"
HOMEPAGE="https://sourceforge.net/projects/g15tools/"
@@ -19,22 +19,32 @@ RDEPEND="
dev-libs/libg15
truetype? ( media-libs/freetype )
"
-DEPEND=${RDEPEND}
+DEPEND="${RDEPEND}
+ truetype? ( virtual/pkgconfig )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-pixel-c.patch"
+ "${FILESDIR}/${P}-freetype_pkgconfig.patch"
+)
src_prepare() {
- epatch "${FILESDIR}/${P}-pixel-c.patch"
+ default
+ mv configure.{in,ac} || die
+ eautoreconf
}
src_configure() {
- econf \
- --disable-static \
+ local myeconfargs=(
+ --disable-static
$(use_enable truetype ttf )
+ )
+ econf "${myeconfargs[@]}"
}
src_install() {
emake DESTDIR="${D}" \
- docdir=/usr/share/doc/${PF} install || die "make install failed"
- rm "${ED}/usr/share/doc/${PF}/COPYING"
+ docdir=/usr/share/doc/${PF} install
+ rm "${ED%/}/usr/share/doc/${PF}/COPYING"
- find "${ED}" -name '*.la' -exec rm -f {} +
+ find "${ED}" -name '*.la' -delete || die
}