summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/dia/Makefile22
-rw-r--r--graphics/dia/PLIST56
-rw-r--r--graphics/dia/options.mk45
3 files changed, 79 insertions, 44 deletions
diff --git a/graphics/dia/Makefile b/graphics/dia/Makefile
index 502ea7cd9a9..4e59a34219d 100644
--- a/graphics/dia/Makefile
+++ b/graphics/dia/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2004/10/14 17:04:08 jmmv Exp $
+# $NetBSD: Makefile,v 1.36 2004/11/17 21:42:11 xtraeme Exp $
DISTNAME= dia-0.94
CATEGORIES= graphics
@@ -9,40 +9,30 @@ HOMEPAGE= http://www.gnome.org/projects/dia/
COMMENT= Program for creating diagrams of all kinds
USE_BUILDLINK3= YES
-USE_DIRS+= gnome2-1.5
USE_PKGLOCALEDIR= YES
USE_X11= YES
USE_GNU_TOOLS+= make
USE_LIBTOOL= YES
GNU_CONFIGURE= YES
-CONFIGURE_ENV+= PYTHON=${PYTHONBIN}
-CONFIGURE_ARGS+= --enable-gnome
-CONFIGURE_ARGS+= --enable-bonobo
-CONFIGURE_ARGS+= --with-python
-
-PYTHON_PATCH_SCRIPTS= po-checktrans.py
-PYTHON_PATCH_SCRIPTS+= plug-ins/python/gtkcons.py
-PYTHON_PATCH_SCRIPTS+= sheets/checktrans.py
INTL_FILE= ${WRKSRC}/lib/intl.c
+
post-patch:
- ${MV} ${INTL_FILE} ${INTL_FILE}.pre
- ${SED} -e "s,%%PREFIX%%,${PREFIX},g" ${INTL_FILE}.pre > ${INTL_FILE}
+ @${MV} ${INTL_FILE} ${INTL_FILE}.pre
+ @${SED} -e "s,%%PREFIX%%,${PREFIX},g" ${INTL_FILE}.pre > ${INTL_FILE}
+
+.include "options.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
-.include "../../devel/libgnome/buildlink3.mk"
-.include "../../devel/libgnomeui/buildlink3.mk"
.include "../../devel/pango/buildlink3.mk"
.include "../../devel/pkgconfig/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/libart2/buildlink3.mk"
-.include "../../lang/python/application.mk"
.include "../../textproc/intltool/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../textproc/libxslt/buildlink3.mk"
.include "../../textproc/scrollkeeper/omf.mk"
-.include "../../x11/py-gtk2/buildlink3.mk"
.include "../../x11/gtk2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/dia/PLIST b/graphics/dia/PLIST
index 88c7c3f95fa..31bacac74e2 100644
--- a/graphics/dia/PLIST
+++ b/graphics/dia/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.8 2004/10/14 17:04:08 jmmv Exp $
+@comment $NetBSD: PLIST,v 1.9 2004/11/17 21:42:11 xtraeme Exp $
bin/dia
lib/dia/libbondgraph_objects.la
lib/dia/libcairo_filter.la
@@ -20,7 +20,7 @@ lib/dia/libmisc_objects.la
lib/dia/libnetwork_objects.la
lib/dia/libpixbuf_filter.la
lib/dia/libpstricks_filter.la
-lib/dia/libpython_plugin.la
+${PYTHON_OPTION}lib/dia/libpython_plugin.la
lib/dia/libsadt_objects.la
lib/dia/libshape_filter.la
lib/dia/libstandard_objects.la
@@ -43,15 +43,15 @@ share/dia/images/selectable.png
share/dia/images/unbroken-chain.xpm
share/dia/images/visible-empty.png
share/dia/images/visible.png
-share/dia/python-startup.py
-share/dia/python/diasvg.py
-share/dia/python/diasvg_import.py
-share/dia/python/group_props.py
-share/dia/python/gtkcons.py
-share/dia/python/otypes.py
-share/dia/python/pydiadoc.py
-share/dia/python/scascale.py
-share/dia/python/select_by.py
+${PYTHON_OPTION}share/dia/python-startup.py
+${PYTHON_OPTION}share/dia/python/diasvg.py
+${PYTHON_OPTION}share/dia/python/diasvg_import.py
+${PYTHON_OPTION}share/dia/python/group_props.py
+${PYTHON_OPTION}share/dia/python/gtkcons.py
+${PYTHON_OPTION}share/dia/python/otypes.py
+${PYTHON_OPTION}share/dia/python/pydiadoc.py
+${PYTHON_OPTION}share/dia/python/scascale.py
+${PYTHON_OPTION}share/dia/python/select_by.py
share/dia/shapes/Assorted/arrow-chevron.png
share/dia/shapes/Assorted/arrow-chevron.shape
share/dia/shapes/Assorted/arrow-down.png
@@ -1321,16 +1321,16 @@ share/dia/xslt/dia-uml2java.xsl
share/dia/xslt/dia-uml2owl.xsl
share/dia/xslt/dia-uml2python.xsl
share/dia/xslt/stylesheets.xml
-share/gnome/help/dia/C
-share/gnome/help/dia/en/dia.xml
-share/gnome/help/dia/en/graphics/greendots.png
-share/gnome/help/dia/en/graphics/home_network.png
-share/gnome/help/dia/en/graphics/line_icon.png
-share/gnome/help/dia/en/graphics/line_props.png
-share/gnome/help/dia/pl/dia.xml
-share/gnome/help/dia/pl/graphics/greendots.png
-share/gnome/help/dia/pl/graphics/home_network.png
-share/gnome/help/dia/pl/graphics/line_props.png
+${GNOME_OPTION}share/gnome/help/dia/C
+${GNOME_OPTION}share/gnome/help/dia/en/dia.xml
+${GNOME_OPTION}share/gnome/help/dia/en/graphics/greendots.png
+${GNOME_OPTION}share/gnome/help/dia/en/graphics/home_network.png
+${GNOME_OPTION}share/gnome/help/dia/en/graphics/line_icon.png
+${GNOME_OPTION}share/gnome/help/dia/en/graphics/line_props.png
+${GNOME_OPTION}share/gnome/help/dia/pl/dia.xml
+${GNOME_OPTION}share/gnome/help/dia/pl/graphics/greendots.png
+${GNOME_OPTION}share/gnome/help/dia/pl/graphics/home_network.png
+${GNOME_OPTION}share/gnome/help/dia/pl/graphics/line_props.png
${PKGLOCALEDIR}/locale/am/LC_MESSAGES/dia.mo
${PKGLOCALEDIR}/locale/az/LC_MESSAGES/dia.mo
${PKGLOCALEDIR}/locale/be/LC_MESSAGES/dia.mo
@@ -1386,12 +1386,12 @@ share/pixmaps/dia_gnome_icon.png
@exec ${MKDIR} %D/share/oaf
@dirrm share/oaf
@comment in xdg-dirs: @dirrm share/mime-info
-@dirrm share/gnome/help/dia/pl/graphics
-@dirrm share/gnome/help/dia/pl
-@dirrm share/gnome/help/dia/en/graphics
-@dirrm share/gnome/help/dia/en
-@dirrm share/gnome/help/dia
-@comment in gnome2-dirs: @dirrm share/gnome/help
+${GNOME_OPTION}@dirrm share/gnome/help/dia/pl/graphics
+${GNOME_OPTION}@dirrm share/gnome/help/dia/pl
+${GNOME_OPTION}@dirrm share/gnome/help/dia/en/graphics
+${GNOME_OPTION}@dirrm share/gnome/help/dia/en
+${GNOME_OPTION}@dirrm share/gnome/help/dia
+${GNOME_OPTION}@comment in gnome2-dirs: @dirrm share/gnome/help
@dirrm share/dia/xslt
@dirrm share/dia/sheets/UML
@dirrm share/dia/sheets/KAOS
@@ -1421,7 +1421,7 @@ share/pixmaps/dia_gnome_icon.png
@dirrm share/dia/shapes/ChemEng
@dirrm share/dia/shapes/Assorted
@dirrm share/dia/shapes
-@dirrm share/dia/python
+${PYTHON_OPTION}@dirrm share/dia/python
@dirrm share/dia/images
@dirrm share/dia
@comment in xdg-dirs: @dirrm share/applications
diff --git a/graphics/dia/options.mk b/graphics/dia/options.mk
new file mode 100644
index 00000000000..4a0fd41cb44
--- /dev/null
+++ b/graphics/dia/options.mk
@@ -0,0 +1,45 @@
+# $NetBSD: options.mk,v 1.1 2004/11/17 21:42:11 xtraeme Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.dia
+#PKG_SUPPORTED_OPTIONS= python gnome cairo
+PKG_SUPPORTED_OPTIONS= python gnome
+PKG_DEFAULT_OPTIONS= python gnome
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mpython)
+CONFIGURE_ENV+= PYTHON=${PYTHONBIN}
+CONFIGURE_ARGS+= --with-python
+
+PYTHON_PATCH_SCRIPTS= po-checktrans.py
+PYTHON_PATCH_SCRIPTS+= plug-ins/python/gtkcons.py
+PYTHON_PATCH_SCRIPTS+= sheets/checktrans.py
+. include "../../lang/python/application.mk"
+. include "../../x11/py-gtk2/buildlink3.mk"
+PLIST_SUBST+= PYTHON_OPTION=
+.else
+CONFIGURE_ARGS+= --without-python
+PLIST_SUBST+= PYTHON_OPTION='@comment '
+.endif
+
+.if !empty(PKG_OPTIONS:Mgnome)
+USE_DIRS+= gnome2-1.5
+CONFIGURE_ARGS+= --enable-gnome
+. include "../../devel/libgnome/buildlink3.mk"
+. include "../../devel/libgnomeui/buildlink3.mk"
+PLIST_SUBST+= GNOME_OPTION=
+.else
+CONFIGURE_ARGS+= --disable-gnome
+PLIST_SUBST+= GNOME_OPTION='@comment '
+.endif
+
+# Disabled, freedesktop is down.
+.if !empty(PKG_OPTIONS:Mcairo)
+CONFIGURE_ARGS+= --with-cairo
+. include "../../graphics/cairo/buildlink3.mk"
+PLIST_SUBST+= CAIRO_OPTION=
+.else
+CONFIGURE_ARGS+= --without-cairo
+PLIST_SUBST+= CAIRO_OPTION='@comment '
+.endif
+