summaryrefslogtreecommitdiff
path: root/x11/kdelibs3/Makefile
blob: c10af65667ea788892e0a9723566bf137a356968 (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
# $NetBSD: Makefile,v 1.71 2004/12/14 11:02:18 markd Exp $

DISTNAME=	kdelibs-${_KDE_VERSION}
PKGREVISION=	2
CATEGORIES=	x11
COMMENT=	Support libraries for the KDE integrated X11 desktop

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

CONFLICTS+=	koffice3<=1.1.1

USE_BUILDLINK3=		YES
USE_DIRS+=		xdg-1.1
USE_PERL5=		run
USE_PKGINSTALL=		YES

CONFIGURE_ARGS+=	--with-ssl-dir="${BUILDLINK_PREFIX.openssl}"

SGML_CATALOGS=		${PREFIX}/share/kde/apps/ksgmltools2/customization/catalog
SGML_CATALOGS+=		${PREFIX}/share/kde/apps/ksgmltools2/docbook/xml-dtd-4.1.2/docbook.cat
SGML_CATALOGS+=		${PREFIX}/share/kde/apps/ksgmltools2/docbook/xml-dtd-4.2/docbook.cat

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

LIBS.NetBSD+=			${EXPORT_SYMBOLS_LDFLAGS}

_SORTED!=	${ECHO} ${KDE3_DIRS} | ${TR} -s ' \t' '\n' | ${SORT}
MAKE_DIRS+=	${_SORTED:S/^/${PREFIX}\//}

REPLACE_PERL= \
	kio/proxytype.pl \
	kio/useragent.pl \
	kio/misc/fileshareset \
	kdeui/preparetips

UNLIMIT_RESOURCES=	datasize memorysize

SUBST_CLASSES+=			kdelibsfix
SUBST_STAGE.kdelibsfix=		pre-configure
SUBST_MESSAGE.kdelibsfix=	"Fixing hardcoded paths."
SUBST_FILES.kdelibsfix= \
	kdecore/kstandarddirs.cpp \
	kdeui/ksconfig.cpp \
	kio/kssl/kopenssl.cc
SUBST_SED.kdelibsfix=		-e 's:@LOCALBASE@:${LOCALBASE}:g' \
	-e 's:@PKGLOCALEDIR@:${PKGLOCALEDIR}:g'

.if defined(USE_CUPS) && (${USE_CUPS} == "YES")
PKG_DEFAULT_OPTIONS+=	cups
.endif

PKG_OPTIONS_VAR=	PKG_OPTIONS.kdelibs
PKG_SUPPORTED_OPTIONS=	cups
.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mcups)
.include "../../print/cups/buildlink3.mk"
PLIST_SUBST+=		CUPS=
.else
PLIST_SUBST+=		CUPS="@comment "
.endif

.if ${OPSYS} == "NetBSD"
.  if ${OS_VERSION:M1.5.[12]*} || ${OS_VERSION:M1.[0-4]*}
PLIST_SUBST+=		KDED_WORKAROUND="@comment "
.  else
PLIST_SUBST+=		KDED_WORKAROUND=""
.  endif
.else
PLIST_SUBST+=		KDED_WORKAROUND=""
.endif

.include "../../mk/krb5.buildlink3.mk"
CONFIGURE_ARGS+=	--with-gssapi=yes



post-install:
.if ${OPSYS} == "NetBSD"
.  if ${OS_VERSION:M1.5.[12]*} || ${OS_VERSION:M1.[0-4]*}
	@${RM} ${PREFIX}/lib/kded.*
.  endif
.endif

.if ${MACHINE_ARCH} == "alpha"
GCC_REQD+=		2.95
.endif

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

.include "../../archivers/bzip2/buildlink3.mk"
.include "../../audio/arts/buildlink3.mk"
.include "../../audio/libaudiofile/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../graphics/libart2/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/aspell/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../textproc/libxslt/buildlink3.mk"
.include "../../textproc/xmlcatmgr/catalogs.mk"
.include "../../mk/ossaudio.buildlink3.mk"

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

# XXX On NetBSD, the egcs and gcc-2.95.3 for:
# XXX
# XXX     alpha and sparc
# XXX
# XXX has an optimization bug when compiling with -O2 that is tickled by
# XXX ${WRKSRC}/kio/kio/global.cpp
# XXX ${WRKSRC}/kdeprint/management/kmiconview.cpp.
# XXX and others
#
.if ${OPSYS} == "NetBSD"
.  if (${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc")
CXXFLAGS:=      ${CXXFLAGS:C/-O[0-9]*/-O/g}
CFLAGS:=        ${CFLAGS:C/-O[0-9]*/-O/g}
CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS}"
CONFIGURE_ENV+= CFLAGS="${CFLAGS}"
.  endif
#
# Configure finds these but apparently they are not ready for primetime
# and build will blow up as declarations in netdb.h are not visible
CONFIGURE_ENV+= ac_cv_func_getservbyname_r='no'
CONFIGURE_ENV+= ac_cv_func_getservbyport_r='no'
CONFIGURE_ENV+= ac_cv_func_getprotobyname_r='no'
.endif

.if ${OPSYS} == "SunOS"
# We require use of a recent enough libbz2 to have the BZ2_ prefixes
# so force this as configure gets this wrong on Solaris 9
CONFIGURE_ENV+= ac_cv_lib_bzip2='no'
.endif