git: b1be4326da7f - main - databases/leveldb: Clean up

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 03 Oct 2022 02:24:37 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b1be4326da7f9b7ac3eeb7fcfd8b73245e77e86d

commit b1be4326da7f9b7ac3eeb7fcfd8b73245e77e86d
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-10-03 02:14:04 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-10-03 02:14:04 +0000

    databases/leveldb: Clean up
    
    - Bump PORTREVISION for package change
    
    SOVERSION has been added by upstream since 1.22.
    
    Reference:      https://github.com/google/leveldb/commit/37300aa54b8256dd2edfd504942eb2bd20823647
                    https://github.com/google/leveldb/commit/09fa8868dbe0cb2701f0560c59ebb63cc17f1271
---
 databases/leveldb/Makefile                   | 10 ++--------
 databases/leveldb/files/patch-CMakeLists.txt | 14 --------------
 databases/leveldb/pkg-plist                  |  4 ++--
 3 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile
index 19220a612e46..c73f1013018e 100644
--- a/databases/leveldb/Makefile
+++ b/databases/leveldb/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	leveldb
 PORTVERSION=	1.23
+PORTREVISION=	1
 CATEGORIES=	databases
 
 MAINTAINER=	sunpoet@FreeBSD.org
@@ -15,11 +16,7 @@ CMAKE_ON=	BUILD_SHARED_LIBS LEVELDB_BUILD_BENCHMARKS LEVELDB_INSTALL
 USE_CXXSTD=	c++11
 USE_LDCONFIG=	yes
 
-PLIST_SUB=	SHLIB_MAJOR=${SHLIB_MAJOR} \
-		SHLIB_MINOR=${SHLIB_MINOR}
-
-SHLIB_MAJOR=	${PORTVERSION:R}
-SHLIB_MINOR=	${PORTVERSION:E}
+PLIST_SUB=	PORTVERSION=${PORTVERSION} SHLIB_VER=${PORTVERSION:R}
 
 GH_ACCOUNT=	google
 USE_GITHUB=	yes
@@ -32,9 +29,6 @@ SNAPPY_LIB_DEPENDS=	libsnappy.so:archivers/snappy
 SNAPPY_VARS=		SNAPPY=1 SNAPPY_CFLAGS=-DSNAPPY
 SNAPPY_VARS_OFF=	SNAPPY=0 SNAPPY_CFLAGS=
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|%%SHLIB_MAJOR%%|${SHLIB_MAJOR}|; s|%%SHLIB_MINOR%%|${SHLIB_MINOR}|' ${WRKSRC}/CMakeLists.txt
-
 post-install:
 	${AR} cq ${STAGEDIR}${PREFIX}/lib/libleveldb.a ${BUILD_WRKSRC}/CMakeFiles/leveldb.dir/*/*.o
 # backward compatibility (for databases/p5-Tie-LevelDB)
diff --git a/databases/leveldb/files/patch-CMakeLists.txt b/databases/leveldb/files/patch-CMakeLists.txt
deleted file mode 100644
index f4c15a9c4f26..000000000000
--- a/databases/leveldb/files/patch-CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
---- CMakeLists.txt.orig	2019-03-29 21:37:39 UTC
-+++ CMakeLists.txt
-@@ -228,6 +228,11 @@ if (NOT HAVE_CXX17_HAS_INCLUDE)
- endif(NOT HAVE_CXX17_HAS_INCLUDE)
- 
- if(BUILD_SHARED_LIBS)
-+  set_target_properties(leveldb
-+    PROPERTIES
-+      VERSION %%SHLIB_MAJOR%%.%%SHLIB_MINOR%%
-+      SOVERSION %%SHLIB_MAJOR%%
-+  )
-   target_compile_definitions(leveldb
-     PUBLIC
-       # Used by include/export.h.
diff --git a/databases/leveldb/pkg-plist b/databases/leveldb/pkg-plist
index 69dde5e2f7ab..37bbd042e2ed 100644
--- a/databases/leveldb/pkg-plist
+++ b/databases/leveldb/pkg-plist
@@ -19,6 +19,6 @@ lib/cmake/leveldb/leveldbTargets-%%CMAKE_BUILD_TYPE%%.cmake
 lib/cmake/leveldb/leveldbTargets.cmake
 lib/libleveldb.a
 lib/libleveldb.so
-lib/libleveldb.so.%%SHLIB_MAJOR%%
-lib/libleveldb.so.%%SHLIB_MAJOR%%.%%SHLIB_MINOR%%
+lib/libleveldb.so.%%SHLIB_VER%%
+lib/libleveldb.so.%%PORTVERSION%%.0
 %%DATADIR%%/build_config.mk