gnustep-base/mknfonts: use pkg-config to find freetype
authorBernard Cafarelli <voyageur@gentoo.org>
Fri, 29 Jun 2018 09:39:04 +0000 (11:39 +0200)
committerBernard Cafarelli <voyageur@gentoo.org>
Fri, 29 Jun 2018 09:39:21 +0000 (11:39 +0200)
Closes: https://bugs.gentoo.org/659374
Package-Manager: Portage-2.3.41, Repoman-2.3.9

gnustep-base/mknfonts/files/mknfonts-0.5-pkgconfig.patch [new file with mode: 0644]
gnustep-base/mknfonts/mknfonts-0.5-r3.ebuild [new file with mode: 0644]

diff --git a/gnustep-base/mknfonts/files/mknfonts-0.5-pkgconfig.patch b/gnustep-base/mknfonts/files/mknfonts-0.5-pkgconfig.patch
new file mode 100644 (file)
index 0000000..e73bac5
--- /dev/null
@@ -0,0 +1,14 @@
+diff -Naur mknfonts-0.5.orig/GNUmakefile mknfonts-0.5/GNUmakefile
+--- mknfonts-0.5.orig/GNUmakefile      2002-09-28 12:27:26.000000000 +0200
++++ mknfonts-0.5/GNUmakefile   2018-06-29 11:27:01.871588321 +0200
+@@ -9,8 +9,8 @@
+ ADDITIONAL_OBJCFLAGS += -Wall -O2
+-ADDITIONAL_INCLUDE_DIRS += `freetype-config --cflags`
+-ADDITIONAL_LDFLAGS += `freetype-config --libs`
++ADDITIONAL_INCLUDE_DIRS += `pkg-config --cflags freetype2`
++ADDITIONAL_LDFLAGS += `pkg-config --libs freetype2`
+ mknfonts_OBJC_FILES = mknfonts.m
diff --git a/gnustep-base/mknfonts/mknfonts-0.5-r3.ebuild b/gnustep-base/mknfonts/mknfonts-0.5-r3.ebuild
new file mode 100644 (file)
index 0000000..af49577
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit gnustep-base
+
+DESCRIPTION="A tool to create .nfont packages for use with gnustep-back-art"
+HOMEPAGE="https://packages.debian.org/mknfonts.tool"
+SRC_URI="mirror://debian/pool/main/m/${PN}.tool/${PN}.tool_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE=""
+
+RDEPEND="gnustep-base/gnustep-gui
+       >=media-libs/freetype-2.1"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-rename.patch
+       "${FILESDIR}"/${P}-pkgconfig.patch
+)
+
+src_prepare() {
+       default
+
+       # Correct link command for --as-needed
+       sed -i -e "s/ADDITIONAL_LDFLAGS/ADDITIONAL_TOOL_LIBS/" GNUmakefile || die
+}