1SUMMARY="X Session Management Library"
2DESCRIPTION="The Session Management Library (SMlib) is a low-level \"C\" \
3language interface to XSMP. It is expected that higher level toolkits, \
4such as Xt, will hide many of the details of session management from \
5clients. Higher level toolkits might also be developed for session managers \
6to use, but no such effort is currently under way."
7HOMEPAGE="https://www.x.org/releases/individual/lib/"
8COPYRIGHT="1989, 1998 The Open Group
9	2002 Oracle and/or its affiliates"
10LICENSE="MIT (no promotion)"
11REVISION="3"
12SOURCE_URI="https://www.x.org/releases/individual/lib/libSM-$portVersion.tar.bz2"
13CHECKSUM_SHA256="2d264499dcb05f56438dee12a1b4b71d76736ce7ba7aa6efbf15ebb113769cbb"
14SOURCE_DIR="libSM-$portVersion"
15
16ARCHITECTURES="all"
17SECONDARY_ARCHITECTURES="x86"
18
19libVersion="6.0.1"
20libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
21
22PROVIDES="
23	libsm$secondaryArchSuffix = $portVersion
24	lib:libSM$secondaryArchSuffix = $libVersionCompat
25	"
26REQUIRES="
27	haiku$secondaryArchSuffix
28	lib:libICE$secondaryArchSuffix
29	"
30
31PROVIDES_devel="
32	libsm${secondaryArchSuffix}_devel = $portVersion
33	devel:libSM$secondaryArchSuffix = $libVersion
34	"
35REQUIRES_devel="
36	libsm$secondaryArchSuffix == $portVersion base
37	devel:libICE$secondaryArchSuffix
38	devel:xproto
39	"
40
41BUILD_REQUIRES="
42	haiku${secondaryArchSuffix}_devel
43	docbook_xml_dtd
44	docbook_xsl_stylesheets
45	devel:libICE$secondaryArchSuffix
46	devel:util_macros
47	devel:xorg_sgml_doctools
48	devel:xtrans
49	"
50BUILD_PREREQUIRES="
51	cmd:aclocal
52	cmd:autoconf
53	cmd:gcc$secondaryArchSuffix
54	cmd:libtoolize$secondaryArchSuffix
55	cmd:make
56	cmd:pkg_config$secondaryArchSuffix
57	cmd:xmlto
58	cmd:xsltproc
59	"
60
61defineDebugInfoPackage libsm$secondaryArchSuffix \
62	$libDir/libSM.so.$libVersion
63
64BUILD()
65{
66	export LDFLAGS="-lnetwork"
67	autoreconf -vfi
68	runConfigure --omit-dirs docDir ./configure \
69		--docdir=$developDocDir \
70		--disable-static \
71		--enable-tcp-transport
72	make $jobArgs
73}
74
75INSTALL()
76{
77	make install
78
79	if [ -z "$secondaryArchSuffix" ]; then
80		install -m 0644 -t "$developDocDir" README
81	else
82		rm -rf "$developDir/documentation"
83	fi
84
85	rm -f $libDir/*.la
86
87	prepareInstalledDevelLib libSM
88	fixPkgconfig
89
90	# devel package
91	packageEntries devel \
92		$developDir
93}
94