summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2018-05-07 22:38:29 +0200
committerUlrich Müller <ulm@gentoo.org>2018-05-07 22:39:36 +0200
commit5f25b107a225e0820086bc481d5cf9a6744872b9 (patch)
treeafb1ad2586d6b8ade5d9489c827bf480e364d697 /app-text/dvipng
parentsci-visualization/gnuplot: Remove old. (diff)
downloadgentoo-5f25b107a225e0820086bc481d5cf9a6744872b9.tar.gz
gentoo-5f25b107a225e0820086bc481d5cf9a6744872b9.tar.bz2
gentoo-5f25b107a225e0820086bc481d5cf9a6744872b9.zip
app-text/dvipng: Use pkg-config instead of freetype-config.
Closes: https://bugs.gentoo.org/655132 Package-Manager: Portage-2.3.36, Repoman-2.3.9
Diffstat (limited to 'app-text/dvipng')
-rw-r--r--app-text/dvipng/dvipng-1.15-r1.ebuild49
-rw-r--r--app-text/dvipng/files/dvipng-1.15-freetype-config.patch12
2 files changed, 61 insertions, 0 deletions
diff --git a/app-text/dvipng/dvipng-1.15-r1.ebuild b/app-text/dvipng/dvipng-1.15-r1.ebuild
new file mode 100644
index 000000000000..1b3506f379f4
--- /dev/null
+++ b/app-text/dvipng/dvipng-1.15-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="Translate DVI files into PNG or GIF graphics"
+HOMEPAGE="http://dvipng.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-3+ Texinfo-manual"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="truetype test"
+
+RDEPEND="
+ >=dev-libs/kpathsea-6.2.1:=
+ media-libs/gd:2=[jpeg,png]
+ media-libs/libpng:0=
+ virtual/latex-base
+ sys-libs/zlib
+ truetype? ( >=media-libs/freetype-2.1.5 )"
+DEPEND="${RDEPEND}
+ virtual/texi2dvi
+ virtual/pkgconfig
+ test? ( dev-texlive/texlive-fontsrecommended )"
+
+DOCS="ChangeLog README RELEASE"
+
+src_prepare() {
+ eapply "${FILESDIR}"/${P}-freetype-config.patch
+ eapply_user
+
+ # save local macros, since we regenerate aclocal.m4 below
+ mv aclocal.m4 mylocal.m4 || die
+ AT_M4DIR=. eautoreconf
+}
+
+src_configure() {
+ append-cppflags "$($(tc-getPKG_CONFIG) --cflags kpathsea)"
+ if ! use truetype; then
+ sed -i -e 's/\(--exists.*\)freetype2/\1dIsAbLe/' configure \
+ || die "sed failed"
+ fi
+
+ export VARTEXFONTS="${T}/fonts"
+ econf
+}
diff --git a/app-text/dvipng/files/dvipng-1.15-freetype-config.patch b/app-text/dvipng/files/dvipng-1.15-freetype-config.patch
new file mode 100644
index 000000000000..20b7ebaf465c
--- /dev/null
+++ b/app-text/dvipng/files/dvipng-1.15-freetype-config.patch
@@ -0,0 +1,12 @@
+--- dvipng-1.15-orig/configure.ac
++++ dvipng-1.15/configure.ac
+@@ -78,7 +78,8 @@
+ AC_CHECK_HEADERS([libgen.h])
+ PSFONTS_O=""
+ AC_SUBST(PSFONTS_O)
+-AC_CHECK_FT2(,[CFLAGS="$FT2_CFLAGS $CFLAGS"
++PKG_CHECK_MODULES([FT2], [freetype2 >= 6.1.0],
++ [CFLAGS="$FT2_CFLAGS $CFLAGS"
+ LIBS="$FT2_LIBS $LIBS"
+ PSFONTS_O="sfd.o ft.o enc.o fontmap.o tfm.o"
+ AC_DEFINE(HAVE_FT2, 1, [Define to 1 if you have freetype2])