Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jul 2009 05:29:35 +0400
From:      Anonymous <swell.k@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/137021: [patch] graphics/gegl: add LUA, V4L, OPTIMIZE knobs
Message-ID:  <86y6qgmbk0.fsf@gmail.com>
Resent-Message-ID: <200907230130.n6N1U5r8042138@freefall.freebsd.org>

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

>Number:         137021
>Category:       ports
>Synopsis:       [patch] graphics/gegl: add LUA, V4L, OPTIMIZE knobs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 23 01:30:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD luffy 8.0-BETA2 FreeBSD 8.0-BETA2 #0 r195826M: Wed Jul 22 20:12:21 UTC 2009     root@luffy:/usr/obj/usr/src/sys/PHOENIX  amd64

$ make showconfig (disabled ffmpeg, graphviz, openexr, openraw; enabled optimize)
===> The following configuration options are available for gegl-0.0.22_6:
     CAIRO=on "Enable Cairo"
     FFMPEG=off "Enable videos through ffmpeg"
     GRAPHVIZ=off "Enable Graphviz"
     JPEG=on "Enable JPEG format support"
     LUA=on "Enable LUA"
     OPENEXR=off "Enable High Dynamic Range (HDR) format support"
     OPENRAW=off "Enable RAW camera format support"
     OPTIMIZE=on "Enable optimizations autodetection (MMX, SSE)"
     PANGO=on "Enable rendering through Pango "
     PNG=on "Enable PNG format support"
     RSVG=on "Enable RSVG format support"
     SDL=on "Enable SDL"
     SPIRO=on "Enable Spiro"
     V4L=on "Enable Video4Linux"
===> Use 'make config' to modify these settings
>Description:
- add previously ignored LUA and V4L dependencies under appropriate knobs
  (haven't tested them beyond compilation and plist;
  at least they don't break graphics/gimp-app)
- put MMX and SSE optimizations[1] under separate knob, off by default
- while here, sort SDL knob (SDL goes *before* SPIRO)

[1] I'm aware of closed ports/128130. But that is no reason to disable
    optimizations unconditionally. They *may* work in some situations,
    e.g. they work here on gcc-4.2.1 + as-2.15 (from base) as well as on
    gcc-4.5.0 + as-2.19 on CPU Core2 Duo E8400.
>How-To-Repeat:
>Fix:
--- gegl.diff begins here ---
Index: graphics/gegl/Makefile
===================================================================
RCS file: /home/csup/ports/graphics/gegl/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- graphics/gegl/Makefile	18 Jul 2009 11:10:49 -0000	1.9
+++ graphics/gegl/Makefile	23 Jul 2009 01:09:55 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	gegl
 PORTVERSION=	0.0.${GEGL_MINOR}
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	graphics
 MASTER_SITES=	ftp://ftp.gimp.org/pub/gegl/0.0/
 
@@ -20,13 +20,16 @@ OPTIONS=	CAIRO		"Enable Cairo" on \
 		FFMPEG		"Enable videos through ffmpeg" on \
 		GRAPHVIZ	"Enable Graphviz" on \
 		JPEG		"Enable JPEG format support" on \
+		LUA		"Enable LUA" on \
 		OPENEXR		"Enable High Dynamic Range (HDR) format support" on \
 		OPENRAW		"Enable RAW camera format support" on \
+		OPTIMIZE	"Enable optimizations autodetection (MMX, SSE)" off \
 		PANGO		"Enable rendering through Pango " on \
 		PNG		"Enable PNG format support" on \
 		RSVG		"Enable RSVG format support" on \
+		SDL		"Enable SDL" on \
 		SPIRO		"Enable Spiro" on \
-		SDL		"Enable SDL" on
+		V4L		"Enable Video4Linux" on
 
 USE_GNOME=	gtk20 glib20 pkgconfig gnomehack
 USE_BZIP2=	yes
@@ -37,8 +40,6 @@ GNU_CONFIGURE=	yes
 CONFIGURE_ENV+=	CPPFLAGS="-I${LOCALBASE}/include" \
 		CFLAGS="-I${LOCALBASE}/include" \
 		LDFLAGS="-L${LOCALBASE}/lib"
-CONFIGURE_ARGS+=--disable-sse \
-		--disable-mmx
 
 GEGL_MINOR=	22
 PLIST_SUB+=	GEGL_MINOR="${GEGL_MINOR}"
@@ -78,6 +79,12 @@ CONFIGURE_ARGS+=--without-libjpeg
 PLIST_SUB+=	JPEG="@comment "
 .endif
 
+.if !defined(WITHOUT_LUA)
+USE_LUA=	5.1
+.else
+CONFIGURE_ARGS+=--without-lua
+.endif
+
 .if !defined(WITHOUT_OPENEXR)
 LIB_DEPENDS+=	IlmImf.6:${PORTSDIR}/graphics/OpenEXR
 PLIST_SUB+=	OPENEXR=""
@@ -94,6 +101,11 @@ CONFIGURE_ARGS+=--without-libopenraw
 PLIST_SUB+=	OPENRAW="@comment "
 .endif
 
+.if defined(WITHOUT_OPTIMIZE)
+CONFIGURE_ARGS+=--disable-mmx \
+		--disable-sse
+.endif
+
 .if !defined(WITHOUT_PANGO)
 USE_GNOME+=	pango
 .else
@@ -130,6 +142,14 @@ LIB_DEPENDS+=	spiro.0:${PORTSDIR}/graphi
 CONFIGURE_ARGS+=--without-libspiro
 .endif
 
+.if !defined(WITHOUT_V4L)
+BUILD_DEPENDS+=	${LOCALBASE}/include/linux/videodev.h:${PORTSDIR}/multimedia/v4l_compat
+PLIST_SUB+=	V4L=""
+.else
+CONFIGURE_ARGS+=--without-libv4l
+PLIST_SUB+=	V4L="@comment "
+.endif
+
 .if !defined(NOPORTDOCS)
 BUILD_DEPENDS+=	a2x:${PORTSDIR}/textproc/asciidoc
 .else
@@ -138,6 +158,7 @@ CONFIGURE_ARGS+=	--disable-docs
 
 post-patch:
 	${REINPLACE_CMD} -e 's|-T||' ${WRKSRC}/docs/Makefile.am ${WRKSRC}/docs/Makefile.in
+	${REINPLACE_CMD} -e 's|\(lua\)\(5\.1\)|\1-\2|g' ${WRKSRC}/configure
 
 post-build:
 .if !defined(NOPORTDOCS)
Index: graphics/gegl/pkg-plist
===================================================================
RCS file: /home/csup/ports/graphics/gegl/pkg-plist,v
retrieving revision 1.4
diff -u -p -r1.4 pkg-plist
--- graphics/gegl/pkg-plist	14 Mar 2009 12:54:09 -0000	1.4
+++ graphics/gegl/pkg-plist	23 Jul 2009 00:28:37 -0000
@@ -200,6 +200,8 @@ lib/gegl-0.0/tonemap.la
 lib/gegl-0.0/tonemap.so
 lib/gegl-0.0/unsharp-mask.la
 lib/gegl-0.0/unsharp-mask.so
+%%V4L%%lib/gegl-0.0/v4l.la
+%%V4L%%lib/gegl-0.0/v4l.so
 lib/gegl-0.0/value-invert.la
 lib/gegl-0.0/value-invert.so
 lib/gegl-0.0/whitebalance.la
--- gegl.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



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