pkgsrc - initial commit
[pkgsrc.git] / sysutils / gnome-vfs / Makefile.common
1 # $NetBSD: Makefile.common,v 1.22 2009/07/03 16:05:28 drochner Exp $
2 #
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
6
7 GNOME_VFS_VERSION=      2.24.1
8
9 DISTNAME=               gnome-vfs-${GNOME_VFS_VERSION}
10 CATEGORIES?=            sysutils
11 CATEGORIES+=            gnome
12 MASTER_SITES=           ${MASTER_SITE_GNOME:=sources/gnome-vfs/2.24/}
13 EXTRACT_SUFX=           .tar.bz2
14
15 MAINTAINER=             pkgsrc-users@NetBSD.org
16 HOMEPAGE=               http://www.gnome.org/
17 COMMENT=                GNOME Virtual File System (v2)
18
19 DISTINFO_FILE=          ${.CURDIR}/../../sysutils/gnome-vfs/distinfo
20 PATCHDIR=               ${.CURDIR}/../../sysutils/gnome-vfs/patches
21
22 GNU_CONFIGURE=          YES
23 USE_PKGLOCALEDIR=       YES
24 USE_TOOLS+=             gmake intltool msgfmt pkg-config
25 USE_LIBTOOL=            YES
26
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}
33
34 CPPFLAGS+=              -DPREFIX="\"${PREFIX}\""
35 CPPFLAGS+=              -DPKG_SYSCONFDIR="\"${PKG_SYSCONFDIR}\""
36 MAKE_FLAGS+=            localedir=${PREFIX}/${PKGLOCALEDIR}/locale
37
38 INSTALL_MAKE_FLAGS+=    ${MAKE_FLAGS}
39 INSTALL_MAKE_FLAGS+=    modulesconfdir=${PREFIX}/share/examples/gnome-vfs-2.0/modules
40
41 PKG_SYSCONFSUBDIR=      gnome-vfs-2.0
42
43 EGDIR=                  ${PREFIX}/share/examples/gnome-vfs-2.0
44 .for f in ${EGFILES}
45 CONF_FILES+=            ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
46 .endfor
47
48 .include "../../mk/bsd.prefs.mk"
49
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)
55 post-wrapper:
56         ${MKDIR} -p ${BUILDLINK_DIR}/include/sys
57         ${TOUCH} ${BUILDLINK_DIR}/include/sys/fstyp.h
58 .endif
59
60 #
61 # The following stuff is to allow easy building of modules distributed within
62 # gnome-vfs as independent packages.
63 #
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
67 #                   module.
68 #
69 .if defined(GNOME_VFS_NAME) && !empty(GNOME_VFS_NAME)
70 GNOME_VFS_FLAG?=        ${GNOME_VFS_NAME}
71
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
75
76 CONFLICTS+=             ${DISTNAME:S/gnome-vfs/gnome-vfs2-${GNOME_VFS_NAME}/}
77
78 BUILD_TARGET=           lib${GNOME_VFS_NAME}.la
79 BUILD_DIRS=             modules
80
81 # Fix paths to already installed libraries (by the gnome-vfs package).
82 SUBST_CLASSES+=         libs
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'
87
88 BUILDLINK_API_DEPENDS.gnome-vfs+=       gnome-vfs>=${GNOME_VFS_VERSION}
89 .include "../../sysutils/gnome-vfs/buildlink3.mk"
90
91 INSTALLATION_DIRS+=     lib/gnome-vfs-2.0/modules
92
93 do-install:
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
99 .endif
100
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"