--- /dev/null
+--- 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"]))
-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
-# 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/"
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
}