Re: [Maintainer Update] databases/leveldb: 1.22 -> 1.23
Stuart Henderson writes: > They haven't built tarballs themselves to distribute, but are relying on > github auto-generating them. These don't include submodules (because > git-archive doesn't include them). Ah, that makes sense. I had wondered if it was an oversight on their part, but they may not know about this (clearly I didn't). > I think it's not that much of a problem, they're mostly just going to > expect people running tests to get the code from a git checkout. Which > for the most part is going to be true. I guess. The problem is, even downloading the archive they have and running cmake with the default options will result in configuration errors - the test suite is on by default. I opened a ticket for them to let them know about that, as it may confuse people who expect the build to "just work". > To use them in the port you can fetch them separately.. If there are a > few you can use something like this: > > DISTFILES = ${DISTNAME}${EXTRACT_SUFX} > .for A N C in \ > account1 name2 hash2 \ > account2 name2 hash2 \ > ... > DISTFILES +=$N-{$A/$N/archive/}$C.tar.gz:0 > .endfor > MASTER_SITES0=https://github.com/ > > then move them into the right dir e.g. in do-extract. Does ports support a git checkout? Or is the only way to do this with a tarball? > ack, I think that's alright for now. Thanks for the help, Stuart. Cheers, Ash
Re: [Maintainer Update] databases/leveldb: 1.22 -> 1.23
On 2021/02/28 10:08, Ashton Fagg wrote: > Another fun leveldb update. This updates from 1.22 to 1.23. > > The change log is rather extensive and can be viewed here: > > https://github.com/google/leveldb/releases/tag/1.23 > > There's a couple of fun things that they've done here. You might recall > also that the last update completely flipped the table on a bunch of > stuff as well. > > The first is they've switched their test harness to gtest. This means > they now ship their own version of gtest, along with gmock and Google's > benchmark library. The problem is, the version of gtest they rely on > doesn't build cleanly on OpenBSD. I need to work on this a little more > when I have some more free time to see if I can figure that out - it may > just be a CMake configuration issue. > > The second thing is that they now ship their dependencies as git > submodules (in third_party/). What's more, is that they don't actually > distribute the submodules in their tarballs - meaning you have to check They haven't built tarballs themselves to distribute, but are relying on github auto-generating them. These don't include submodules (because git-archive doesn't include them). > them out manually in order for the directories to be populated. As such, > if you try to build with the test suite enabled without doing the > submodule step manually, CMake blows up loudly since it can't find CMake > modules for the third_party dependencies. Thus completely breaking our > port in its current form. I'm going to file a ticket with them and ask > about why they're doing this because it's honestly kinda stupid. I think it's not that much of a problem, they're mostly just going to expect people running tests to get the code from a git checkout. Which for the most part is going to be true. > What that probably means is (assuming I get the test suite stuff figured > out), we'll have to host our own distfile with the submodules > populated in future versions. (Or, just live without the test suite) I > already have a diff I'm working on that will do this instead. To use them in the port you can fetch them separately.. If there are a few you can use something like this: DISTFILES = ${DISTNAME}${EXTRACT_SUFX} .for A N C in \ account1name2 hash2 \ account2name2 hash2 \ ... DISTFILES +=$N-{$A/$N/archive/}$C.tar.gz:0 .endfor MASTER_SITES0= https://github.com/ then move them into the right dir e.g. in do-extract. > For now, the simplest thing to get the 1.23 update is to just disable > building of the test suite. I've built and tested the package here on > amd64 and it appears to be working as expected. This is hopefully just a > stop-gap for a while until I can negotiate what's going on with their > dependencies and the gtest build issue. ack, I think that's alright for now. > diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile > index 5646b832377..3ace36595ec 100644 > --- a/databases/leveldb/Makefile > +++ b/databases/leveldb/Makefile > @@ -2,7 +2,7 @@ > > GH_ACCOUNT= google > GH_PROJECT= leveldb > -GH_TAGNAME= 1.22 > +GH_TAGNAME= 1.23 > > COMMENT= fast key-value storage library > CATEGORIES= databases devel > @@ -23,8 +23,12 @@ MODULES= devel/cmake > > CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=on \ > -DLEVELDB_INSTALL=on \ > + -DLEVELDB_BUILD_TESTS=off \ > -DLEVELDB_BUILD_BENCHMARKS=off > > +# Tests are broken right now due to googletest weirdness. > +NO_TEST= Yes > + > post-install: > ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/leveldb/ > ${INSTALL_DATA} ${WRKSRC}/{LICENSE,doc/*.md} \ > diff --git a/databases/leveldb/distinfo b/databases/leveldb/distinfo > index ae4cf1d8f0c..ebd4a52218a 100644 > --- a/databases/leveldb/distinfo > +++ b/databases/leveldb/distinfo > @@ -1,2 +1,2 @@ > -SHA256 (leveldb-1.22.tar.gz) = VUI8rJ4zBvSpUCxzigAeSjOdGjj/vudXLUoH1dY5SbI= > -SIZE (leveldb-1.22.tar.gz) = 239365 > +SHA256 (leveldb-1.23.tar.gz) = mjf4phdPCb1iK8cjtViB3FQc1QdHy9CIMcKoLWIPbXY= > +SIZE (leveldb-1.23.tar.gz) = 242925
[Maintainer Update] databases/leveldb: 1.22 -> 1.23
Another fun leveldb update. This updates from 1.22 to 1.23. The change log is rather extensive and can be viewed here: https://github.com/google/leveldb/releases/tag/1.23 There's a couple of fun things that they've done here. You might recall also that the last update completely flipped the table on a bunch of stuff as well. The first is they've switched their test harness to gtest. This means they now ship their own version of gtest, along with gmock and Google's benchmark library. The problem is, the version of gtest they rely on doesn't build cleanly on OpenBSD. I need to work on this a little more when I have some more free time to see if I can figure that out - it may just be a CMake configuration issue. The second thing is that they now ship their dependencies as git submodules (in third_party/). What's more, is that they don't actually distribute the submodules in their tarballs - meaning you have to check them out manually in order for the directories to be populated. As such, if you try to build with the test suite enabled without doing the submodule step manually, CMake blows up loudly since it can't find CMake modules for the third_party dependencies. Thus completely breaking our port in its current form. I'm going to file a ticket with them and ask about why they're doing this because it's honestly kinda stupid. What that probably means is (assuming I get the test suite stuff figured out), we'll have to host our own distfile with the submodules populated in future versions. (Or, just live without the test suite) I already have a diff I'm working on that will do this instead. For now, the simplest thing to get the 1.23 update is to just disable building of the test suite. I've built and tested the package here on amd64 and it appears to be working as expected. This is hopefully just a stop-gap for a while until I can negotiate what's going on with their dependencies and the gtest build issue. Thanks, Ash diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile index 5646b832377..3ace36595ec 100644 --- a/databases/leveldb/Makefile +++ b/databases/leveldb/Makefile @@ -2,7 +2,7 @@ GH_ACCOUNT= google GH_PROJECT= leveldb -GH_TAGNAME= 1.22 +GH_TAGNAME= 1.23 COMMENT= fast key-value storage library CATEGORIES= databases devel @@ -23,8 +23,12 @@ MODULES= devel/cmake CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=on \ -DLEVELDB_INSTALL=on \ + -DLEVELDB_BUILD_TESTS=off \ -DLEVELDB_BUILD_BENCHMARKS=off +# Tests are broken right now due to googletest weirdness. +NO_TEST= Yes + post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/leveldb/ ${INSTALL_DATA} ${WRKSRC}/{LICENSE,doc/*.md} \ diff --git a/databases/leveldb/distinfo b/databases/leveldb/distinfo index ae4cf1d8f0c..ebd4a52218a 100644 --- a/databases/leveldb/distinfo +++ b/databases/leveldb/distinfo @@ -1,2 +1,2 @@ -SHA256 (leveldb-1.22.tar.gz) = VUI8rJ4zBvSpUCxzigAeSjOdGjj/vudXLUoH1dY5SbI= -SIZE (leveldb-1.22.tar.gz) = 239365 +SHA256 (leveldb-1.23.tar.gz) = mjf4phdPCb1iK8cjtViB3FQc1QdHy9CIMcKoLWIPbXY= +SIZE (leveldb-1.23.tar.gz) = 242925
Re: Ping Again - [Update] databases/leveldb: 1.21 -> 1.22
On 2020/12/15 15:55, Stuart Henderson wrote: > > -#'atomic_pointer.h: error Please implement AtomicPointer for this > > platform' on other archs > > -ONLY_FOR_ARCHS = i386 amd64 > > +#'atomic_pointer.h: error Please implement AtomicPointer for this > > +# platform' on other archs > > +ONLY_FOR_ARCHS=i386 amd64 oh, also: atomic_pointer.h / AtomicPointer is no longer used so I've dropped this.
Re: Ping Again - [Update] databases/leveldb: 1.21 -> 1.22
On 2020/12/15 10:18, Ashton Fagg wrote: > Ping again. > > > Ashton Fagg writes: > > > >> The attached diff updates databases/leveldb to the latest version > >> (1.22). I'll take care of this, a few comments inline: > >> > >> The changelog can be viewed here: > >> > >> https://github.com/google/leveldb/releases/tag/1.22 > >> > >> It seems the previous version (1.21) introduced a CMake build. But the > >> OpenBSD port had not yet adopted it. Here, I've updated the port to the > >> latest version and converted it to use the CMake build - which > >> drastically simplifies the port Makefile. More to the point, it seems > >> that the "old way" of building has been ripped out of this version. > >> > >> The port contains the following changes: > >> > >> - Conversion to use the new CMake build > >> > >> - A convenience patch to the CMakeLists.txt to make sure the > >> documentation ends up in the right place on install. > >> > >> - Removal of some old stuff related to the old way of building the library. > >> > >> - General formatting stuff in the Makefile - there was an over-length > >> line, detected by portcheck. FWIW this (especially the " =" -> "=" change which touches nearly every line) makes the diff a lot harder to read, especially when combined with the rework for cmake, which means it's not the quick review that is often possible (especially for a port with nothing depending on it). > >> - Add myself as maintainer. > >> > >> The port has been tested on amd64. configure, build, fake, package, > >> install and uninstall all work. The test suite passes 100%. > >> > >> A quick grep turns up no dependent ports. > >> > >> Suggestions and comments welcome. > >> > >> Cheers, > >> > >> Ash > > diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile > index cf6320ce74b..8831f06deb6 100644 > --- a/databases/leveldb/Makefile > +++ b/databases/leveldb/Makefile > @@ -1,40 +1,30 @@ > # $OpenBSD: Makefile,v 1.20 2019/07/12 20:43:53 sthen Exp $ > > -#'atomic_pointer.h: error Please implement AtomicPointer for this platform' > on other archs > -ONLY_FOR_ARCHS = i386 amd64 > +#'atomic_pointer.h: error Please implement AtomicPointer for this > +# platform' on other archs > +ONLY_FOR_ARCHS= i386 amd64 > > -COMMENT =fast key-value storage library > +COMMENT= fast key-value storage library > +CATEGORIES= databases devel > +GH_ACCOUNT= google > +GH_PROJECT= leveldb > +GH_TAGNAME= 1.22 > > -GH_ACCOUNT = google > -GH_PROJECT = leveldb > -GH_TAGNAME = v1.20 > +SHARED_LIBS= leveldb 3.0 # 0.0 whitespace nitpicking: tab space space tab (and i think there was another one) > > -SHARED_LIBS += leveldb 2.0 # 0.0 > - > -CATEGORIES = databases devel > +MAINTAINER= Ashton Fagg > > # BSD3 > -PERMIT_PACKAGE = Yes > - > -MAKE_ENV = CC="${CC}" CXX="${CXX}" OPT="${CXXFLAGS}" \ > - SHARED_VERSION_MAJOR=${LIBleveldb_VERSION:R} \ > - SHARED_VERSION_MINOR=${LIBleveldb_VERSION:E} > - > -USE_GMAKE = Yes > +PERMIT_PACKAGE= Yes > > -TEST_TARGET =check > +WANTLIB= ${COMPILER_LIBCXX} m pthread > > -DOC =${PREFIX}/share/doc/leveldb/ > +# C++11 > +COMPILER=base-clang ports-gcc > +MODULES= devel/cmake > > -do-install: > - ${INSTALL_DATA_DIR} ${PREFIX}/include/leveldb > - ${INSTALL_DATA} ${WRKSRC}/include/leveldb/* ${PREFIX}/include/leveldb > - ${INSTALL_DATA} ${WRKSRC}/out-static/*.a \ > - ${PREFIX}/lib > - ${INSTALL_DATA} > ${WRKSRC}/out-shared/libleveldb.so.${LIBleveldb_VERSION} \ > - ${PREFIX}/lib/libleveldb.so.${LIBleveldb_VERSION} > - ${INSTALL_DATA_DIR} ${DOC} > - ${INSTALL_DATA} ${WRKSRC}/doc/*.md ${DOC} > - ${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOC} > +CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=on \ > + -DLEVELDB_INSTALL=on \ > + -DLEVELDB_BUILD_BENCHMARKS=off > > .include > diff --git a/databases/leveldb/distinfo b/databases/leveldb/distinfo > index abd336a865d..ae4cf1d8f0c 100644 > --- a/databases/leveldb/distinfo > +++ b/databases/leveldb/distinfo > @@ -1,2 +1,2 @@ > -SHA256 (leveldb-1.20.tar.gz) = 9avotbIJwvNlYLdfMs5hQS85opIvcEWudkosIzNbZmQ= > -SIZE (leveldb-1.20.tar.gz) = 223141 > +SHA256 (leveldb-1.22.tar.gz) = VUI8rJ4zBvSpUCxzigAeSjOdGjj/vudXLUoH1dY5SbI= > +SIZE (leveldb-1.22.tar.gz) = 239365 > diff --git a/databases/leveldb/patches/patch-CMakeLists_txt > b/databases/leveldb/patches/patch-CMakeLists_txt > new file mode 100644 > index 000..06c01609581 > --- /dev/null > +++ b/databases/leveldb/patches/patch-CMakeLists_txt > @@ -0,0 +1,22 @@ > +$OpenBSD$ > + > +This adds the install logic for the documentation. Keeps the Makefile nice > and tidy. ..but it changes what can be a self-contained 2 liner in the port Makefile to a patch to a file that
Ping Again - [Update] databases/leveldb: 1.21 -> 1.22
Ping again. > Ashton Fagg writes: > >> The attached diff updates databases/leveldb to the latest version >> (1.22). >> >> The changelog can be viewed here: >> >> https://github.com/google/leveldb/releases/tag/1.22 >> >> It seems the previous version (1.21) introduced a CMake build. But the >> OpenBSD port had not yet adopted it. Here, I've updated the port to the >> latest version and converted it to use the CMake build - which >> drastically simplifies the port Makefile. More to the point, it seems >> that the "old way" of building has been ripped out of this version. >> >> The port contains the following changes: >> >> - Conversion to use the new CMake build >> >> - A convenience patch to the CMakeLists.txt to make sure the >> documentation ends up in the right place on install. >> >> - Removal of some old stuff related to the old way of building the library. >> >> - General formatting stuff in the Makefile - there was an over-length >> line, detected by portcheck. >> >> - Add myself as maintainer. >> >> The port has been tested on amd64. configure, build, fake, package, >> install and uninstall all work. The test suite passes 100%. >> >> A quick grep turns up no dependent ports. >> >> Suggestions and comments welcome. >> >> Cheers, >> >> Ash diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile index cf6320ce74b..8831f06deb6 100644 --- a/databases/leveldb/Makefile +++ b/databases/leveldb/Makefile @@ -1,40 +1,30 @@ # $OpenBSD: Makefile,v 1.20 2019/07/12 20:43:53 sthen Exp $ -#'atomic_pointer.h: error Please implement AtomicPointer for this platform' on other archs -ONLY_FOR_ARCHS = i386 amd64 +#'atomic_pointer.h: error Please implement AtomicPointer for this +# platform' on other archs +ONLY_FOR_ARCHS= i386 amd64 -COMMENT = fast key-value storage library +COMMENT= fast key-value storage library +CATEGORIES= databases devel +GH_ACCOUNT= google +GH_PROJECT= leveldb +GH_TAGNAME= 1.22 -GH_ACCOUNT = google -GH_PROJECT = leveldb -GH_TAGNAME = v1.20 +SHARED_LIBS= leveldb 3.0 # 0.0 -SHARED_LIBS += leveldb 2.0 # 0.0 - -CATEGORIES = databases devel +MAINTAINER= Ashton Fagg # BSD3 -PERMIT_PACKAGE = Yes - -MAKE_ENV = CC="${CC}" CXX="${CXX}" OPT="${CXXFLAGS}" \ - SHARED_VERSION_MAJOR=${LIBleveldb_VERSION:R} \ - SHARED_VERSION_MINOR=${LIBleveldb_VERSION:E} - -USE_GMAKE = Yes +PERMIT_PACKAGE= Yes -TEST_TARGET = check +WANTLIB= ${COMPILER_LIBCXX} m pthread -DOC = ${PREFIX}/share/doc/leveldb/ +# C++11 +COMPILER= base-clang ports-gcc +MODULES= devel/cmake -do-install: - ${INSTALL_DATA_DIR} ${PREFIX}/include/leveldb - ${INSTALL_DATA} ${WRKSRC}/include/leveldb/* ${PREFIX}/include/leveldb - ${INSTALL_DATA} ${WRKSRC}/out-static/*.a \ - ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/out-shared/libleveldb.so.${LIBleveldb_VERSION} \ - ${PREFIX}/lib/libleveldb.so.${LIBleveldb_VERSION} - ${INSTALL_DATA_DIR} ${DOC} - ${INSTALL_DATA} ${WRKSRC}/doc/*.md ${DOC} - ${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOC} +CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=on \ + -DLEVELDB_INSTALL=on \ + -DLEVELDB_BUILD_BENCHMARKS=off .include diff --git a/databases/leveldb/distinfo b/databases/leveldb/distinfo index abd336a865d..ae4cf1d8f0c 100644 --- a/databases/leveldb/distinfo +++ b/databases/leveldb/distinfo @@ -1,2 +1,2 @@ -SHA256 (leveldb-1.20.tar.gz) = 9avotbIJwvNlYLdfMs5hQS85opIvcEWudkosIzNbZmQ= -SIZE (leveldb-1.20.tar.gz) = 223141 +SHA256 (leveldb-1.22.tar.gz) = VUI8rJ4zBvSpUCxzigAeSjOdGjj/vudXLUoH1dY5SbI= +SIZE (leveldb-1.22.tar.gz) = 239365 diff --git a/databases/leveldb/patches/patch-CMakeLists_txt b/databases/leveldb/patches/patch-CMakeLists_txt new file mode 100644 index 000..06c01609581 --- /dev/null +++ b/databases/leveldb/patches/patch-CMakeLists_txt @@ -0,0 +1,22 @@ +$OpenBSD$ + +This adds the install logic for the documentation. Keeps the Makefile nice and tidy. + +Index: CMakeLists.txt +--- CMakeLists.txt.orig CMakeLists.txt +@@ -448,4 +448,14 @@ if(LEVELDB_INSTALL) + "${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb" + ) ++ install( ++FILES ++ "${PROJECT_SOURCE_DIR}/doc/impl.md" ++ "${PROJECT_SOURCE_DIR}/doc/index.md" ++ "${PROJECT_SOURCE_DIR}/doc/log_format.md" ++ "${PROJECT_SOURCE_DIR}/doc/table_format.md" ++ "${PROJECT_SOURCE_DIR}/LICENSE" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/leveldb" ++ ) ++ + endif(LEVELDB_INSTALL) diff --git a/databases/leveldb/patches/patch-Makefile b/databases/leveldb/patches/patch-Makefile deleted file mode 100644 index 292fb04cba0..000 --- a/databases/leveldb/patches/patch-Makefile +++ /dev/null @@ -1,29 +0,0 @@ -$OpenBSD: patch-Makefile,v 1.5 2018/01/03 20:25:25 rsadowski Exp $ - -Allow SHARED_MAJOR and SHARED_MINOR to be overridden. -This doesn't affect kMajorVersion and kMinorVersion in db.h, -but nothing uses them anyway. - -Index: Makefile Makefile.orig -+++ Makefile -@@ -121,8 +121,8
Ping - [Update] databases/leveldb: 1.21 -> 1.22
Ping. Ashton Fagg writes: > The attached diff updates databases/leveldb to the latest version > (1.22). > > The changelog can be viewed here: > > https://github.com/google/leveldb/releases/tag/1.22 > > It seems the previous version (1.21) introduced a CMake build. But the > OpenBSD port had not yet adopted it. Here, I've updated the port to the > latest version and converted it to use the CMake build - which > drastically simplifies the port Makefile. More to the point, it seems > that the "old way" of building has been ripped out of this version. > > The port contains the following changes: > > - Conversion to use the new CMake build > > - A convenience patch to the CMakeLists.txt to make sure the > documentation ends up in the right place on install. > > - Removal of some old stuff related to the old way of building the library. > > - General formatting stuff in the Makefile - there was an over-length > line, detected by portcheck. > > - Add myself as maintainer. > > The port has been tested on amd64. configure, build, fake, package, > install and uninstall all work. The test suite passes 100%. > > A quick grep turns up no dependent ports. > > Suggestions and comments welcome. > > Cheers, > > Ash diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile index cf6320ce74b..8831f06deb6 100644 --- a/databases/leveldb/Makefile +++ b/databases/leveldb/Makefile @@ -1,40 +1,30 @@ # $OpenBSD: Makefile,v 1.20 2019/07/12 20:43:53 sthen Exp $ -#'atomic_pointer.h: error Please implement AtomicPointer for this platform' on other archs -ONLY_FOR_ARCHS = i386 amd64 +#'atomic_pointer.h: error Please implement AtomicPointer for this +# platform' on other archs +ONLY_FOR_ARCHS= i386 amd64 -COMMENT = fast key-value storage library +COMMENT= fast key-value storage library +CATEGORIES= databases devel +GH_ACCOUNT= google +GH_PROJECT= leveldb +GH_TAGNAME= 1.22 -GH_ACCOUNT = google -GH_PROJECT = leveldb -GH_TAGNAME = v1.20 +SHARED_LIBS= leveldb 3.0 # 0.0 -SHARED_LIBS += leveldb 2.0 # 0.0 - -CATEGORIES = databases devel +MAINTAINER= Ashton Fagg # BSD3 -PERMIT_PACKAGE = Yes - -MAKE_ENV = CC="${CC}" CXX="${CXX}" OPT="${CXXFLAGS}" \ - SHARED_VERSION_MAJOR=${LIBleveldb_VERSION:R} \ - SHARED_VERSION_MINOR=${LIBleveldb_VERSION:E} - -USE_GMAKE = Yes +PERMIT_PACKAGE= Yes -TEST_TARGET = check +WANTLIB= ${COMPILER_LIBCXX} m pthread -DOC = ${PREFIX}/share/doc/leveldb/ +# C++11 +COMPILER= base-clang ports-gcc +MODULES= devel/cmake -do-install: - ${INSTALL_DATA_DIR} ${PREFIX}/include/leveldb - ${INSTALL_DATA} ${WRKSRC}/include/leveldb/* ${PREFIX}/include/leveldb - ${INSTALL_DATA} ${WRKSRC}/out-static/*.a \ - ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/out-shared/libleveldb.so.${LIBleveldb_VERSION} \ - ${PREFIX}/lib/libleveldb.so.${LIBleveldb_VERSION} - ${INSTALL_DATA_DIR} ${DOC} - ${INSTALL_DATA} ${WRKSRC}/doc/*.md ${DOC} - ${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOC} +CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=on \ + -DLEVELDB_INSTALL=on \ + -DLEVELDB_BUILD_BENCHMARKS=off .include diff --git a/databases/leveldb/distinfo b/databases/leveldb/distinfo index abd336a865d..ae4cf1d8f0c 100644 --- a/databases/leveldb/distinfo +++ b/databases/leveldb/distinfo @@ -1,2 +1,2 @@ -SHA256 (leveldb-1.20.tar.gz) = 9avotbIJwvNlYLdfMs5hQS85opIvcEWudkosIzNbZmQ= -SIZE (leveldb-1.20.tar.gz) = 223141 +SHA256 (leveldb-1.22.tar.gz) = VUI8rJ4zBvSpUCxzigAeSjOdGjj/vudXLUoH1dY5SbI= +SIZE (leveldb-1.22.tar.gz) = 239365 diff --git a/databases/leveldb/patches/patch-CMakeLists_txt b/databases/leveldb/patches/patch-CMakeLists_txt new file mode 100644 index 000..06c01609581 --- /dev/null +++ b/databases/leveldb/patches/patch-CMakeLists_txt @@ -0,0 +1,22 @@ +$OpenBSD$ + +This adds the install logic for the documentation. Keeps the Makefile nice and tidy. + +Index: CMakeLists.txt +--- CMakeLists.txt.orig CMakeLists.txt +@@ -448,4 +448,14 @@ if(LEVELDB_INSTALL) + "${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb" + ) ++ install( ++FILES ++ "${PROJECT_SOURCE_DIR}/doc/impl.md" ++ "${PROJECT_SOURCE_DIR}/doc/index.md" ++ "${PROJECT_SOURCE_DIR}/doc/log_format.md" ++ "${PROJECT_SOURCE_DIR}/doc/table_format.md" ++ "${PROJECT_SOURCE_DIR}/LICENSE" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/leveldb" ++ ) ++ + endif(LEVELDB_INSTALL) diff --git a/databases/leveldb/patches/patch-Makefile b/databases/leveldb/patches/patch-Makefile deleted file mode 100644 index 292fb04cba0..000 --- a/databases/leveldb/patches/patch-Makefile +++ /dev/null @@ -1,29 +0,0 @@ -$OpenBSD: patch-Makefile,v 1.5 2018/01/03 20:25:25 rsadowski Exp $ - -Allow SHARED_MAJOR and SHARED_MINOR to be overridden. -This doesn't affect kMajorVersion and kMinorVersion in db.h, -but nothing uses them anyway. - -Index: Makefile Makefile.orig -+++ Makefile -@@ -121,8 +121,8 @@ SHARED_LIBS = $(SHARED_LIB1) -
[Update] databases/leveldb: 1.21 -> 1.22
The attached diff updates databases/leveldb to the latest version (1.22). The changelog can be viewed here: https://github.com/google/leveldb/releases/tag/1.22 It seems the previous version (1.21) introduced a CMake build. But the OpenBSD port had not yet adopted it. Here, I've updated the port to the latest version and converted it to use the CMake build - which drastically simplifies the port Makefile. More to the point, it seems that the "old way" of building has been ripped out of this version. The port contains the following changes: - Conversion to use the new CMake build - A convenience patch to the CMakeLists.txt to make sure the documentation ends up in the right place on install. - Removal of some old stuff related to the old way of building the library. - General formatting stuff in the Makefile - there was an over-length line, detected by portcheck. - Add myself as maintainer. The port has been tested on amd64. configure, build, fake, package, install and uninstall all work. The test suite passes 100%. A quick grep turns up no dependent ports. Suggestions and comments welcome. Cheers, Ash diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile index cf6320ce74b..8831f06deb6 100644 --- a/databases/leveldb/Makefile +++ b/databases/leveldb/Makefile @@ -1,40 +1,30 @@ # $OpenBSD: Makefile,v 1.20 2019/07/12 20:43:53 sthen Exp $ -#'atomic_pointer.h: error Please implement AtomicPointer for this platform' on other archs -ONLY_FOR_ARCHS = i386 amd64 +#'atomic_pointer.h: error Please implement AtomicPointer for this +# platform' on other archs +ONLY_FOR_ARCHS= i386 amd64 -COMMENT = fast key-value storage library +COMMENT= fast key-value storage library +CATEGORIES= databases devel +GH_ACCOUNT= google +GH_PROJECT= leveldb +GH_TAGNAME= 1.22 -GH_ACCOUNT = google -GH_PROJECT = leveldb -GH_TAGNAME = v1.20 +SHARED_LIBS= leveldb 3.0 # 0.0 -SHARED_LIBS += leveldb 2.0 # 0.0 - -CATEGORIES = databases devel +MAINTAINER= Ashton Fagg # BSD3 -PERMIT_PACKAGE = Yes - -MAKE_ENV = CC="${CC}" CXX="${CXX}" OPT="${CXXFLAGS}" \ - SHARED_VERSION_MAJOR=${LIBleveldb_VERSION:R} \ - SHARED_VERSION_MINOR=${LIBleveldb_VERSION:E} - -USE_GMAKE = Yes +PERMIT_PACKAGE= Yes -TEST_TARGET = check +WANTLIB= ${COMPILER_LIBCXX} m pthread -DOC = ${PREFIX}/share/doc/leveldb/ +# C++11 +COMPILER= base-clang ports-gcc +MODULES= devel/cmake -do-install: - ${INSTALL_DATA_DIR} ${PREFIX}/include/leveldb - ${INSTALL_DATA} ${WRKSRC}/include/leveldb/* ${PREFIX}/include/leveldb - ${INSTALL_DATA} ${WRKSRC}/out-static/*.a \ - ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/out-shared/libleveldb.so.${LIBleveldb_VERSION} \ - ${PREFIX}/lib/libleveldb.so.${LIBleveldb_VERSION} - ${INSTALL_DATA_DIR} ${DOC} - ${INSTALL_DATA} ${WRKSRC}/doc/*.md ${DOC} - ${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOC} +CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=on \ + -DLEVELDB_INSTALL=on \ + -DLEVELDB_BUILD_BENCHMARKS=off .include diff --git a/databases/leveldb/distinfo b/databases/leveldb/distinfo index abd336a865d..ae4cf1d8f0c 100644 --- a/databases/leveldb/distinfo +++ b/databases/leveldb/distinfo @@ -1,2 +1,2 @@ -SHA256 (leveldb-1.20.tar.gz) = 9avotbIJwvNlYLdfMs5hQS85opIvcEWudkosIzNbZmQ= -SIZE (leveldb-1.20.tar.gz) = 223141 +SHA256 (leveldb-1.22.tar.gz) = VUI8rJ4zBvSpUCxzigAeSjOdGjj/vudXLUoH1dY5SbI= +SIZE (leveldb-1.22.tar.gz) = 239365 diff --git a/databases/leveldb/patches/patch-CMakeLists_txt b/databases/leveldb/patches/patch-CMakeLists_txt new file mode 100644 index 000..06c01609581 --- /dev/null +++ b/databases/leveldb/patches/patch-CMakeLists_txt @@ -0,0 +1,22 @@ +$OpenBSD$ + +This adds the install logic for the documentation. Keeps the Makefile nice and tidy. + +Index: CMakeLists.txt +--- CMakeLists.txt.orig CMakeLists.txt +@@ -448,4 +448,14 @@ if(LEVELDB_INSTALL) + "${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb" + ) ++ install( ++FILES ++ "${PROJECT_SOURCE_DIR}/doc/impl.md" ++ "${PROJECT_SOURCE_DIR}/doc/index.md" ++ "${PROJECT_SOURCE_DIR}/doc/log_format.md" ++ "${PROJECT_SOURCE_DIR}/doc/table_format.md" ++ "${PROJECT_SOURCE_DIR}/LICENSE" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/leveldb" ++ ) ++ + endif(LEVELDB_INSTALL) diff --git a/databases/leveldb/patches/patch-Makefile b/databases/leveldb/patches/patch-Makefile deleted file mode 100644 index 292fb04cba0..000 --- a/databases/leveldb/patches/patch-Makefile +++ /dev/null @@ -1,29 +0,0 @@ -$OpenBSD: patch-Makefile,v 1.5 2018/01/03 20:25:25 rsadowski Exp $ - -Allow SHARED_MAJOR and SHARED_MINOR to be overridden. -This doesn't affect kMajorVersion and kMinorVersion in db.h, -but nothing uses them anyway. - -Index: Makefile Makefile.orig -+++ Makefile -@@ -121,8 +121,8 @@ SHARED_LIBS = $(SHARED_LIB1) - SHARED_MEMENVLIB = $(SHARED_OUTDIR)/libmemenv.a - else - # Update db.h if you change these.
Re: update: databases/leveldb
On Thu, Aug 16, 2012 at 7:56 PM, Stuart Henderson s...@spacehopper.org wrote: On 2012/08/16 13:52, Jonathan Matthew wrote: Hi, This updates leveldb from an svn snapshot to release 1.5.0. One thing I'm not sure about is that I'm using upstream's shared library major/minor numbers rather than setting it to 0.1 or something. We use our own versioning for this, it looks like they are just using shared-library numbering based on the release version number. Please either confirm whether there are ABI changes, or just bump the major i.e. SHARED_LIBS=leveldb 1.0 More info at http://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs There were some API changes since the previous snapshot, things like changing return types of C++ class methods, enough that I think it's safest to just bump it. +Skip checks for cstdatomic, snappy and tcmalloc. We don't +have any of these, and with our current binutils, c++ -o /dev/null +deletes /dev/null, which is kind of bad. fun! Unfortunately gmail mangled your diff (at least tabs-spaces) so it doesn't apply, as this is ports@ rather than the other lists, you could send it as an attachment if necessary.. Sorry about that. Updated diff is attached this time. Thanks for taking a look. leveldb-update.diff Description: Binary data
Re: update: databases/leveldb
On 2012/08/16 13:52, Jonathan Matthew wrote: Hi, This updates leveldb from an svn snapshot to release 1.5.0. One thing I'm not sure about is that I'm using upstream's shared library major/minor numbers rather than setting it to 0.1 or something. We use our own versioning for this, it looks like they are just using shared-library numbering based on the release version number. Please either confirm whether there are ABI changes, or just bump the major i.e. SHARED_LIBS=leveldb 1.0 More info at http://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs +Skip checks for cstdatomic, snappy and tcmalloc. We don't +have any of these, and with our current binutils, c++ -o /dev/null +deletes /dev/null, which is kind of bad. fun! Unfortunately gmail mangled your diff (at least tabs-spaces) so it doesn't apply, as this is ports@ rather than the other lists, you could send it as an attachment if necessary..
update: databases/leveldb
Hi, This updates leveldb from an svn snapshot to release 1.5.0. One thing I'm not sure about is that I'm using upstream's shared library major/minor numbers rather than setting it to 0.1 or something. ok? Index: Makefile === RCS file: /cvs/ports/databases/leveldb/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- Makefile18 Mar 2012 12:56:56 - 1.5 +++ Makefile16 Aug 2012 03:40:53 - @@ -5,12 +5,9 @@ ONLY_FOR_ARCHS=i386 amd64 arm COMMENT= fast and lightweight key/value database library -# svn rev 48, use a small version to allow seemless updating when the -# project releases a tarball. -DISTNAME= leveldb-0.0.48 -SHARED_LIBS= leveldb 0.0 +DISTNAME= leveldb-1.5.0 +SHARED_LIBS= leveldb 1.5 CATEGORIES=databases -REVISION= 1 HOMEPAGE= http://leveldb.googlecode.com/ @@ -20,7 +17,7 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM=Yes PERMIT_DISTFILES_FTP= Yes -MASTER_SITES= http://distfiles.nl/ +MASTER_SITES= http://leveldb.googlecode.com/files/ WANTLIB += m stdc++ Index: distinfo === RCS file: /cvs/ports/databases/leveldb/distinfo,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 distinfo --- distinfo19 Aug 2011 06:44:00 - 1.1.1.1 +++ distinfo16 Aug 2012 03:40:53 - @@ -1,5 +1,5 @@ -MD5 (leveldb-0.0.48.tar.gz) = EpwqrYc2JOX3ml3Td4gmnQ== -RMD160 (leveldb-0.0.48.tar.gz) = u1efJYCf33kWh7Bc4HnqHjhKCaA= -SHA1 (leveldb-0.0.48.tar.gz) = CzmBnOP/olwh4pZec8wAjq4363U= -SHA256 (leveldb-0.0.48.tar.gz) = a9D1oDdS0PjXWoEh22r23vRDkaPdzHQjE6xnwMhYQLg= -SIZE (leveldb-0.0.48.tar.gz) = 174794 +MD5 (leveldb-1.5.0.tar.gz) = Z5fhmgqfm7HBujVr+JIn8A== +RMD160 (leveldb-1.5.0.tar.gz) = Gi4LhiLZpd6Nf5Sbw4DYd7eFrcE= +SHA1 (leveldb-1.5.0.tar.gz) = tbRf90Bl8kLDf0ZbE9r7kllyykM= +SHA256 (leveldb-1.5.0.tar.gz) = y3NImvhNnZfT59I0ovXjoMif+ttlfn3Z6QRyJ3eOV7o= +SIZE (leveldb-1.5.0.tar.gz) = 199231 Index: patches/patch-Makefile === RCS file: /cvs/ports/databases/leveldb/patches/patch-Makefile,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-Makefile --- patches/patch-Makefile 19 Aug 2011 06:44:00 - 1.1.1.1 +++ patches/patch-Makefile 16 Aug 2012 03:40:53 - @@ -1,67 +0,0 @@ -$OpenBSD: patch-Makefile,v 1.1.1.1 2011/08/19 06:44:00 jasper Exp $ - -- Allow ${CC} and ${OPT} to be overriden, to help packagers. - http://code.google.com/p/leveldb/issues/detail?id=32 - -- Provide a shared library - http://code.google.com/p/leveldb/issues/detail?id=27 - Makefile.orig Fri Aug 5 22:40:49 2011 -+++ Makefile Thu Aug 18 17:18:19 2011 -@@ -2,13 +2,15 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. See the AUTHORS file for names of contributors. - --CC = g++ -+CC ?= g++ - -+SONAME_MAJOR?=0 -+SONAME_MINOR?=0 - #--- - # Uncomment exactly one of the lines labelled (A), (B), and (C) below - # to switch between compilation modes. - --OPT = -O2 -DNDEBUG # (A) Production use (optimized mode) -+OPT ?= -O2 -DNDEBUG # (A) Production use (optimized mode) - # OPT = -g2 # (B) Debug mode, w/ full line-level debugging symbols - # OPT = -O2 -g2 -DNDEBUG # (C) Profiling mode: opt, but w/debugging symbols - #--- -@@ -36,7 +38,7 @@ else - 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) - -@@ -102,20 +104,28 @@ PROGRAMS = db_bench $(TESTS) - BENCHMARKS = db_bench_sqlite3 db_bench_tree_db - - LIBRARY = libleveldb.a -+SHARED_LIBRARY = libleveldb.so - --all: $(LIBRARY) -+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) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o -+ -rm -f $(SHARED_LIBRARY).* $(SHARED_LIBRARY) - -rm -rf ios-x86/* ios-arm/* - -rm build_config.mk - - $(LIBRARY): $(LIBOBJECTS) - rm -f $@ - $(AR) -rs $@ $(LIBOBJECTS) -+ -+$(SHARED_LIBRARY): $(LIBOBJECTS) -+ rm -f $@ -+ $(CC) -shared -Wl,-soname -Wl,$@.$(SONAME_MAJOR) $(LIBOBJECTS) $(LDFLAGS) -o $@.$(SONAME_MAJOR).$(SONAME_MINOR) -+ ln -s $@.$(SONAME_MAJOR).$(SONAME_MINOR) $@.$(SONAME_MAJOR) -+ ln -s $@.$(SONAME_MAJOR).$(SONAME_MINOR) $@ - - db_bench: db/db_bench.o $(LIBOBJECTS) $(TESTUTIL) - $(CC) $(LDFLAGS) db/db_bench.o $(LIBOBJECTS) $(TESTUTIL) -o $@ Index: patches/patch-build_detect_platform