summaryrefslogtreecommitdiff
path: root/x11/kdebase3/Makefile
blob: a01ba6570d7cdbc041127c29057b9748e537a65b (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
# $NetBSD: Makefile,v 1.29 2003/07/30 13:34:58 markd Exp $

DISTNAME=	kdebase-3.1.3
CATEGORIES=	x11
COMMENT=	Base modules for the KDE 3 integrated X11 desktop

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

DISTFILES=	${DISTNAME}${EXTRACT_SUFX} Daemon.png Daemon.README

EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

USE_BUILDLINK2=		YES
USE_PKGINSTALL=		YES

CONFIGURE_ARGS+=	--with-ssl-dir="${BUILDLINK_PREFIX.openssl}"
CONFIGURE_ARGS+=	--with-ldap="${BUILDLINK_PREFIX.openldap}"
CONFIGURE_ARGS+=	--without-pam
CONFIGURE_ARGS+=	--without-cdparanoia
CONFIGURE_ARGS+=	--without-lame
CONFIGURE_ARGS+=	--without-vorbis
CONFIGURE_ARGS+=	--without-java

REPLACE_PERL=		kcontrol/fileshare/fileshareset

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

.if ${OPSYS} == "NetBSD"
LIBS+=			${EXPORT_SYMBOLS_LDFLAGS}
.endif

PLIST_SRC=		${WRKDIR}/PLIST.Xdpms

.if ${OPSYS} == "Linux"
KDE3_NSPLUGINS?=	YES
.else
KDE3_NSPLUGINS?=	NO
.endif
BUILD_DEFS+=		KDE3_NSPLUGINS

.if ${KDE3_NSPLUGINS} == "YES"
PLIST_SRC+=		${PKGDIR}/PLIST.nsplugins
CONFIGURE_ARGS+=	--with-motif-includes="${BUILDLINK_PREFIX.motif}/include"
CONFIGURE_ARGS+=	--with-motif-libraries="${BUILDLINK_PREFIX.motif}/lib"
.include "../../mk/motif.buildlink2.mk"
.else
CONFIGURE_ARGS+=	--without-motif
.endif

_KDE3_EXTRA_INCLUDES=	${LOCALBASE}/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

.if ${OPSYS} == "NetBSD" && !exists(${X11BASE}/lib/libxkbfile.so)
PLIST_SUBST+=		KCMKEYBOARD="kcm_keyboard.a"
.else
PLIST_SUBST+=		KCMKEYBOARD="kcm_keyboard.so"
.endif

ICONDIR=		share/kde/icons

FOO_MAIN_FILES= \
	kate/app/dummy_main.cpp \
	kcontrol/access/kaccess_main.cpp \
	kcontrol/kcontrol/kcminit_main.cpp \
	kcontrol/kcontrol/kcmshell_main.cpp \
	kcontrol/kcontrol/kcontrol_main.cpp \
	kdeprint/kjobviewer/kjobviewer_main.cpp \
	kdesktop/kdesktop_main.cc \
	khotkeys/khotkeys/khotkeys_main.cpp \
	kicker/kicker_main.cpp \
	kicker/proxy/appletproxy_main.cpp \
	kicker/proxy/extensionproxy_main.cpp \
	klipper/klipper_main.cpp \
	kmenuedit/kmenuedit_main.cpp \
	konqueror/client/kfmclient_main.cc \
	konqueror/keditbookmarks/keditbookmarks_main.cpp \
	konqueror/konqueror_main.cc \
	konsole/konsole/konsole_main.cpp \
	konsole/konsole/kwrited_main.cpp \
	ksmserver/ksmserver_main.cpp \
	kxkb/kxkb_main.cpp \
	legacyimport/klegacyimport_main.cpp

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

# Several programs need to be setuid-root, but due to the way that KDE3
# finds executables, the files must have their read bit set so that
# KStandardDir::findResource() will find them.
#
_KDE_SETUID_ROOT=	${ROOT_USER} ${ROOT_GROUP} 4755
SPECIAL_PERMS+=	${PREFIX}/bin/konsole_grantpty	${_KDE_SETUID_ROOT}
SPECIAL_PERMS+=	${PREFIX}/bin/kcheckpass	${_KDE_SETUID_ROOT}
SPECIAL_PERMS+=	${PREFIX}/bin/ksysguardd	${_KDE_SETUID_ROOT}

pre-configure:
	cd ${WRKSRC};							\
	files="kioslave/info/kde-info2html.conf khelpcenter/infoconsts.h"; \
	for file in $${files}; do					\
		${SED} -e 's|@LOCALBASE@|${LOCALBASE}|' $${file} >	\
			$${file}.new;					\
		${MV} -f $${file}.new $${file};				\
	done

post-build:
	cd ${WRKSRC};							\
	files="kioslave/info/kde-info2html.conf";			\
	for file in $${files}; do					\
		${SED} ${FILES_SUBST_SED} $${file} > $${file}.new;	\
		${MV} -f $${file}.new $${file};				\
	done

post-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/kde/templates/.source/emptydir
	${INSTALL_DATA} ${DISTDIR}/Daemon.png ${PREFIX}/${ICONDIR}
	${INSTALL_DATA} ${DISTDIR}/Daemon.README			\
		${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 ${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 ${PREFIX}/$${file} ]; then			\
			${ECHO} "$${file}";				\
		fi;							\
	  done;								\
	) > ${WRKDIR}/PLIST.Xdpms

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

.include "../../databases/openldap/buildlink2.mk"
.include "../../fonts/fontconfig/buildlink2.mk"
.include "../../graphics/freetype2/buildlink2.mk"
.include "../../meta-pkgs/kde3/buildlink2.mk"
.include "../../x11/qt3-tools/buildlink2.mk"
.include "../../x11/kdelibs3/buildlink2.mk"

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