aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/gd
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2012-06-14 22:48:52 +0800
committerdinoex <dinoex@FreeBSD.org>2012-06-14 22:48:52 +0800
commitf1c558ac0c2cb08aceb23aa7fa02e6c3963fc0a9 (patch)
tree0ab7b1e923db30ab1a2959f3387827a5dab3e5a9 /graphics/gd
parent3a0c5c7b4f7ae379a4cd7b38108cbda75e9f404f (diff)
downloadfreebsd-ports-gnome-f1c558ac0c2cb08aceb23aa7fa02e6c3963fc0a9.tar.gz
freebsd-ports-gnome-f1c558ac0c2cb08aceb23aa7fa02e6c3963fc0a9.tar.zst
freebsd-ports-gnome-f1c558ac0c2cb08aceb23aa7fa02e6c3963fc0a9.zip
- use OPTIONS_DEFINE
Diffstat (limited to 'graphics/gd')
-rw-r--r--graphics/gd/Makefile41
1 files changed, 21 insertions, 20 deletions
diff --git a/graphics/gd/Makefile b/graphics/gd/Makefile
index 7abb796badad..85176f9dbbc7 100644
--- a/graphics/gd/Makefile
+++ b/graphics/gd/Makefile
@@ -36,24 +36,13 @@ FEATURES= GD_JPEG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON
USE_LDCONFIG= yes
WANT_PERL= yes
-OPTIONS= X11 "X11 support" off \
- XPM "XPM color bitmap loading support (requires X11)" off \
- FONTCONFIG "fontconfig library support (requires X11)" on \
- ICONV "iconv support" off
+OPTIONS_DEFINE= FONTCONFIG ICONV XPM
+OPTIONS_DEFAULT=FONTCONFIG
+NO_OPTIONS_SORT=yes
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if !defined(WITHOUT_X11)
-.if defined(WITH_XPM)
-USE_XORG= xpm x11
-CPPFLAGS+= -I${LOCALBASE}/include/X11 -I${LOCALBASE}/include -DHAVE_LIBXPM
-LDFLAGS+= -L${LOCALBASE}/lib -lXpm -lX11
-LDFLAGS2+= -L${LOCALBASE}/lib
-FEATURES+= GD_XPM
-.endif
-.endif
-
-.if !defined(WITHOUT_FONTCONFIG)
+.if ${PORT_OPTIONS:M_FONTCONFIG}
LIB_DEPENDS+= fontconfig.1:${PORTSDIR}/x11-fonts/fontconfig
CPPFLAGS+= -I${LOCALBASE}/include -DHAVE_LIBFONTCONFIG -DHAVE_PTHREAD ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib -lfontconfig
@@ -61,19 +50,31 @@ LDFLAGS2+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
FEATURES+= GD_FONTCONFIG
.endif
-.if defined(WITH_ICONV)
+.if ${PORT_OPTIONS:MICONV}
USE_ICONV= yes
CPPFLAGS+= -DHAVE_ICONV -DHAVE_ICONV_H -DHAVE_ICONV_T_DEF
LDFLAGS+= -L${LOCALBASE}/lib -liconv
.endif
+# honor global WITHOUT_X11
+.if !defined(WITHOUT_X11)
+.if ${PORT_OPTIONS:MXPM}
+USE_XORG= xpm x11
+CPPFLAGS+= -I${LOCALBASE}/include/X11 -I${LOCALBASE}/include -DHAVE_LIBXPM
+LDFLAGS+= -L${LOCALBASE}/lib -lXpm -lX11
+LDFLAGS2+= -L${LOCALBASE}/lib
+FEATURES+= GD_XPM
+.endif
+.endif
+
+FONTBASE= ${LOCALBASE}/lib/X11/fonts
+
+# supprt for bitmap fonts
.if defined(GD_FONTS)
USE_PERL5_BUILD= yes
SCRIPTS_ENV+= GD_FONTS="${GD_FONTS}"
.endif
-FONTBASE= ${LOCALBASE}/lib/X11/fonts
-
pre-extract::
@${ECHO_MSG} ""
@${ECHO_MSG} "GD_FONTS can be set to specify an alternative list of .bdf files"
@@ -105,4 +106,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/index.html ${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>