aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-02-07 17:40:25 +0800
committerdelphij <delphij@FreeBSD.org>2007-02-07 17:40:25 +0800
commit0097e99d9bce0dc133a67ce5f910a82e1168b3cc (patch)
tree88c375b2d23a8f2848ff36737e24a9404919babb /databases
parente1ed717e48a745960ce7a79a923d14f75a79336f (diff)
downloadfreebsd-ports-gnome-0097e99d9bce0dc133a67ce5f910a82e1168b3cc.tar.gz
freebsd-ports-gnome-0097e99d9bce0dc133a67ce5f910a82e1168b3cc.tar.zst
freebsd-ports-gnome-0097e99d9bce0dc133a67ce5f910a82e1168b3cc.zip
Allow building of python binding (as an option).
Submitted by: Ren Zhen <bg1tpt at gmail com> Approved by: maintainer
Diffstat (limited to 'databases')
-rw-r--r--databases/rrdtool/Makefile22
-rw-r--r--databases/rrdtool/files/patch-bindings__python__Makefile.in10
-rw-r--r--databases/rrdtool/pkg-plist1
3 files changed, 30 insertions, 3 deletions
diff --git a/databases/rrdtool/Makefile b/databases/rrdtool/Makefile
index c327ea127ea8..002ce0ca18a7 100644
--- a/databases/rrdtool/Makefile
+++ b/databases/rrdtool/Makefile
@@ -7,6 +7,7 @@
PORTNAME= rrdtool
PORTVERSION= 1.2.19
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://oss.oetiker.ch/rrdtool/pub/
@@ -19,15 +20,30 @@ LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2 \
USE_AUTOTOOLS= libtool:15
USE_PERL5= yes
+USE_LDCONFIG= yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
-CONFIGURE_ARGS= --enable-perl-site-install --disable-python --disable-tcl
+
+CONFIGURE_ARGS= --enable-perl-site-install --disable-tcl
+
+OPTIONS= PYTHON_MODULE "Define if you want PYTHON bindings" off
+
+.include <bsd.port.pre.mk>
+.if defined(WITH_PYTHON_MODULE)
+USE_PYTHON= yes
+.include "${PORTSDIR}/Mk/bsd.python.mk"
+PLIST_SUB+= WITH_PYTHON=""
+CONFIGURE_ARGS+= --enable-python
+.else
+CONFIGURE_ARGS+= --disable-python
+PLIST_SUB+= WITH_PYTHON="@comment "
+.endif
+
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/libart-2.0 -I${LOCALBASE}/include/freetype2
LDFLAGS+= -L${LOCALBASE}/lib
CFLAGS:= ${CFLAGS:N-ffast-math}
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
-INSTALLS_SHLIB= yes
MAN1= bin_dec_hex.1 cdeftutorial.1 rpntutorial.1 rrd-beginners.1 \
rrdbuild.1 rrdcgi.1 rrdcreate.1 rrddump.1 rrdfetch.1 rrdfirst.1 \
@@ -52,4 +68,4 @@ post-install:
@${ECHO_MSG} "############################################################################"
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/rrdtool/files/patch-bindings__python__Makefile.in b/databases/rrdtool/files/patch-bindings__python__Makefile.in
new file mode 100644
index 000000000000..048da9a4b25d
--- /dev/null
+++ b/databases/rrdtool/files/patch-bindings__python__Makefile.in
@@ -0,0 +1,10 @@
+--- ./bindings/python/Makefile.in.orig Thu Feb 1 13:52:06 2007
++++ ./bindings/python/Makefile.in Wed Feb 7 10:19:12 2007
+@@ -233,6 +233,7 @@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
+ AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src @PYTHON_INCLUDES@
++rrdtoolmodule_so_LDFLAGS = -module -shared
+ rrdtoolmodule_so_LDADD = $(top_builddir)/src/librrd.la
+ rrdtoolmodule_so_SOURCES = rrdtoolmodule.c
+ noinst_HEADERS = rrd_extra.h
diff --git a/databases/rrdtool/pkg-plist b/databases/rrdtool/pkg-plist
index 94c4fb2cc032..db9bc5830402 100644
--- a/databases/rrdtool/pkg-plist
+++ b/databases/rrdtool/pkg-plist
@@ -107,6 +107,7 @@ include/rrd.h
%%SITE_PERL%%/%%PERL_ARCH%%/auto/RRDs/RRDs.so
%%SITE_PERL%%/%%PERL_ARCH%%/auto/RRDs/RRDs.bs
%%SITE_PERL%%/%%PERL_ARCH%%/auto/RRDs/.packlist
+%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/rrdtoolmodule.so
@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%/txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%/html