mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
lmdb: new recipe (#1356)
This commit is contained in:
47
dev-db/lmdb/licenses/OpenLDAP Public License
Normal file
47
dev-db/lmdb/licenses/OpenLDAP Public License
Normal file
@@ -0,0 +1,47 @@
|
||||
The OpenLDAP Public License
|
||||
Version 2.8, 17 August 2003
|
||||
|
||||
Redistribution and use of this software and associated documentation
|
||||
("Software"), with or without modification, are permitted provided
|
||||
that the following conditions are met:
|
||||
|
||||
1. Redistributions in source form must retain copyright statements
|
||||
and notices,
|
||||
|
||||
2. Redistributions in binary form must reproduce applicable copyright
|
||||
statements and notices, this list of conditions, and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution, and
|
||||
|
||||
3. Redistributions must contain a verbatim copy of this document.
|
||||
|
||||
The OpenLDAP Foundation may revise this license from time to time.
|
||||
Each revision is distinguished by a version number. You may use
|
||||
this Software under terms of this license revision or under the
|
||||
terms of any subsequent revision of the license.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS
|
||||
CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S)
|
||||
OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The names of the authors and copyright holders must not be used in
|
||||
advertising or otherwise to promote the sale, use or other dealing
|
||||
in this Software without specific, written prior permission. Title
|
||||
to copyright in this Software shall at all times remain with copyright
|
||||
holders.
|
||||
|
||||
OpenLDAP is a registered trademark of the OpenLDAP Foundation.
|
||||
|
||||
Copyright 1999-2003 The OpenLDAP Foundation, Redwood City,
|
||||
California, USA. All Rights Reserved. Permission to copy and
|
||||
distribute verbatim copies of this document is granted.
|
||||
76
dev-db/lmdb/lmdb-0.9.19.recipe
Normal file
76
dev-db/lmdb/lmdb-0.9.19.recipe
Normal file
@@ -0,0 +1,76 @@
|
||||
SUMMARY="A database engine"
|
||||
DESCRIPTION="LMDB is compact, fast, powerful, and robust and implements \
|
||||
a simplified variant of the BerkeleyDB (BDB) API."
|
||||
HOMEPAGE="http://symas.com/mdb/"
|
||||
COPYRIGHT="2011-2016 Howard Chu, Symas Corp."
|
||||
LICENSE="OpenLDAP Public License"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/LMDB/lmdb/archive/lmdb-LMDB_$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="108532fb94c6f227558d45be3f3347b52539f0f58290a7bb31ec06c462d05326"
|
||||
SOURCE_DIR="lmdb-LMDB_$portVersion"
|
||||
PATCHES="lmdb-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86_gcc2 x86"
|
||||
|
||||
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
lmdb$secondaryArchSuffix = $portVersion compat >= 0
|
||||
cmd:mdb_copy$commandSuffix
|
||||
cmd:mdb_dump$commandSuffix
|
||||
cmd:mdb_load$commandSuffix
|
||||
cmd:mdb_stat$commandSuffix
|
||||
lib:liblmdb$secondaryArchSuffix = $portVersion compat >= 0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
lmdb$secondaryArchSuffix_devel = $portVersion compat >= 0
|
||||
devel:liblmdb$secondaryArchSuffix = $portVersion compat >= 0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
lmdb$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd libraries/liblmdb
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd libraries/liblmdb
|
||||
|
||||
make install \
|
||||
prefix="$prefix" \
|
||||
bindir="$binDir" \
|
||||
libdir="$libDir" \
|
||||
includedir="$includeDir" \
|
||||
datarootdir="$dataDir" \
|
||||
mandir="$manDir/man1"
|
||||
|
||||
prepareInstalledDevelLib liblmdb
|
||||
packageEntries devel $developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make test
|
||||
}
|
||||
62
dev-db/lmdb/patches/lmdb-0.9.19.patchset
Normal file
62
dev-db/lmdb/patches/lmdb-0.9.19.patchset
Normal file
@@ -0,0 +1,62 @@
|
||||
From 8fa9879adb3d79a76aa0351380c88db9425d97b7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sat, 20 May 2017 15:33:40 +0200
|
||||
Subject: LMDB: Haiku build fix
|
||||
|
||||
|
||||
diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
|
||||
index f254511..0075f9d 100644
|
||||
--- a/libraries/liblmdb/Makefile
|
||||
+++ b/libraries/liblmdb/Makefile
|
||||
@@ -21,7 +21,7 @@
|
||||
CC = gcc
|
||||
AR = ar
|
||||
W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized
|
||||
-THREADS = -pthread
|
||||
+THREADS = -lpthread
|
||||
OPT = -O2 -g
|
||||
CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
|
||||
LDLIBS =
|
||||
@@ -65,8 +65,8 @@ liblmdb.a: mdb.o midl.o
|
||||
$(AR) rs $@ mdb.o midl.o
|
||||
|
||||
liblmdb$(SOEXT): mdb.lo midl.lo
|
||||
-# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
|
||||
- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
|
||||
+# $(CC) $(LDFLAGS) -lpthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
|
||||
+ $(CC) $(LDFLAGS) -lpthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
|
||||
|
||||
mdb_stat: mdb_stat.o liblmdb.a
|
||||
mdb_copy: mdb_copy.o liblmdb.a
|
||||
@@ -102,13 +102,13 @@ COV_OBJS=xmdb.o xmidl.o
|
||||
|
||||
coverage: xmtest
|
||||
for i in mtest*.c [0-9]*.c; do j=`basename \$$i .c`; $(MAKE) $$j.o; \
|
||||
- gcc -o x$$j $$j.o $(COV_OBJS) -pthread $(COV_FLAGS); \
|
||||
+ gcc -o x$$j $$j.o $(COV_OBJS) -lpthread $(COV_FLAGS); \
|
||||
rm -rf testdb; mkdir testdb; ./x$$j; done
|
||||
gcov xmdb.c
|
||||
gcov xmidl.c
|
||||
|
||||
xmtest: mtest.o xmdb.o xmidl.o
|
||||
- gcc -o xmtest mtest.o xmdb.o xmidl.o -pthread $(COV_FLAGS)
|
||||
+ gcc -o xmtest mtest.o xmdb.o xmidl.o -lpthread $(COV_FLAGS)
|
||||
|
||||
xmdb.o: mdb.c lmdb.h midl.h
|
||||
$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -O0 $(COV_FLAGS) -c mdb.c -o $@
|
||||
diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c
|
||||
index 23c1f00..46ef302 100644
|
||||
--- a/libraries/liblmdb/mdb.c
|
||||
+++ b/libraries/liblmdb/mdb.c
|
||||
@@ -120,7 +120,7 @@ typedef SSIZE_T ssize_t;
|
||||
#include <resolv.h> /* defines BYTE_ORDER on HPUX and Solaris */
|
||||
#endif
|
||||
|
||||
-#if defined(__APPLE__) || defined (BSD) || defined(__FreeBSD_kernel__)
|
||||
+#if defined(__APPLE__) || defined (BSD) || defined(__FreeBSD_kernel__) || defined(__HAIKU__)
|
||||
# define MDB_USE_POSIX_SEM 1
|
||||
# define MDB_FDATASYNC fsync
|
||||
#elif defined(ANDROID)
|
||||
--
|
||||
2.12.2
|
||||
|
||||
Reference in New Issue
Block a user