summaryrefslogtreecommitdiff
path: root/sysutils/gnome-vfs2/Makefile.common
blob: d4a8242d9c968003d58aabf24a6ddec00982677c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# $NetBSD: Makefile.common,v 1.35 2006/04/27 21:14:34 drochner Exp $
#

GNOME_VFS2_VERSION=	2.14.1

DISTNAME=		gnome-vfs-${GNOME_VFS2_VERSION}
PKGNAME=		${DISTNAME:S/vfs/vfs2/}
CATEGORIES?=		sysutils
CATEGORIES+=		gnome
MASTER_SITES=		${MASTER_SITE_GNOME:=sources/gnome-vfs/2.14/}
EXTRACT_SUFX=		.tar.bz2

MAINTAINER=		jmmv@NetBSD.org
HOMEPAGE=		http://www.gnome.org/
COMMENT=		GNOME Virtual File System (v2)

DISTINFO_FILE=		${.CURDIR}/../../sysutils/gnome-vfs2/distinfo
PATCHDIR=		${.CURDIR}/../../sysutils/gnome-vfs2/patches

GNU_CONFIGURE=		YES
USE_PKGLOCALEDIR=	YES
USE_TOOLS+=		gmake msgfmt pkg-config
USE_LIBTOOL=		YES

CONFIGURE_ARGS+=	--disable-cdda
CONFIGURE_ARGS+= 	--disable-fam
CONFIGURE_ARGS+= 	--disable-gtk
CONFIGURE_ARGS+= 	--disable-howl
CONFIGURE_ARGS+= 	--disable-openssl
CONFIGURE_ARGS+= 	--disable-samba
CONFIGURE_ARGS+= 	--enable-gnutls
CONFIGURE_ARGS+=	--enable-platform-gnome-2
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFBASEDIR:Q}
CONFIGURE_ARGS+=	--with-html-dir=${PREFIX}/share/doc

CPPFLAGS+=		-DPREFIX="\"${PREFIX}\""
CPPFLAGS+=		-DPKG_SYSCONFDIR="\"${PKG_SYSCONFDIR}\""

INSTALL_MAKE_FLAGS+=	${MAKE_FLAGS}
INSTALL_MAKE_FLAGS+=	modulesconfdir=${PREFIX}/share/examples/gnome-vfs-2.0/modules

PKG_SYSCONFSUBDIR=	gnome-vfs-2.0

EGDIR=			${PREFIX}/share/examples/gnome-vfs-2.0
.for f in ${EGFILES}
CONF_FILES+=		${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
.endfor

.include "../../mk/bsd.prefs.mk"

# XXX Work-around for a problem in the configure script which checks for
# statvfs(2) having SVR4 in mind.  Solving this in the script itself could
# be the right way to go, but it is out of the scope of a local patch; it
# could require changing the code a lot, which is already very... complex.
.if ${OPSYS} == "NetBSD" && !exists(/usr/include/fstyp.h)
post-wrapper:
	${MKDIR} -p ${BUILDLINK_DIR}/include/sys
	${TOUCH} ${BUILDLINK_DIR}/include/sys/fstyp.h
.endif

#
# The following stuff is to allow easy building of modules distributed within
# gnome-vfs2 as independent packages.
#
# GNOME_VFS2_NAME - Name of the module beeing built.  Will be added to the
#                   package name, and also used as the library name.
# GNOME_VFS2_FLAG - Base name of the flag passed to configure to enable the
#                   module.
#
.if defined(GNOME_VFS2_NAME) && !empty(GNOME_VFS2_NAME)
GNOME_VFS2_FLAG?=	${GNOME_VFS2_NAME}

PKGNAME:=		${PKGNAME:S/gnome-vfs2/gnome-vfs2-${GNOME_VFS2_NAME}/}
CONFIGURE_ARGS:=	${CONFIGURE_ARGS:S/--disable-${GNOME_VFS2_FLAG}/--enable-${GNOME_VFS2_FLAG}/}
COMMENT+=		- ${GNOME_VFS2_NAME} plugin

BUILD_TARGET=		lib${GNOME_VFS2_NAME}.la
BUILD_DIRS=		${WRKSRC}/modules

# Fix paths to already installed libraries (by the gnome-vfs2 package).
SUBST_CLASSES+=         libs
SUBST_MESSAGE.libs=     Fixing path to dependent libraries.
SUBST_STAGE.libs=       pre-configure
SUBST_FILES.libs=       modules/Makefile.in
SUBST_SED.libs=         -e 's|../libgnomevfs/libgnomevfs-2.la|${BUILDLINK_PREFIX.gnome-vfs2}/lib/libgnomevfs-2.la|g'

BUILDLINK_API_DEPENDS.gnome-vfs2+=	gnome-vfs2>=${GNOME_VFS2_VERSION}
.include "../../sysutils/gnome-vfs2/buildlink3.mk"

PRINT_PLIST_AWK+=	/^@dirrm lib\/gnome-vfs-2.0\/modules$$/ \
				{ print "@comment in gnome-vfs2: " $$0; next; }
PRINT_PLIST_AWK+=	/^@dirrm share\/examples\/gnome-vfs-2.0$$/ { next; }
PRINT_PLIST_AWK+=	/^@dirrm share\/examples\/gnome-vfs-2.0\/modules$$/ \
				{ print "@comment in gnome-vfs2: " $$0; next; }

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/lib/gnome-vfs-2.0/modules
	cd ${WRKSRC}/modules && ${LIBTOOL} --mode=install \
		${INSTALL_DATA} lib${GNOME_VFS2_NAME}.la \
			${PREFIX}/lib/gnome-vfs-2.0/modules
	cd ${WRKSRC}/modules && ${LIBTOOL} --mode=finish \
			${PREFIX}/lib/gnome-vfs-2.0/modules
.endif

.include "../../textproc/intltool/buildlink3.mk"