aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sphinx
diff options
context:
space:
mode:
Diffstat (limited to 'testing/sphinx')
-rw-r--r--testing/sphinx/APKBUILD31
-rw-r--r--testing/sphinx/sphinx-pagesize.patch72
2 files changed, 95 insertions, 8 deletions
diff --git a/testing/sphinx/APKBUILD b/testing/sphinx/APKBUILD
index 8146203b85..da61eb9834 100644
--- a/testing/sphinx/APKBUILD
+++ b/testing/sphinx/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=sphinx
-pkgver=2.1.7
+pkgver=2.2.4
pkgrel=0
pkgdesc="Free open-source SQL full-text search engine"
url="http://www.sphinxsearch.com"
@@ -16,9 +16,21 @@ pkggroups="$pkgname"
subpackages="$pkgname-doc $pkgname-php $pkgname-python"
source="http://sphinxsearch.com/files/$pkgname-$pkgver-release.tar.gz
sphinx.initd
- sphinx.confd"
+ sphinx.confd
+ sphinx-pagesize.patch"
+
_builddir="$srcdir"/$pkgname-$pkgver-release
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
build() {
cd "$_builddir"
./configure --prefix=/usr \
@@ -76,12 +88,15 @@ doc() {
}
-md5sums="f4bda397e0499df965af41939a489df3 sphinx-2.1.7-release.tar.gz
+md5sums="84ecc700490b2db1b868cce82878f36f sphinx-2.2.4-release.tar.gz
b64a6ef4efc424d94a43d73e5f17d833 sphinx.initd
-275efea3b1c4964955637862f60706bb sphinx.confd"
-sha256sums="3662f29ba74ec048d2031b4034af4c879b66fd10f082aa6d3dd85b0a49d95fa2 sphinx-2.1.7-release.tar.gz
+275efea3b1c4964955637862f60706bb sphinx.confd
+8360e9ce8df0147dfe5b596f61023272 sphinx-pagesize.patch"
+sha256sums="c76a88789ca1d7d86df9869718ad217ae8a72740b9e84f2b98b61fa47feb64ef sphinx-2.2.4-release.tar.gz
b2398551b4a87001927f0b9d5da45852160f62a2a296a28ca83ecce4a5c6c77b sphinx.initd
-92758356582373cb0691541ad7844ad86bfee8792023fe933aa7c4eec47713ed sphinx.confd"
-sha512sums="6ce1f9ab78572ef6d9209ead27e949558018f954ac363c078061949b71bdc3a1d380046d9534e67653719966a8146c647fc2ecf823babf8a22f22a1e25671634 sphinx-2.1.7-release.tar.gz
+92758356582373cb0691541ad7844ad86bfee8792023fe933aa7c4eec47713ed sphinx.confd
+ccc6e8992a182ba396d52075104469cdac8b61e02799497ed48216683e513858 sphinx-pagesize.patch"
+sha512sums="9379e6487543e712e5a1a1b60cdfe1bbf34e0f7e0a71c710cf3e1dc2a45898a38648361e3789c2f602fae0d680b7c1ba3bac610e0f9dc7599d33d40f6fdb2c72 sphinx-2.2.4-release.tar.gz
3123405af4f22f6032c1e163a2c5637486ffcf5d87e2f798671b744aa00bf51ebd9921d619b6dce85b95db0d2c2cfce26d1f95659d320d9254c14abc52ed9fef sphinx.initd
-8dbbb3b75bfbde5c6d2bee801df8c7a82650d3943dd667a4330cae473cbf18390aff5eb8d6aa6e5d69c4c995065d48289047b9166fa756c6015bf71f2b13a8f0 sphinx.confd"
+8dbbb3b75bfbde5c6d2bee801df8c7a82650d3943dd667a4330cae473cbf18390aff5eb8d6aa6e5d69c4c995065d48289047b9166fa756c6015bf71f2b13a8f0 sphinx.confd
+9563c5a926e5be30477781038ccf115a809a32bbcbc02c5b82e7985fca76185005968b5f0442772ec598b2ff17ef5c185582e24ae74775e5358abc88192345f2 sphinx-pagesize.patch"
diff --git a/testing/sphinx/sphinx-pagesize.patch b/testing/sphinx/sphinx-pagesize.patch
new file mode 100644
index 0000000000..83a63b0ad5
--- /dev/null
+++ b/testing/sphinx/sphinx-pagesize.patch
@@ -0,0 +1,72 @@
+diff --git a/src/sphinx.cpp b/src/sphinx.cpp
+index 71f75f3..b65aeaa 100644
+--- a/src/sphinx.cpp
++++ b/src/sphinx.cpp
+@@ -8706,7 +8706,7 @@ protected:
+ static const int MAX_BITS = 12;
+ static const int NUM_SIZES = MAX_BITS-MIN_BITS+2; ///< one for 0 (empty pages), and one for each size from min to max
+
+- static const int PAGE_SIZE = 1<<MAX_BITS;
++ static const int PAGE_SIZES = 1<<MAX_BITS;
+ static const int PAGE_ALLOCS = 1<<( MAX_BITS-MIN_BITS);
+ static const int PAGE_BITMAP = ( PAGE_ALLOCS+8*sizeof(DWORD)-1 )/( 8*sizeof(DWORD) );
+
+@@ -8820,9 +8820,9 @@ DWORD * CSphArena::ReInit ( int uMaxBytes )
+
+ DWORD * CSphArena::Init ( int uMaxBytes )
+ {
+- m_iPages = ( uMaxBytes+PAGE_SIZE-1 ) / PAGE_SIZE;
++ m_iPages = ( uMaxBytes+PAGE_SIZES-1 ) / PAGE_SIZES;
+
+- int iData = m_iPages*PAGE_SIZE; // data size, bytes
++ int iData = m_iPages*PAGE_SIZES; // data size, bytes
+ int iMyTaglist = sizeof(int) + MAX_TAGS*sizeof(TagDesc_t); // int length, TagDesc_t[] tags; NOLINT
+ int iMy = m_iPages*sizeof(PageDesc_t) + NUM_SIZES*sizeof(int) + iMyTaglist; // my internal structures size, bytes; NOLINT
+ #if ARENADEBUG
+@@ -8950,7 +8950,7 @@ int CSphArena::RawAlloc ( int iBytes )
+ pPage->m_uBitmap[i] |= ( 1<<iFree );
+
+ pPage->m_iUsed++;
+- if ( pPage->m_iUsed==( PAGE_SIZE >> pPage->m_iSizeBits ) )
++ if ( pPage->m_iUsed==( PAGE_SIZES >> pPage->m_iSizeBits ) )
+ {
+ // this page is full now, unchain from the free-list
+ assert ( m_pFreelistHeads[iSizeSlot]==pPage-m_pPages );
+@@ -8970,7 +8970,7 @@ int CSphArena::RawAlloc ( int iBytes )
+
+ CheckFreelists ();
+
+- int iOffset = ( pPage-m_pPages )*PAGE_SIZE + ( i*32+iFree )*( 1<<iSizeBits ); // raw internal byte offset (FIXME! optimize with shifts?)
++ int iOffset = ( pPage-m_pPages )*PAGE_SIZES + ( i*32+iFree )*( 1<<iSizeBits ); // raw internal byte offset (FIXME! optimize with shifts?)
+ int iIndex = 2 + ( iOffset/sizeof(DWORD) ); // dword index with tag and backtrack fixup
+
+ m_pBasePtr[iIndex-1] = DWORD(-1); // untagged by default
+@@ -8988,7 +8988,7 @@ void CSphArena::RawFree ( int iIndex )
+ CheckFreelists ();
+
+ int iOffset = (iIndex-2)*sizeof(DWORD); // remove tag fixup, and go to raw internal byte offset
+- int iPage = iOffset / PAGE_SIZE;
++ int iPage = iOffset / PAGE_SIZES;
+
+ if ( iPage<0 || iPage>m_iPages )
+ {
+@@ -8997,8 +8997,8 @@ void CSphArena::RawFree ( int iIndex )
+ }
+
+ PageDesc_t * pPage = m_pPages + iPage;
+- int iBit = ( iOffset % PAGE_SIZE ) >> pPage->m_iSizeBits;
+- assert ( ( iOffset % PAGE_SIZE )==( iBit << pPage->m_iSizeBits ) && "internal error, freed offset is unaligned" );
++ int iBit = ( iOffset % PAGE_SIZES ) >> pPage->m_iSizeBits;
++ assert ( ( iOffset % PAGE_SIZES )==( iBit << pPage->m_iSizeBits ) && "internal error, freed offset is unaligned" );
+
+ if (!( pPage->m_uBitmap[iBit>>5] & ( 1UL<<(iBit & 31) ) ))
+ {
+@@ -9018,7 +9018,7 @@ void CSphArena::RawFree ( int iIndex )
+
+ int iSizeSlot = pPage->m_iSizeBits-MIN_BITS+1;
+
+- if ( pPage->m_iUsed==( PAGE_SIZE >> pPage->m_iSizeBits )-1 )
++ if ( pPage->m_iUsed==( PAGE_SIZES >> pPage->m_iSizeBits )-1 )
+ {
+ // this page was full, but it's semi-free now
+ // chain to free-list