summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-05-04 12:34:09 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-05-04 12:34:09 +0200
commita55a7a76e2f26f9d0ba4379134dd6c8a9d4a14c0 (patch)
tree9df3996ba32b350197106a75295b57817909b9b1 /app-misc/g15composer
parentmedia-libs/sdl2-ttf: Use pkg-config to search for freetype. (diff)
downloadgentoo-a55a7a76e2f26f9d0ba4379134dd6c8a9d4a14c0.tar.gz
gentoo-a55a7a76e2f26f9d0ba4379134dd6c8a9d4a14c0.tar.bz2
gentoo-a55a7a76e2f26f9d0ba4379134dd6c8a9d4a14c0.zip
app-misc/g15composer: Don't use freetype-config
Package-Manager: Portage-2.3.35, Repoman-2.3.9
Diffstat (limited to 'app-misc/g15composer')
-rw-r--r--app-misc/g15composer/files/g15composer-3.2-freetype_pkgconfig.patch44
-rw-r--r--app-misc/g15composer/g15composer-3.2.ebuild26
2 files changed, 62 insertions, 8 deletions
diff --git a/app-misc/g15composer/files/g15composer-3.2-freetype_pkgconfig.patch b/app-misc/g15composer/files/g15composer-3.2-freetype_pkgconfig.patch
new file mode 100644
index 000000000000..9251e139322d
--- /dev/null
+++ b/app-misc/g15composer/files/g15composer-3.2-freetype_pkgconfig.patch
@@ -0,0 +1,44 @@
+--- g15composer-3.2/configure.in
++++ g15composer-3.2/configure.in
+@@ -14,24 +14,24 @@
+ AC_PROG_YACC
+
+ # 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_CHECK_LIB([g15render], [g15r_ttfLoad],
+- AC_DEFINE(TTF_SUPPORT, [1], [Define to 1 to enable FreeType2 support])
+- CFLAGS="$CFLAGS `freetype-config --cflags`"
+- CXXFLAGS="$CXXFLAGS `freetype-config --cflags`"
+- FTLIB="-lfreetype"
+- ttf_support="yes",
+- AC_MSG_ERROR(["libg15render does not support ttf functions. please reconfigure with --enable-ttf"])
+- ttf_support="no"
+- )
+- 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,
++ [
++ CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
++ CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
++ FTLIB="$FREETYPE_LIBS"
++ ],
++ AC_MSG_ERROR([Cannot find freetype2])
++ )
++ AC_CHECK_LIB([g15render], [g15r_ttfLoad],
++ AC_DEFINE(TTF_SUPPORT, [1], [Define to 1 to enable FreeType2 support]),
++ AC_MSG_ERROR(["libg15render does not support ttf functions. please reconfigure with --enable-ttf"])
++ )
++],
++ AC_MSG_RESULT(No Freetype is being used)
+ )
+-AC_MSG_RESULT($ttf_support)
+
+ # Checks for libraries.
+ AC_CHECK_LIB([g15daemon_client], [g15_send], ,AC_MSG_ERROR(["libg15daemon_client not found. please install it"]))
diff --git a/app-misc/g15composer/g15composer-3.2.ebuild b/app-misc/g15composer/g15composer-3.2.ebuild
index 0ff4c93f649f..8614765071cb 100644
--- a/app-misc/g15composer/g15composer-3.2.ebuild
+++ b/app-misc/g15composer/g15composer-3.2.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=2
-inherit eutils
+EAPI=6
+
+inherit autotools
DESCRIPTION="A library to render text and shapes into a buffer usable by the Logitech G15"
HOMEPAGE="https://sourceforge.net/projects/g15tools/"
@@ -15,21 +16,30 @@ IUSE="truetype examples"
DEPEND="app-misc/g15daemon
>=dev-libs/libg15render-1.2[truetype?]
+ virtual/pkgconfig
truetype? ( media-libs/freetype )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2-freetype_pkgconfig.patch
+)
+
+src_prepare() {
+ default
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
src_configure() {
- econf \
- $(use_enable truetype ttf)
+ econf $(use_enable truetype ttf)
}
src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
+ local DOCS=( AUTHORS README ChangeLog )
+ default
newinitd "${FILESDIR}/${P}.initd" ${PN}
newconfd "${FILESDIR}/${P}.confd" ${PN}
- dodoc AUTHORS README ChangeLog
-
if use examples ; then
exeinto "/usr/share/${PN}"
doexe examples/*