aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/libggi/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/libggi/Makefile')
-rw-r--r--graphics/libggi/Makefile58
1 files changed, 31 insertions, 27 deletions
diff --git a/graphics/libggi/Makefile b/graphics/libggi/Makefile
index 094b880b4da8..c76a7b4f8a49 100644
--- a/graphics/libggi/Makefile
+++ b/graphics/libggi/Makefile
@@ -1,24 +1,20 @@
-# New ports collection makefile for: libggi
-# Date created: 4 January 2000
-# Whom: mwest@uct.ac.za
-#
+# Created by: mwest@uct.ac.za
# $FreeBSD$
-#
PORTNAME= libggi
PORTVERSION= 2.2.2
-PORTREVISION= 3
+PORTREVISION= 4
PORTEPOCH= 1
CATEGORIES= graphics devel
-MASTER_SITES= http://www.ggi-project.org/ftp/ggi/v2.2/ \
- SF/ggi/ggi-core/${PORTNAME}-${PORTVERSION}
-
+MASTER_SITES= SF/ggi/ggi-core/${PORTNAME}-${PORTVERSION}
DISTNAME= ${PORTNAME}-${PORTVERSION}.src
-MAINTAINER= antoine.brodin@laposte.net
-COMMENT= A flexible drawing library
+MAINTAINER= antoine@FreeBSD.org
+COMMENT= Flexible drawing library
+
+LICENSE= MIT
-LIB_DEPENDS= gii.1:${PORTSDIR}/devel/libgii
+LIB_DEPENDS= gii:${PORTSDIR}/devel/libgii
USE_BZIP2= yes
USE_LDCONFIG= yes
@@ -26,7 +22,6 @@ USE_LDCONFIG= yes
GNU_CONFIGURE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-CPPFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS}
MAN1= cube3d.1 ggi-demo.1 ggiteleserver.1 monitest.1
@@ -123,38 +118,47 @@ MLINKS= ggi-demo.1 demo.1 \
CONFIGURE_ARGS= --disable-directfb
+OPTIONS_DEFINE= AALIB SVGALIB X11
+OPTIONS_DEFAULT=X11
+
+.include <bsd.port.options.mk>
+
.if exists(/usr/include/dev/kgi/kgi.h)
-CONFIGURE_ARGS+= --enable-kgi --with-extra-includes=/usr/include/dev
+CONFIGURE_ARGS+=--enable-kgi --with-extra-includes=/usr/include/dev
.endif
-.if !defined(WITHOUT_X11)
+.if ${PORT_OPTIONS:MX11}
+CONFIGURE_ARGS+=--enable-x --with-x
USE_XORG= x11 xxf86dga xxf86vm ice sm xau xext
PLIST_SUB+= WITH_X=""
.else
-CONFIGURE_ARGS+= --disable-x --disable-dga
+CONFIGURE_ARGS+=--disable-x --without-x
PLIST_SUB+= WITH_X="@comment "
.endif
-.include <bsd.port.pre.mk>
-
-.if !exists(/usr/include/vgl.h) || ${ARCH} != "i386"
-CONFIGURE_ARGS+= --disable-vgl
-PLIST_SUB+= WITH_VGL="@comment "
-.else
+.if exists(/usr/include/vgl.h) && (${ARCH} == "i386" || ${ARCH} == "amd64")
+CONFIGURE_ARGS+=--enable-vgl
PLIST_SUB+= WITH_VGL=""
+.else
+CONFIGURE_ARGS+=--disable-vgl
+PLIST_SUB+= WITH_VGL="@comment "
.endif
-.if defined(WITH_AALIB) || exists(${LOCALBASE}/include/aalib.h)
-LIB_DEPENDS+= aa.1:${PORTSDIR}/graphics/aalib
+.if ${PORT_OPTIONS:MAALIB}
+CONFIGURE_ARGS+=--enable-aa
+LIB_DEPENDS+= aa:${PORTSDIR}/graphics/aalib
PLIST_SUB+= WITH_AALIB=""
.else
+CONFIGURE_ARGS+=--disable-aa
PLIST_SUB+= WITH_AALIB="@comment "
.endif
-.if defined(WITH_SVGALIB) || exists(${LOCALBASE}/include/vga.h)
-LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib
+.if ${PORT_OPTIONS:MSVGALIB}
+CONFIGURE_ARGS+=--enable-vgagl --enable-svga
+LIB_DEPENDS+= vga:${PORTSDIR}/graphics/svgalib
PLIST_SUB+= WITH_SVGALIB=""
.else
+CONFIGURE_ARGS+=--disable-vgagl --disable-svga
PLIST_SUB+= WITH_SVGALIB="@comment "
.endif
@@ -164,4 +168,4 @@ post-install:
${TOUCH} ${PREFIX}/lib/ggi/helper/.keep
${INSTALL_DATA} ${WRKSRC}/libggi.conf ${PREFIX}/etc/ggi/libggi.conf.dist
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>