aboutsummaryrefslogtreecommitdiffstats
path: root/databases/leveldb
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2012-06-17 04:21:57 +0800
committersunpoet <sunpoet@FreeBSD.org>2012-06-17 04:21:57 +0800
commit481ecc53730d96ede74afe7e209232bedbdea150 (patch)
tree58720f4a3cab400b1bcb7259511f95df5484a272 /databases/leveldb
parentd6fa8e8e36dda4844fe01bb2a3624680ccb1b5e5 (diff)
downloadfreebsd-ports-gnome-481ecc53730d96ede74afe7e209232bedbdea150.tar.gz
freebsd-ports-gnome-481ecc53730d96ede74afe7e209232bedbdea150.tar.zst
freebsd-ports-gnome-481ecc53730d96ede74afe7e209232bedbdea150.zip
- Update to 1.5.0
Changes: http://code.google.com/p/leveldb/source/list http://code.google.com/p/leveldb/source/detail?r=dd0d562b4d4fbd07db6a44f9e221f8d368fee8e4 http://code.google.com/p/leveldb/source/detail?r=b914f91b1049699aa2d0e08660aa9246b87bdcb7 http://code.google.com/p/leveldb/source/detail?r=075a35a6d390167b77b687e067dd0ba593e7f624 http://code.google.com/p/leveldb/source/detail?r=85584d497e7b354853b72f450683d59fcf6b9c5c http://code.google.com/p/leveldb/source/detail?r=bc1ee4d25e09b04e074db330a41f54ef4af0e31b http://code.google.com/p/leveldb/source/detail?r=a1ad4d1995dc8efeb0d3d7a40b8bb63c9b7c8259 Submitted by: vanilla
Diffstat (limited to 'databases/leveldb')
-rw-r--r--databases/leveldb/Makefile35
-rw-r--r--databases/leveldb/distinfo4
-rw-r--r--databases/leveldb/files/patch-Makefile43
-rw-r--r--databases/leveldb/files/patch-port-port_posix.h14
-rw-r--r--databases/leveldb/pkg-plist4
5 files changed, 43 insertions, 57 deletions
diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile
index e8a53e9afae4..fcad2bf74dd0 100644
--- a/databases/leveldb/Makefile
+++ b/databases/leveldb/Makefile
@@ -6,9 +6,9 @@
#
PORTNAME= leveldb
-PORTVERSION= 1.2.20120315
+PORTVERSION= 1.5.0
CATEGORIES= databases
-MASTER_SITES= LOCAL/sunpoet
+MASTER_SITES= GOOGLE_CODE
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= A fast and lightweight key/value database library by Google
@@ -16,11 +16,18 @@ COMMENT= A fast and lightweight key/value database library by Google
OPTIONS= PERFTOOLS "Build with Google perftools" off \
SNAPPY "Build with snappy" on
-CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USE_GMAKE= yes
USE_LDCONFIG= yes
-USE_XZ= yes
+
+PLIST_SUB= SHLIB_MAJOR=${SHLIB_MAJOR} \
+ SHLIB_MINOR=${SHLIB_MINOR}
+
+NOT_FOR_ARCHS= powerpc
+NOT_FOR_ARCHS_REASON= not yet ported to this platform
+
+SHLIB_MAJOR= ${PORTVERSION:R:R}
+SHLIB_MINOR= ${PORTVERSION:R:E}
.include <bsd.port.options.mk>
@@ -30,25 +37,31 @@ LIB_DEPENDS+= tcmalloc:${PORTSDIR}/devel/google-perftools
.if !defined(WITHOUT_SNAPPY)
LIB_DEPENDS+= snappy:${PORTSDIR}/archivers/snappy
+SNAPPY= 1
+.else
+SNAPPY= 0
.endif
-NOT_FOR_ARCHS= powerpc
-NOT_FOR_ARCHS_REASON= not yet ported to this platform
-
post-patch:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/build_detect_platform
.if !defined(WITH_PERFTOOLS)
- @${REINPLACE_CMD} -e '/^GOOGLE_PERFTOOLS_LDFLAGS=/ s|=.*|=|' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e 's| -ltcmalloc||' ${WRKSRC}/build_detect_platform
.endif
.if defined(WITHOUT_SNAPPY)
- @${REINPLACE_CMD} -e '/^SNAPPY_LDFLAGS=/ s|=.*|=|' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e 's| -DSNAPPY||; s| -lsnappy||' ${WRKSRC}/build_detect_platform
.endif
do-install:
${MKDIR} ${PREFIX}/include/leveldb/ ${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/include/leveldb/* ${PREFIX}/include/leveldb/
- ${INSTALL_LIB} ${WRKSRC}/libleveldb.* ${PREFIX}/lib/
+ ${INSTALL_LIB} ${WRKSRC}/libleveldb.a ${PREFIX}/lib/
+ ${INSTALL_LIB} ${WRKSRC}/libleveldb.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${PREFIX}/lib/
+# backward compatibility
+ ${ECHO} "SNAPPY=${SNAPPY}" >> ${WRKSRC}/build_config.mk
+ ${GREP} '^PLATFORM_CXXFLAGS=' ${WRKSRC}/build_config.mk | ${SED} 's|PLATFORM_CXXFLAGS|PORT_CFLAGS|' >> ${WRKSRC}/build_config.mk
+ ${GREP} '^PLATFORM_CXXFLAGS=' ${WRKSRC}/build_config.mk | ${SED} 's|PLATFORM_CXXFLAGS|PLATFORM_CFLAGS|' >> ${WRKSRC}/build_config.mk
${INSTALL_DATA} ${WRKSRC}/build_config.mk ${DATADIR}/
- ${LN} -s libleveldb.so.0 ${PREFIX}/lib/libleveldb.so
+ ${LN} -s libleveldb.so.${SHLIB_MAJOR} ${PREFIX}/lib/libleveldb.so
+ ${LN} -s libleveldb.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${PREFIX}/lib/libleveldb.so.${SHLIB_MAJOR}
.include <bsd.port.mk>
diff --git a/databases/leveldb/distinfo b/databases/leveldb/distinfo
index 2d5557f0469b..1f8566732329 100644
--- a/databases/leveldb/distinfo
+++ b/databases/leveldb/distinfo
@@ -1,2 +1,2 @@
-SHA256 (leveldb-1.2.20120315.tar.xz) = 2f2c3fbcb8616450dbf2938b7f2dc2b3040e420094f9b43708ed429c1e30f142
-SIZE (leveldb-1.2.20120315.tar.xz) = 144688
+SHA256 (leveldb-1.5.0.tar.gz) = cb73489af84d9d97d3e7d234a2f5e3a0c89ffadb657e7dd9e9047227778e57ba
+SIZE (leveldb-1.5.0.tar.gz) = 199231
diff --git a/databases/leveldb/files/patch-Makefile b/databases/leveldb/files/patch-Makefile
deleted file mode 100644
index cb63d0f4790d..000000000000
--- a/databases/leveldb/files/patch-Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
---- Makefile.orig 2011-12-07 20:27:41.000000000 +0800
-+++ Makefile 2011-12-07 20:53:25.265313302 +0800
-@@ -37,7 +37,7 @@
- GOOGLE_PERFTOOLS_LDFLAGS=
- endif
-
--CFLAGS = -c -I. -I./include $(PORT_CFLAGS) $(PLATFORM_CFLAGS) $(OPT) $(SNAPPY_CFLAGS)
-+CFLAGS += -c -I. -I./include $(PORT_CFLAGS) $(PLATFORM_CFLAGS) $(OPT) $(SNAPPY_CFLAGS) -fPIC
-
- LDFLAGS += $(PLATFORM_LDFLAGS) $(SNAPPY_LDFLAGS) $(GOOGLE_PERFTOOLS_LDFLAGS)
-
-@@ -104,15 +104,18 @@
- BENCHMARKS = db_bench_sqlite3 db_bench_tree_db
-
- LIBRARY = libleveldb.a
-+SHARED_LIBRARY = libleveldb.so
-+SHARED_LIBRARY_VER = 0
- MEMENVLIBRARY = libmemenv.a
-
--all: $(LIBRARY)
-+SHARED_LIBOBJECTS = $(LIBOBJECTS:.o=.so)
-+all: $(LIBRARY) $(SHARED_LIBRARY)
-
- check: $(PROGRAMS) $(TESTS)
- for t in $(TESTS); do echo "***** Running $$t"; ./$$t || exit 1; done
-
- clean:
-- -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o
-+ -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED_LIBRARY) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o
- -rm -rf ios-x86/* ios-arm/*
- -rm build_config.mk
-
-@@ -120,6 +123,10 @@
- rm -f $@
- $(AR) -rs $@ $(LIBOBJECTS)
-
-+$(SHARED_LIBRARY): $(LIBOBJECTS)
-+ rm -f $@
-+ $(CXX) -shared -Wl,-soname,$@.$(SHARED_LIBRARY_VER) -o $@.$(SHARED_LIBRARY_VER) $(LDFLAGS) $(LIBOBJECTS)
-+
- db_bench: db/db_bench.o $(LIBOBJECTS) $(TESTUTIL)
- $(CXX) $(LDFLAGS) db/db_bench.o $(LIBOBJECTS) $(TESTUTIL) -o $@
-
diff --git a/databases/leveldb/files/patch-port-port_posix.h b/databases/leveldb/files/patch-port-port_posix.h
new file mode 100644
index 000000000000..17df518f59c2
--- /dev/null
+++ b/databases/leveldb/files/patch-port-port_posix.h
@@ -0,0 +1,14 @@
+--- port/port_posix.h.orig 2012-05-31 00:56:59.000000000 +0800
++++ port/port_posix.h 2012-06-15 15:07:41.274868153 +0800
+@@ -25,6 +25,11 @@
+ defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID)
+ #include <sys/types.h>
+ #include <sys/endian.h>
++ #ifdef _LITTLE_ENDIAN
++ #define PLATFORM_IS_LITTLE_ENDIAN true
++ #else
++ #define PLATFORM_IS_LITTLE_ENDIAN false
++ #endif
+ #else
+ #include <endian.h>
+ #endif
diff --git a/databases/leveldb/pkg-plist b/databases/leveldb/pkg-plist
index 525bbfc1e9d4..60332376f518 100644
--- a/databases/leveldb/pkg-plist
+++ b/databases/leveldb/pkg-plist
@@ -3,6 +3,7 @@ include/leveldb/cache.h
include/leveldb/comparator.h
include/leveldb/db.h
include/leveldb/env.h
+include/leveldb/filter_policy.h
include/leveldb/iterator.h
include/leveldb/options.h
include/leveldb/slice.h
@@ -12,7 +13,8 @@ include/leveldb/table_builder.h
include/leveldb/write_batch.h
lib/libleveldb.a
lib/libleveldb.so
-lib/libleveldb.so.0
+lib/libleveldb.so.%%SHLIB_MAJOR%%
+lib/libleveldb.so.%%SHLIB_MAJOR%%.%%SHLIB_MINOR%%
%%DATADIR%%/build_config.mk
@dirrm %%DATADIR%%
@dirrm include/leveldb