aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2013-03-12 07:58:01 +0800
committerdelphij <delphij@FreeBSD.org>2013-03-12 07:58:01 +0800
commit21655a239a6fe51b27a544085b639ab6f3dab84f (patch)
treebe49b4d6bce7be618a767c62f05d79e9699b49c1
parent9aec80d0e88ac0fea0883b5df2148e6e443f0fac (diff)
downloadfreebsd-ports-gnome-21655a239a6fe51b27a544085b639ab6f3dab84f.tar.gz
freebsd-ports-gnome-21655a239a6fe51b27a544085b639ab6f3dab84f.tar.zst
freebsd-ports-gnome-21655a239a6fe51b27a544085b639ab6f3dab84f.zip
LMDB is an ultra-fast, ultra-compact key-value data
store developed by Symas for the OpenLDAP Project. PR: ports/174007
-rw-r--r--databases/Makefile1
-rw-r--r--databases/lmdb/Makefile29
-rw-r--r--databases/lmdb/distinfo2
-rw-r--r--databases/lmdb/files/patch-Makefile42
-rw-r--r--databases/lmdb/pkg-descr13
5 files changed, 87 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 69de25d2e5eb..76171d65fb6a 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -178,6 +178,7 @@
SUBDIR += linux-oracle-instantclient-sdk
SUBDIR += linux-oracle-instantclient-sqlplus
SUBDIR += liquibase
+ SUBDIR += lmdb
SUBDIR += lsdb
SUBDIR += luasql-mysql
SUBDIR += luasql-postgres
diff --git a/databases/lmdb/Makefile b/databases/lmdb/Makefile
new file mode 100644
index 000000000000..f2f33e5ca3ea
--- /dev/null
+++ b/databases/lmdb/Makefile
@@ -0,0 +1,29 @@
+# Created by: Xin Li <delphij@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= lmdb
+PORTVERSION= 0.9.6
+CATEGORIES= databases
+MASTER_SITES= https://gitorious.org/${GO_ACCOUNT}/${GO_PROJECT}/archive-tarball/${GO_TAGNAME}?dummy=
+
+MAINTAINER= delphij@FreeBSD.org
+COMMENT= OpenLDAP Lightning Memory-Mapped Database
+
+# XXX FreeBSD does not implement O_DSYNC and fdatasync at this time.
+CFLAGS+= -DMDB_DSYNC=O_SYNC -Dfdatasync=fsync
+WRKSRC= ${WRKDIR}/mdb-mdb/libraries/liblmdb
+MAKE_ENV+= CC="${CC}"
+MAKE_ENV+= XCFLAGS="${CFLAGS} ${PTHREAD_LIBS}" prefix="${PREFIX}" INSTALL_PROGRAM="${INSTALL_PROGRAM}"
+MAKE_ENV+= INSTALL_LIB="${INSTALL_LIB}" INSTALL_DATA="${INSTALL_DATA}" INSTALL_MAN="${INSTALL_MAN}"
+
+GO_ACCOUNT= mdb
+GO_PROJECT= mdb
+GO_TAGNAME= ${PORTNAME:U}_${PORTVERSION:S/./_/g}
+FETCH_ARGS?= -o - > ${DISTDIR}/${DISTFILES}
+
+MAN1= mdb_stat.1 mdb_copy.1
+PLIST_FILES= lib/liblmdb.a lib/liblmdb.so
+PLIST_FILES+= bin/mdb_stat bin/mdb_copy
+PLIST_FILES+= include/lmdb.h
+
+.include <bsd.port.mk>
diff --git a/databases/lmdb/distinfo b/databases/lmdb/distinfo
new file mode 100644
index 000000000000..f7228f170943
--- /dev/null
+++ b/databases/lmdb/distinfo
@@ -0,0 +1,2 @@
+SHA256 (lmdb-0.9.6.tar.gz) = dddbf8de3f1802d6060f14bbcd37397fbebaf10971a20bfe5f2dcb008a44f14d
+SIZE (lmdb-0.9.6.tar.gz) = 96903
diff --git a/databases/lmdb/files/patch-Makefile b/databases/lmdb/files/patch-Makefile
new file mode 100644
index 000000000000..7a565db8a242
--- /dev/null
+++ b/databases/lmdb/files/patch-Makefile
@@ -0,0 +1,42 @@
+--- ./Makefile.orig 2013-02-25 05:06:51.000000000 -0800
++++ ./Makefile 2013-03-11 12:29:40.265384057 -0700
+@@ -1,23 +1,21 @@
+-CC = gcc
+ W = -W -Wall -Wno-unused-parameter -Wbad-function-cast
+ OPT = -O2 -g
+-CFLAGS = -pthread $(OPT) $(W) $(XCFLAGS)
++CFLAGS = $(XCFLAGS)
+ LDLIBS =
+ SOLIBS =
+-prefix = /usr/local
+
+ IHDRS = lmdb.h
+ ILIBS = liblmdb.a liblmdb.so
+ IPROGS = mdb_stat mdb_copy
+ IDOCS = mdb_stat.1 mdb_copy.1
+ PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
+-all: $(ILIBS) $(PROGS)
++all: $(ILIBS) $(IPROGS)
+
+ install: $(ILIBS) $(IPROGS) $(IHDRS)
+- cp $(IPROGS) $(DESTDIR)$(prefix)/bin
+- cp $(ILIBS) $(DESTDIR)$(prefix)/lib
+- cp $(IHDRS) $(DESTDIR)$(prefix)/include
+- cp $(IDOCS) $(DESTDIR)$(prefix)/man/man1
++ ${INSTALL_PROGRAM} $(IPROGS) $(DESTDIR)$(prefix)/bin
++ ${INSTALL_LIB} $(ILIBS) $(DESTDIR)$(prefix)/lib
++ ${INSTALL_DATA} $(IHDRS) $(DESTDIR)$(prefix)/include
++ ${INSTALL_MAN} $(IDOCS) $(DESTDIR)$(prefix)/man/man1
+
+ clean:
+ rm -rf $(PROGS) *.[ao] *.so *~ testdb
+@@ -33,7 +31,9 @@
+ $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.o midl.o $(SOLIBS)
+
+ mdb_stat: mdb_stat.o liblmdb.a
++ ${CC} ${LDFLAGS} -o ${.TARGET} mdb_stat.o liblmdb.a
+ mdb_copy: mdb_copy.o liblmdb.a
++ ${CC} ${LDFLAGS} -o ${.TARGET} mdb_copy.o liblmdb.a
+ mtest: mtest.o liblmdb.a
+ mtest2: mtest2.o liblmdb.a
+ mtest3: mtest3.o liblmdb.a
diff --git a/databases/lmdb/pkg-descr b/databases/lmdb/pkg-descr
new file mode 100644
index 000000000000..95828de745ac
--- /dev/null
+++ b/databases/lmdb/pkg-descr
@@ -0,0 +1,13 @@
+LMDB is an ultra-fast, ultra-compact key-value data
+store developed by Symas for the OpenLDAP Project.
+
+It uses memory-mapped files, so it has the read
+performance of a pure in-memory database while still
+offering the persistence of standard disk-based
+databases, and is only limited to the size of the
+virtual address space, (it is not limited to the
+size of physical RAM). LMDB was originally called
+MDB, but was renamed to avoid confusion with other
+software associated with the name MDB.
+
+WWW: http://symas.com/mdb/