summaryrefslogtreecommitdiff
path: root/x11/kdebase3/Makefile
blob: 7242913cf0974fbf7c0a90f929366fcb42a30fe0 (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# $NetBSD: Makefile,v 1.156 2010/02/19 20:23:01 joerg Exp $

DISTNAME=	kdebase-${_KDE_VERSION}
PKGREVISION=	9
CATEGORIES=	x11
COMMENT=	Base modules for the KDE 3 integrated X11 desktop

#PATCH_SITES=	ftp://ftp.kde.org/pub/kde/security_patches/ \
#		http://mirrors.isc.org/pub/kde/security_patches/
#PATCHFILES=	post-3.5.7-kdebase-konqueror-2.diff post-3.5.7-kdebase-kdm.diff

PKG_DESTDIR_SUPPORT=	user-destdir

.include "../../meta-pkgs/kde3/Makefile.kde3"

DISTFILES=	${DISTNAME}${EXTRACT_SUFX} Daemon.png Daemon.README
DISTFILES+=	NetBSD-flag-1.0.png
SITES.Daemon.png=	${MASTER_SITE_LOCAL}
SITES.Daemon.README=	${MASTER_SITE_LOCAL}
SITES.NetBSD-flag-1.0.png=	${MASTER_SITE_LOCAL}

EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

UNLIMIT_RESOURCES=	datasize
USE_TOOLS+=		pkg-config mkfontdir bdftopcf

FONTS_DIRS.x11+=	${PREFIX}/share/kde/apps/konsole/fonts
REQD_DIRS+=		${PREFIX}/share/kde/apps/konsole
REQD_DIRS+=		${PREFIX}/share/kde/apps/konsole/fonts

FONTS_DIRS.x11+=	${PREFIX}/share/kde/fonts/override
REQD_DIRS+=		${PREFIX}/share/kde/fonts
REQD_DIRS+=		${PREFIX}/share/kde/fonts/override

CONFIGURE_ARGS+=	--with-ldap="${BUILDLINK_PREFIX.openldap-client}"
CONFIGURE_ARGS+=	--with-ssl-dir="${BUILDLINK_PREFIX.openssl}"
CONFIGURE_ARGS+=	--without-java

REPLACE_PERL+=		kcontrol/keys/convertShortcuts.pl \
			khelpcenter/searchhandlers/khc_docbookdig.pl.in \
			khelpcenter/searchhandlers/khc_htdig.pl.in \
			khelpcenter/searchhandlers/khc_htsearch.pl \
			khelpcenter/searchhandlers/khc_mansearch.pl \
			kicker/kicker/kicker-3.1-properSizeSetting.pl \
			kicker/kicker/kicker-3.5-kconfigXTize.pl \
			kicker/kicker/kicker-3.5-taskbarEnums.pl \
			kioslave/finger/kio_finger.pl \
			kioslave/info/kde-info2html \
			klipper/klipper-1-2.pl \
			kwin/data/kwin3_plugin.pl \
			kwin/data/pluginlibFix.pl \
			konsole/schemaStrip.pl

CONF_FILES=		${PREFIX}/share/kde/config/kdm/kdmrc \
			${PKG_SYSCONFDIR}/kdm/kdmrc
CONF_FILES+=		${PREFIX}/share/examples/kdebase3/ksysguarddrc \
			${PKG_SYSCONFDIR}/ksysguarddrc
CONF_FILES+=		${PREFIX}/share/examples/kdebase3/kde-information.menu \
			${PKG_SYSCONFDIR}/xdg/menus/kde-information.menu
CONF_FILES+=		${PREFIX}/share/examples/kdebase3/kde-screensavers.menu \
			${PKG_SYSCONFDIR}/xdg/menus/kde-screensavers.menu
CONF_FILES+=		${PREFIX}/share/examples/kdebase3/kde-settings.menu \
			${PKG_SYSCONFDIR}/xdg/menus/kde-settings.menu
CONF_FILES+=		${PREFIX}/share/examples/kdebase3/applications-merged/kde-essential.menu \
			${PKG_SYSCONFDIR}/xdg/menus/applications-merged/kde-essential.menu
MAKE_DIRS+=		${PKG_SYSCONFDIR}/xdg/menus/applications-merged
OWN_DIRS=		${PKG_SYSCONFDIR}/kdm
RCD_SCRIPTS=		kdm

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

LIBS.NetBSD+=		${EXPORT_SYMBOLS_LDFLAGS}

PLIST_SRC=		${WRKDIR}/PLIST.Xdpms

_KDE3_EXTRA_INCLUDES=	${PREFIX}/include:${X11BASE}/include:${BUILDLINK_PREFIX.freetype2}/include/freetype2

# Don't execute kappfinder_install at install-time.  This causes random
# applications to be found which causes random .desktop files to be created
# in the applnk directory.
#
CONFIGURE_ENV+=		RUN_KAPPFINDER=no

PLIST_SRC+=		${PKGDIR}/PLIST

.include "options.mk"

BUILDLINK_API_DEPENDS.Xrandr+=	Xrandr>=1.0
BUILDLINK_API_DEPENDS.kdelibs+=	kdelibs>=${_KDE_VERSION}

DEPENDS+=		htdig>=3.2.0:../../www/htdig-devel

# Solaris 10 has libusb only for 32 bit ABI (see PR 33727).
.if ${OPSYS} == "SunOS" && ${MACHINE_ARCH} == "x86_64"
CONFIGURE_ARGS+=       --without-libusb
.endif

PLIST_VARS+=		usbview
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux"
PLIST.usbview=		yes
.endif

PLIST_VARS+=		joystick
.if ${OPSYS} == "Linux"
PLIST.joystick=		yes
.endif

ICONDIR=		share/icons

.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
SPECIAL_PERMS+=	${PREFIX}/bin/ksysguardd	${REAL_ROOT_USER} kmem 2555
.endif

.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "DragonFly" || ${OPSYS} == "SunOS"
SUBST_CLASSES+=		varlock
SUBST_STAGE.varlock=	post-patch
SUBST_MESSAGE.varlock=	Fix lock directory path.
SUBST_FILES.varlock=	kcheckpass/kcheckpass.c
.if ${OPSYS} == "SunOS"
SUBST_SED.varlock=	-e s:/var/lock:/var/spool/locks:
.else
SUBST_SED.varlock=	-e s:/var/lock:/var/spool/lock:
.endif
.endif

SUBST_CLASSES+=		htdig
SUBST_STAGE.htdig=	post-patch
SUBST_MESSAGE.htdig=	Fix htdig paths.
SUBST_FILES.htdig=	khelpcenter/searchhandlers/khc_htsearch.pl
SUBST_SED.htdig=	-e s:/srv/www/cgi-bin:${PREFIX}/libexec/cgi-bin:

SUBST_CLASSES+=		paths
SUBST_FILES.paths=	kcontrol/kdm/main.cpp kioslave/info/kde-info2html.conf
SUBST_SED.paths=	-e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
SUBST_SED.paths+=	-e 's,@LOCALBASE@,${PREFIX},g'
SUBST_STAGE.paths=	post-patch

SUBST_CLASSES+=		xkb
SUBST_FILES.xkb=	kxkb/x11helper.cpp
SUBST_SED.xkb=		-e 's:XLIBDIR:"${X11BASE}/lib/X11/", "${X11BASE}/share/X11/", XLIBDIR:'
SUBST_STAGE.xkb=	post-patch

# genkdmconf wont install faces if using destdir so do it ourselves
INSTALLATION_DIRS+= share/kde/apps/kdm/faces share/kde/templates/.source/emptydir

pre-configure:
	cd ${WRKSRC}/ksysguard/ksysguardd && rm -f DragonFly && ln -s FreeBSD DragonFly

post-install:
	${INSTALL_DATA} ${WRKSRC}/kdm/kfrontend/pics/default1.png \
		${DESTDIR}${PREFIX}/share/kde/apps/kdm/faces/.default.face.icon
	${INSTALL_DATA} ${WRKSRC}/kdm/kfrontend/pics/root1.png \
		${DESTDIR}${PREFIX}/share/kde/apps/kdm/faces/root.face.icon
	${INSTALL_DATA} ${DISTDIR}/NetBSD-flag-1.0.png ${DESTDIR}${PREFIX}/${ICONDIR}/NetBSD-flag.png
	${INSTALL_DATA} ${DISTDIR}/Daemon.png ${DESTDIR}${PREFIX}/${ICONDIR}
	${INSTALL_DATA} ${DISTDIR}/Daemon.README			\
		${DESTDIR}${PREFIX}/share/doc/kde/HTML/en/kdm

	@# The global desktop template files need to be user-writeable, or
	@# else users won't be able to alter them after copying them to
	@# their local directories.
	@#
	${CHMOD} u+w ${DESTDIR}${PREFIX}/share/kde/templates/.source/*

	@# On some systems, the Xdpms routines aren't available in a shared
	@# library, and some libraries aren't created as a result.
	@#
	( files="							\
		lib/kde3/libkcm_energy.so				\
		lib/kde3/libkcm_screensaver.so				\
	  ";								\
	  for file in $${files}; do					\
		if [ -f ${DESTDIR}${PREFIX}/$${file} ]; then		\
			${ECHO} "$${file}";				\
		fi;							\
	  done;								\
	) > ${WRKDIR}/PLIST.Xdpms

.if ${OPSYS} == "NetBSD"
	@# NetBSD Advertisement O:-)
	cd ${DESTDIR}${PREFIX}/share/kde/config/kdm;			\
	${SED} -e 's|^\(LogoPixmap\)=.*|\1=${PREFIX}/${ICONDIR}/NetBSD-flag.png|' \
		kdmrc > ${WRKDIR}/kdmrc.ad;				\
	${CP} -f ${WRKDIR}/kdmrc.ad kdmrc
.endif

.if ${OPSYS} == "NetBSD" && !empty(OS_VERSION:M1.[0-6]*)
CONFIGURE_ENV+= ac_cv_func_getutxent='no'
.endif

.if ${OPSYS} == "NetBSD"
# We always use pkg-config for detecting the fontconfig version, since there
# may exist an old version of fontconfig-config on systems that have been
# updated from NetBSD 1.x.
CONFIGURE_ENV+= kde_cv_path_fontconfig_config='NONE'
.endif

.include "../../meta-pkgs/kde3/kde3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"

.include "../../databases/openldap-client/buildlink3.mk"
.if ${OPSYS} != "SunOS"
.include "../../devel/libusb/buildlink3.mk"
.endif
.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
.include "../../graphics/openexr/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../x11/kdelibs3/buildlink3.mk"
.include "../../x11/libXcursor/buildlink3.mk"
.include "../../x11/libXrandr/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../x11/libxkbfile/buildlink3.mk"

.include "../../mk/bsd.pkg.mk"