1 # $NetBSD: Makefile.common,v 1.22 2009/07/03 16:05:28 drochner Exp $
3 # used by audio/gnome-vfs-cdda/Makefile
4 # used by net/gnome-vfs-dns-sd/Makefile
5 # used by net/gnome-vfs-smb/Makefile
7 GNOME_VFS_VERSION= 2.24.1
9 DISTNAME= gnome-vfs-${GNOME_VFS_VERSION}
12 MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-vfs/2.24/}
13 EXTRACT_SUFX= .tar.bz2
15 MAINTAINER= pkgsrc-users@NetBSD.org
16 HOMEPAGE= http://www.gnome.org/
17 COMMENT= GNOME Virtual File System (v2)
19 DISTINFO_FILE= ${.CURDIR}/../../sysutils/gnome-vfs/distinfo
20 PATCHDIR= ${.CURDIR}/../../sysutils/gnome-vfs/patches
24 USE_TOOLS+= gmake intltool msgfmt pkg-config
27 CONFIGURE_ARGS+= --disable-cdda
28 CONFIGURE_ARGS+= --disable-howl
29 CONFIGURE_ARGS+= --disable-openssl
30 CONFIGURE_ARGS+= --disable-samba
31 CONFIGURE_ARGS+= --enable-gnutls
32 CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASEDIR:Q}
34 CPPFLAGS+= -DPREFIX="\"${PREFIX}\""
35 CPPFLAGS+= -DPKG_SYSCONFDIR="\"${PKG_SYSCONFDIR}\""
36 MAKE_FLAGS+= localedir=${PREFIX}/${PKGLOCALEDIR}/locale
38 INSTALL_MAKE_FLAGS+= ${MAKE_FLAGS}
39 INSTALL_MAKE_FLAGS+= modulesconfdir=${PREFIX}/share/examples/gnome-vfs-2.0/modules
41 PKG_SYSCONFSUBDIR= gnome-vfs-2.0
43 EGDIR= ${PREFIX}/share/examples/gnome-vfs-2.0
45 CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
48 .include "../../mk/bsd.prefs.mk"
50 # XXX Work-around for a problem in the configure script which checks for
51 # statvfs(2) having SVR4 in mind. Solving this in the script itself could
52 # be the right way to go, but it is out of the scope of a local patch; it
53 # could require changing the code a lot, which is already very... complex.
54 .if ${OPSYS} == "NetBSD" && !exists(/usr/include/fstyp.h)
56 ${MKDIR} -p ${BUILDLINK_DIR}/include/sys
57 ${TOUCH} ${BUILDLINK_DIR}/include/sys/fstyp.h
61 # The following stuff is to allow easy building of modules distributed within
62 # gnome-vfs as independent packages.
64 # GNOME_VFS_NAME - Name of the module beeing built. Will be added to the
65 # package name, and also used as the library name.
66 # GNOME_VFS_FLAG - Base name of the flag passed to configure to enable the
69 .if defined(GNOME_VFS_NAME) && !empty(GNOME_VFS_NAME)
70 GNOME_VFS_FLAG?= ${GNOME_VFS_NAME}
72 PKGNAME:= ${DISTNAME:S/gnome-vfs/gnome-vfs-${GNOME_VFS_NAME}/}
73 CONFIGURE_ARGS:= ${CONFIGURE_ARGS:S/--disable-${GNOME_VFS_FLAG}/--enable-${GNOME_VFS_FLAG}/}
74 COMMENT+= - ${GNOME_VFS_NAME} plugin
76 CONFLICTS+= ${DISTNAME:S/gnome-vfs/gnome-vfs2-${GNOME_VFS_NAME}/}
78 BUILD_TARGET= lib${GNOME_VFS_NAME}.la
81 # Fix paths to already installed libraries (by the gnome-vfs package).
83 SUBST_MESSAGE.libs= Fixing path to dependent libraries.
84 SUBST_STAGE.libs= pre-configure
85 SUBST_FILES.libs= modules/Makefile.in
86 SUBST_SED.libs= -e 's|../libgnomevfs/libgnomevfs-2.la|${BUILDLINK_PREFIX.gnome-vfs}/lib/libgnomevfs-2.la|g'
88 BUILDLINK_API_DEPENDS.gnome-vfs+= gnome-vfs>=${GNOME_VFS_VERSION}
89 .include "../../sysutils/gnome-vfs/buildlink3.mk"
91 INSTALLATION_DIRS+= lib/gnome-vfs-2.0/modules
94 cd ${WRKSRC}/modules && ${LIBTOOL} --mode=install \
95 ${INSTALL_DATA} lib${GNOME_VFS_NAME}.la \
96 ${DESTDIR}${PREFIX}/lib/gnome-vfs-2.0/modules
97 cd ${WRKSRC}/modules && ${LIBTOOL} --mode=finish \
98 ${DESTDIR}${PREFIX}/lib/gnome-vfs-2.0/modules
101 .include "../../archivers/bzip2/buildlink3.mk"
102 .include "../../devel/GConf/buildlink3.mk"
103 .include "../../devel/glib2/buildlink3.mk"
104 .include "../../security/gnutls/buildlink3.mk"
105 .include "../../security/gnutls/libgnutls-config.mk"
106 .include "../../sysutils/dbus-glib/buildlink3.mk"
107 .include "../../textproc/libxml2/buildlink3.mk"