summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/diacanvas2/Makefile29
-rw-r--r--graphics/diacanvas2/pkg-plist14
2 files changed, 28 insertions, 15 deletions
diff --git a/graphics/diacanvas2/Makefile b/graphics/diacanvas2/Makefile
index 2aaa080fb2be..748d78ff9a17 100644
--- a/graphics/diacanvas2/Makefile
+++ b/graphics/diacanvas2/Makefile
@@ -11,32 +11,45 @@ DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= General drawing canvas from dia dialog editor
+LICENSE= GPLv2
+
USES= gmake pathfix pkgconfig
USE_GNOME= pygnome2
USE_PYTHON= yes
USE_AUTOTOOLS= libtool
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
USE_LDCONFIG= yes
MAKE_JOBS_UNSAFE= yes
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-OPTIONS_DEFINE= PRINT
+OPTIONS_DEFINE= NLS PRINT
OPTIONS_DEFAULT=PRINT
PRINT_DESC= GNOME print support
+OPTIONS_SUB= yes
+
+PRINT_CONFIGURE_ENABLE= gnome-print
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPRINT}
USE_GNOME+= libgnomeprintui
-CONFIGURE_ARGS+=--enable-gnome-print
-.else
-CONFIGURE_ARGS+=--disable-gnome-print
.endif
post-patch:
- @${REINPLACE_CMD} -e \
- 's|unit_tests doc|unit_tests|g' ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e '/SUBDIRS/s|doc||' ${WRKSRC}/Makefile.in
+
+.if ! ${PORT_OPTIONS:MNLS}
+ @${REINPLACE_CMD} -e 's|po diacanvas po |diacanvas |' \
+ ${WRKSRC}/Makefile.in
+.endif
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so.0
+.for l in _canvasmodule shapemodule viewmodule geometrymodule
+ ${STRIP_CMD} ${STAGEDIR}${PYTHON}${PYTHON_SITELIBDIR}/diacanvas/${l}.so
+.endfor
.include <bsd.port.mk>
diff --git a/graphics/diacanvas2/pkg-plist b/graphics/diacanvas2/pkg-plist
index d293e58ec43b..1949b96158d0 100644
--- a/graphics/diacanvas2/pkg-plist
+++ b/graphics/diacanvas2/pkg-plist
@@ -46,13 +46,6 @@ lib/libdiacanvas2.a
lib/libdiacanvas2.la
lib/libdiacanvas2.so
lib/libdiacanvas2.so.0
-libdata/pkgconfig/diacanvas2.pc
-share/locale/nl/LC_MESSAGES/diacanvas.mo
-share/pygtk/2.0/defs/dia-boxed.defs
-share/pygtk/2.0/defs/diacanvas.defs
-share/pygtk/2.0/defs/diageometry.defs
-share/pygtk/2.0/defs/diashape.defs
-share/pygtk/2.0/defs/diaview.defs
%%PYTHON_SITELIBDIR%%/diacanvas/__init__.py
%%PYTHON_SITELIBDIR%%/diacanvas/__init__.pyc
%%PYTHON_SITELIBDIR%%/diacanvas/__init__.pyo
@@ -71,5 +64,12 @@ share/pygtk/2.0/defs/diaview.defs
%%PYTHON_SITELIBDIR%%/diacanvas/viewmodule.a
%%PYTHON_SITELIBDIR%%/diacanvas/viewmodule.la
%%PYTHON_SITELIBDIR%%/diacanvas/viewmodule.so
+libdata/pkgconfig/diacanvas2.pc
+%%NLS%%share/locale/nl/LC_MESSAGES/diacanvas.mo
+share/pygtk/2.0/defs/dia-boxed.defs
+share/pygtk/2.0/defs/diacanvas.defs
+share/pygtk/2.0/defs/diageometry.defs
+share/pygtk/2.0/defs/diashape.defs
+share/pygtk/2.0/defs/diaview.defs
@dirrm %%PYTHON_SITELIBDIR%%/diacanvas
@dirrm include/diacanvas