Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 2009 12:07:27 -0200
From:      "Carlos A. M. dos Santos" <unixmania@gmail.com>
To:        multimedia@freebsd.org
Subject:   multimedia/gstreamer; proposal to make installation of GObject  Introspection data optional
Message-ID:  <e71790db0912210607q32ed965dg41bdaa439dd4ad3a@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

I'm attemting to reduce the number of dependences of several ports, in
order to enable a low footprint installation of FreeBSD for embedded
systems and kiosks. One of my intermediate goals is removing the
runtime dependence on Python and several GNOME/KDE-specific features.
During this work I found that gstreamer can be installed without
Python if built without support for Introspection. So I poropose the
following patch:

diff -durP ../ports/multimedia/gstreamer/Makefile multimedia/gstreamer/Makefile
--- ../ports/multimedia/gstreamer/Makefile	2009-12-04 23:57:44.000000000 -0200
+++ multimedia/gstreamer/Makefile	2009-12-20 03:08:31.000000000 -0200
@@ -15,10 +15,8 @@
 MAINTAINER=	multimedia@FreeBSD.org
 COMMENT=	Development framework for creating media applications

-BUILD_DEPENDS=	${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \
-		g-ir-scanner:${PORTSDIR}/devel/gobject-introspection
+BUILD_DEPENDS=	${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
 LIB_DEPENDS=	popt.0:${PORTSDIR}/devel/popt
-RUN_DEPENDS=	${LOCALBASE}/share/gir-1.0/GLib-2.0.gir:${PORTSDIR}/devel/gobject-introspection

 CFLAGS:=	${CFLAGS} -O2 -Wno-format
 USE_BISON=	build
@@ -46,6 +44,9 @@
 	gst-typefind-${GST_VERSION}.1 gst-xmlinspect-${GST_VERSION}.1 \
 	gst-xmllaunch-${GST_VERSION}.1

+OPTIONS=	CHECK		"Use libckeck unit test framework"   off \
+		INTROSPECTION	"Install GObject Introspection data" on
+
 .include <bsd.port.pre.mk>

 # workaround a gcc bug on 6.x
@@ -53,12 +54,28 @@
 CONFIGURE_ENV+=	gst_cv_uint128_t="no"
 .endif

-.if (exists(${LOCALBASE}/lib/libcheck.a) || defined(WITH_CHECK))
+.if defined(WITH_CHECK)
 LIB_DEPENDS+=	check.0:${PORTSDIR}/devel/libcheck
 PLIST_SUB+=	CHECK=""
+.if defined(WITHOUT_INTROSPECTION)
+PLIST_SUB+=	INTROSP_CHECK="@comment "
+.else
+PLIST_SUB+=	INTROSP_CHECK=""
+.endif
 .else
 CONFIGURE_ARGS+=--disable-check
 PLIST_SUB+=	CHECK="@comment "
+PLIST_SUB+=	INTROSP_CHECK="@comment "
+.endif
+
+.if defined(WITHOUT_INTROSPECTION)
+CONFIGURE_ARGS+=	--disable-introspection
+PLIST_SUB+=	INTROSPECTION="@comment "
+.else
+BUILD_DEPENDS+=	g-ir-scanner:${PORTSDIR}/devel/gobject-introspection
+RUN_DEPENDS+=	${LOCALBASE}/share/gir-1.0/GLib-2.0.gir:${PORTSDIR}/devel/gobject-introspection
+CONFIGURE_ARGS+=	--enable-introspection
+PLIST_SUB+=	INTROSPECTION=""
 .endif

 .include <bsd.port.post.mk>
diff -durP ../ports/multimedia/gstreamer/pkg-plist
multimedia/gstreamer/pkg-plist
--- ../ports/multimedia/gstreamer/pkg-plist	2009-11-29 17:02:02.000000000 -0200
+++ multimedia/gstreamer/pkg-plist	2009-12-07 23:41:49.000000000 -0200
@@ -89,11 +89,11 @@
 include/gstreamer-%%VERSION%%/gst/net/gstnetclientclock.h
 include/gstreamer-%%VERSION%%/gst/net/gstnettimepacket.h
 include/gstreamer-%%VERSION%%/gst/net/gstnettimeprovider.h
-lib/girepository-1.0/Gst-0.10.typelib
-lib/girepository-1.0/GstBase-0.10.typelib
-%%CHECK%%lib/girepository-1.0/GstCheck-0.10.typelib
-lib/girepository-1.0/GstController-0.10.typelib
-lib/girepository-1.0/GstNet-0.10.typelib
+%%INTROSPECTION%%lib/girepository-1.0/Gst-0.10.typelib
+%%INTROSPECTION%%lib/girepository-1.0/GstBase-0.10.typelib
+%%INTROSPECTION%%%%CHECK%%lib/girepository-1.0/GstCheck-0.10.typelib
+%%INTROSPECTION%%lib/girepository-1.0/GstController-0.10.typelib
+%%INTROSPECTION%%lib/girepository-1.0/GstNet-0.10.typelib
 lib/gstreamer-%%VERSION%%/libgstcoreelements.la
 lib/gstreamer-%%VERSION%%/libgstcoreelements.so
 lib/gstreamer-%%VERSION%%/libgstcoreindexers.la
@@ -129,11 +129,11 @@
 libdata/pkgconfig/gstreamer-dataprotocol-%%VERSION%%.pc
 libdata/pkgconfig/gstreamer-net-%%VERSION%%.pc
 share/aclocal/gst-element-check-%%VERSION%%.m4
-share/gir-1.0/Gst-0.10.gir
-share/gir-1.0/GstBase-0.10.gir
-%%CHECK%%share/gir-1.0/GstCheck-0.10.gir
-share/gir-1.0/GstController-0.10.gir
-share/gir-1.0/GstNet-0.10.gir
+%%INTROSPECTION%%share/gir-1.0/Gst-0.10.gir
+%%INTROSPECTION%%share/gir-1.0/GstBase-0.10.gir
+%%INTROSP_CHECK%%share/gir-1.0/GstCheck-0.10.gir
+%%INTROSPECTION%%share/gir-1.0/GstController-0.10.gir
+%%INTROSPECTION%%share/gir-1.0/GstNet-0.10.gir
 share/locale/af/LC_MESSAGES/gstreamer-%%VERSION%%.mo
 share/locale/az/LC_MESSAGES/gstreamer-%%VERSION%%.mo
 share/locale/be/LC_MESSAGES/gstreamer-%%VERSION%%.mo

What do you, multimedia maintainers, think? Is it acceptable?

-- 
My preferred quotation of Robert Louis Stevenson is "You cannot
make an omelette without breaking eggs". Not because I like the
omelettes, but because I like the sound of eggs being broken.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e71790db0912210607q32ed965dg41bdaa439dd4ad3a>