aboutsummaryrefslogtreecommitdiff
path: root/print/fontforge/Makefile
blob: 7d5d6554d068f4ab7a9a6bf85393ddd22a60a4cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Created by: KANOU Hiroki <kanou@khdd.net>
# $FreeBSD$

PORTNAME=	fontforge
DISTVERSION=	20141126
PORTREVISION=	1
CATEGORIES=	print
DISTFILES=	${PORTNAME}-${DISTVERSION}.tar.gz

MAINTAINER=	cyberbotx@cyberbotx.com
COMMENT=	Type 1/TrueType/OpenType/bitmap font editor

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	${LOCALBASE}/include/uthash.h:${PORTSDIR}/devel/uthash \
		${LOCALBASE}/bin/gnulib-tool:${PORTSDIR}/devel/gnulib
LIB_DEPENDS=	libuninameslist.so:${PORTSDIR}/textproc/libuninameslist \
		libtiff.so:${PORTSDIR}/graphics/tiff \
		libjpeg.so:${PORTSDIR}/graphics/jpeg \
		libpng.so:${PORTSDIR}/graphics/png \
		libgif.so:${PORTSDIR}/graphics/giflib \
		libspiro.so:${PORTSDIR}/graphics/libspiro \
		libfreetype.so:${PORTSDIR}/print/freetype2 \
		libltdl.so:${PORTSDIR}/devel/libltdl

USE_GITHUB=	yes
GH_ACCOUNT=	fontforge
GH_COMMIT=	2b4e6df

USES=		autoreconf:build desktop-file-utils execinfo gettext gmake iconv libtool pkgconfig python shared-mime-info
USE_XORG=	x11 xi ice xkbui
USE_GNOME=	glib20 gtk20 libxml2 pango
USE_AUTOTOOLS=	libtoolize

CONFIGURE_ARGS=	--enable-tile-path --enable-gtk2-use
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes
INSTALL_TARGET=	install-strip
INSTALLS_ICONS=	yes

PORTDOCS=	* .htaccess

OPTIONS_DEFINE=	DOCS FREETYPE CAIRO PYTHON
OPTIONS_SUB=	yes
FREETYPE_DESC=	Include freetype's internal debugger

PYTHON_CONFIGURE_ENABLE=	python-scripting python-extension

CAIRO_USE=	GNOME=cairo
CAIRO_CONFIGURE_WITH=	cairo

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MFREETYPE}
MASTER_SITES+=	http://sunsite.cnlab-switch.ch/ftp/mirror/freetype/freetype2/:freetype \
		http://www.funet.fi/pub/mirrors/ftp.freetype.org/freetype2/:freetype \
		http://ftp.sunet.se/pub/text-processing/freetype/freetype2/:freetype \
		${MASTER_SITE_RINGSERVER:S,%SUBDIR%,graphics/freetype/&,}:freetype \
		ftp://ftp.freetype.org/freetype/freetype2/:freetype
FREETYPE_VERSION=	2.5.4
FREETYPE_SRC=	freetype-${FREETYPE_VERSION}.tar.bz2
DISTFILES+=	${FREETYPE_SRC:C/$/:freetype/}
CONFIGURE_ARGS+=	--enable-freetype-debugger=${WRKDIR}/freetype-${FREETYPE_VERSION}
.else
CONFIGURE_ARGS+=	--disable-freetype-debugger
.endif

# Although USE_AUTOTOOLS=libtoolize is set above, I do not want to have the ports
# system run libtoolize, I run it in pre-configure. fontforge's bootstrap normally
# runs it and if it run later on, it causes the build process to fail.
run-autotools-libtoolize:
	@${TRUE}

# This is to get around calling fontforge's bootstrap script, as that script fails
# if git isn't installed on a system DESPITE there being a --skip-git argument that
# can be passed into it. autoreconf is called here because I want to run it without
# libtoolize being run along with it.
pre-configure:
	(cd ${WRKSRC} && \
		${SH} -c '. ./bootstrap.conf ; \
		${LIBTOOLIZE} -q ; \
		gnulib-tool --aux-dir=config --m4-base=m4 --libtool --symlink --import $${gnulib_modules}' ; \
		export LIBTOOLIZE=true ; ${LOCALBASE}/bin/autoreconf -s -i)

.include <bsd.port.mk>