Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  4 Feb 2012 13:22:20 +0800 (CST)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        gnome@FreeBSD.org
Subject:   ports/164756: [PATCH] devel/gamin: add option for libinotify to fix build when it's already installed
Message-ID:  <20120204052220.6C73F19DC@sunpoet.net>
Resent-Message-ID: <201202040530.q145UAWk077912@freefall.freebsd.org>

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

>Number:         164756
>Category:       ports
>Synopsis:       [PATCH] devel/gamin: add option for libinotify to fix build when it's already installed
>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:   Sat Feb 04 05:30:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Sunpoet Po-Chuan Hsieh
>Release:        FreeBSD 9.0-STABLE amd64
>Organization:
The FreeBSD Project
>Environment:
System: FreeBSD bonjour.sunpoet.net 9.0-STABLE FreeBSD 9.0-STABLE #0: Sun Jan 29 23:36:49 CST 2012
>Description:
- Add an option for libinotify

Port maintainer (gnome@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:

gamin fails to build when libinotify is installed

% cd /usr/ports/devel/libinotify
% make install
% cd /usr/ports/devel/gamin
% make build
...

gmake[3]: Entering directory `/usr/ports/works/usr/ports/devel/gamin/work/gamin-0.1.10/server'
/bin/sh /usr/local/bin/libtool --tag=CC   --mode=link cc -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wsign-compare -Wno-sign-compare -g -O2 -pipe -march=core2 -fno-strict-aliasing  -L/usr/local/lib -pthread -o gam_server gam_subscription.o gam_listener.o gam_server.o gam_node.o gam_tree.o gam_poll_basic.o gam_poll_generic.o gam_pidname.o gam_channel.o gam_connection.o gam_debugging.o gam_excludes.o gam_fs.o gam_conf.o gam_eq.o gam_inotify.o inotify-helper.o inotify-kernel.o inotify-missing.o inotify-path.o inotify-sub.o inotify-diag.o  gam_kqueue.o  ../lib/libgamin_shared.a  -L/usr/local/lib -lglib-2.0
libtool: link: cc -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wsign-compare -Wno-sign-compare -g -O2 -pipe -march=core2 -fno-strict-aliasing -pthread -o gam_server gam_subscription.o gam_listener.o gam_server.o gam_node.o gam_tree.o gam_poll_basic.o gam_poll_generic.o gam_pidname.o gam_channel.o gam_connection.o gam_debugging.o gam_excludes.o gam_fs.o gam_conf.o gam_eq.o gam_inotify.o inotify-helper.o inotify-kernel.o inotify-missing.o inotify-path.o inotify-sub.o inotify-diag.o gam_kqueue.o  -L/usr/local/lib ../lib/libgamin_shared.a /usr/local/lib/libglib-2.0.so /usr/local/lib/libintl.so /usr/local/lib/libiconv.so /usr/local/lib/libpcre.so -pthread -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib
inotify-kernel.o: In function `ik_ignore':
/usr/ports/works/usr/ports/devel/gamin/work/gamin-0.1.10/server/inotify-kernel.c:297: undefined reference to `inotify_rm_watch'
inotify-kernel.o: In function `ik_watch':
/usr/ports/works/usr/ports/devel/gamin/work/gamin-0.1.10/server/inotify-kernel.c:277: undefined reference to `inotify_add_watch'
inotify-kernel.o: In function `ik_startup':
/usr/ports/works/usr/ports/devel/gamin/work/gamin-0.1.10/server/inotify-kernel.c:188: undefined reference to `inotify_init'
gmake[3]: *** [gam_server] Error 1
gmake[3]: Leaving directory `/usr/ports/works/usr/ports/devel/gamin/work/gamin-0.1.10/server'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/works/usr/ports/devel/gamin/work/gamin-0.1.10/server'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/works/usr/ports/devel/gamin/work/gamin-0.1.10'
gmake: *** [all] Error 2
*** Error code 1


>Fix:

--- gamin-0.1.10_4.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/gamin/Makefile,v
retrieving revision 1.41
diff -u -u -r1.41 Makefile
--- Makefile	23 Sep 2011 22:21:56 -0000	1.41
+++ Makefile	4 Feb 2012 05:20:12 -0000
@@ -30,7 +30,8 @@
 GNU_CONFIGURE=	yes
 
 .if !defined(GAMIN_SLAVE)
-OPTIONS=	GAM_POLLER "Use gamin's poller instead of kqueue's" off
+OPTIONS=	GAM_POLLER "Use gamin's poller instead of kqueue's" off \
+		LIBINOTIFY "Build libinotify support" off
 .endif
 
 .include <bsd.port.pre.mk>
@@ -39,6 +40,14 @@
 .if defined(WITH_GAM_POLLER)
 CPPFLAGS+=	-DUSE_GAMIN_POLLER=1
 .endif
+
+.if defined(WITH_LIBINOTIFY)
+CONFIGURE_ARGS+=--enable-inotify
+LDFLAGS+=	-L${LOCALBASE}/lib -linotify
+LIB_DEPENDS+=	inotify:${PORTSDIR}/devel/libinotify
+.else
+CONFIGURE_ARGS+=--disable-inotify
+.endif
 .endif
 
 post-patch:
--- gamin-0.1.10_4.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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