xapian-1.4.13.recipe revision 5e34989d
1SUMMARY="A probabilistic information retrieval library with numerous bindings"
2DESCRIPTION="Xapian is an open source search engine library written in C++. \
3It has bindings for a large number of other programming languages, including \
4Perl, Python, Java and Ruby. It is hightly adaptable and extensible, fitting \
5a wide range of information retrieval-related tasks. Xapian empowers the Omega \
6search engine package. It supports a wide range of advanced features such as \
7native Unicode support and modern search algorithms."
8HOMEPAGE="https://xapian.org/"
9COPYRIGHT="1999-2018 The Xapian Authors"
10LICENSE="GNU GPL v2"
11REVISION="1"
12SOURCE_URI="https://oligarchy.co.uk/xapian/$portVersion/xapian-core-$portVersion.tar.xz"
13CHECKSUM_SHA256="93f8ffffa80c5e6036befbf356f34456cc18c2f745cef85e9b4cfc254042137c"
14SOURCE_DIR="xapian-core-$portVersion"
15
16ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
17SECONDARY_ARCHITECTURES="?x86"
18
19commandSuffix=$secondaryArchSuffix
20commandBinDir=$binDir
21if [ "$targetArchitecture" = x86_gcc2 ]; then
22	commandSuffix=
23	commandBinDir=$prefix/bin
24fi
25
26libVersion="30.9.1"
27libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
28
29PROVIDES="
30	xapian$secondaryArchSuffix = $portVersion
31	lib:libxapian$secondaryArchSuffix = $libVersionCompat
32	cmd:copydatabase$commandSuffix = $portVersion
33	cmd:quest$commandSuffix = $portVersion
34	cmd:simpleexpand$commandSuffix = $portVersion
35	cmd:simpleindex$commandSuffix = $portVersion
36	cmd:simplesearch$commandSuffix = $portVersion
37	cmd:xapian_check$commandSuffix = $portVersion
38	cmd:xapian_compact$commandSuffix = $portVersion
39	cmd:xapian_delve$commandSuffix = $portVersion
40	cmd:xapian_metadata$commandSuffix = $portVersion
41	cmd:xapian_pos$commandSuffix = $portVersion
42	cmd:xapian_progsrv$commandSuffix = $portVersion
43	cmd:xapian_replicate$commandSuffix = $portVersion
44	cmd:xapian_replicate_server$commandSuffix = $portVersion
45	cmd:xapian_tcpsrv$commandSuffix = $portVersion
46	"
47REQUIRES="
48	haiku$secondaryArchSuffix
49	lib:libintl$secondaryArchSuffix
50	lib:libuuid$secondaryArchSuffix >= 1.3
51	lib:libz$secondaryArchSuffix
52	"
53
54PROVIDES_devel="
55	xapian${secondaryArchSuffix}_devel = $portVersion
56	devel:libxapian$secondaryArchSuffix = $libVersionCompat
57	cmd:xapian_config$secondaryArchSuffix = $portVersion
58	"
59REQUIRES_devel="
60	xapian$secondaryArchSuffix == $portVersion base
61	"
62if [ -n "$secondaryArchSuffix" -a "$commandBinDir" = "$binDir" ]; then
63CONFLICTS_devel="
64	xapian_devel
65	"
66fi
67
68BUILD_REQUIRES="
69	haiku${secondaryArchSuffix}_devel
70	devel:libintl$secondaryArchSuffix
71	devel:libuuid$secondaryArchSuffix >= 1.3
72	devel:libz$secondaryArchSuffix
73	"
74BUILD_PREREQUIRES="
75	cmd:awk
76	cmd:cmp
77	cmd:diff
78	cmd:gcc$secondaryArchSuffix
79	cmd:make
80	cmd:sed
81	"
82
83debugList=("$libDir"/libxapian.so.$libVersion)
84for i in `echo "$PROVIDES" | sed -n -e \
85		"s/^[\t]*cmd:\(.*\)$commandSuffix =.*/\1/p;" | sed -e "s/_/-/g"`; do
86	debugList+=("$commandBinDir"/$i)
87done
88defineDebugInfoPackage xapian$secondaryArchSuffix "${debugList[@]}"
89
90BUILD()
91{
92	LIBS="-lintl" \
93	runConfigure --omit-dirs binDir ./configure --bindir="$commandBinDir"
94	make $jobArgs
95}
96
97INSTALL()
98{
99	make install
100
101	rm -f "$libDir"/libxapian.la
102
103	if [ -n "$secondaryArchSuffix" -a "$commandBinDir" != "$binDir" ]; then
104		mkdir -p "$binDir"
105		mv "$commandBinDir"/xapian-config "$binDir"
106	fi
107
108	prepareInstalledDevelLib libxapian
109	fixPkgconfig
110
111	# move $libDir/cmake/xapian/* to $dataDir/cmake/Modules/xapian/*
112	mkdir -p "$dataDir"/cmake
113	mv "$libDir"/cmake "$dataDir"/cmake/Modules
114
115	packageEntries devel \
116		"$binDir"/xapian-config \
117		"$manDir"/man1/xapian-config.1 \
118		"$developDir" \
119		"$dataDir"
120
121	if [ -n "$secondaryArchSuffix" -a "$commandBinDir" != "$binDir" ]; then
122		rmdir "$binDir"
123	fi
124}
125
126TEST()
127{
128	LIBRARY_PATH="$sourceDir/.libs${LIBRARY_PATH:+:$LIBRARY_PATH}" \
129	make check
130}
131