devel/argtable3: Improve port
- Add CMAKE options for avoid compile not installable files - Remove obsolete dependency - Now this port installs static and shared libraries - Bump PORTREVISION Reported by: diizzy
This commit is contained in:
parent
39cdd7802d
commit
4a507bc80f
3 changed files with 34 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
PORTNAME= argtable3
|
||||
DISTVERSION= 3.2.2
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel
|
||||
|
||||
MAINTAINER= acm@FreeBSD.org
|
||||
|
@ -9,14 +10,14 @@ WWW= https://www.argtable.org
|
|||
LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= bash>0:shells/bash
|
||||
|
||||
USES= cmake compiler:c++11-lang shebangfix
|
||||
USES= cmake compiler:c++11-lang
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= argtable
|
||||
GH_TAGNAME= f319bb66252c6d32a0657c774534ba409567aa62
|
||||
|
||||
SHEBANG_FILES= ${WRKSRC}/tools/build
|
||||
CMAKE_OFF= ARGTABLE3_ENABLE_TESTS \
|
||||
ARGTABLE3_ENABLE_EXAMPLES
|
||||
CMAKE_ON= BUILD_SHARED_LIBS
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} '66d' ${WRKSRC}/tools/build
|
||||
|
|
26
devel/argtable3/files/patch-src_CMakeLists.txt
Normal file
26
devel/argtable3/files/patch-src_CMakeLists.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- src/CMakeLists.txt.orig 2024-02-18 21:34:25 UTC
|
||||
+++ src/CMakeLists.txt
|
||||
@@ -73,7 +73,8 @@ if(BUILD_SHARED_LIBS AND WIN32)
|
||||
add_library(argtable3 ${ARGTABLE3_SRC_FILES} "${PROJECT_BINARY_DIR}/src/version.rc")
|
||||
target_compile_definitions(argtable3 INTERFACE argtable3_IMPORTS)
|
||||
else()
|
||||
- add_library(argtable3 ${ARGTABLE3_SRC_FILES})
|
||||
+ add_library(argtable3_static STATIC ${ARGTABLE3_SRC_FILES})
|
||||
+ add_library(argtable3 SHARED ${ARGTABLE3_SRC_FILES})
|
||||
endif()
|
||||
|
||||
add_library(${ARGTABLE3_PROJECT_NAME}::argtable3 ALIAS argtable3)
|
||||
@@ -94,6 +95,13 @@ elseif(WIN32)
|
||||
endif()
|
||||
|
||||
install(TARGETS argtable3
|
||||
+ EXPORT ${ARGTABLE3_PACKAGE_NAME}Config
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+)
|
||||
+
|
||||
+install(TARGETS argtable3_static
|
||||
EXPORT ${ARGTABLE3_PACKAGE_NAME}Config
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
@ -2,4 +2,7 @@ include/argtable3.h
|
|||
lib/cmake/argtable3/Argtable3Config-release.cmake
|
||||
lib/cmake/argtable3/Argtable3Config.cmake
|
||||
lib/cmake/argtable3/Argtable3ConfigVersion.cmake
|
||||
lib/libargtable3.so
|
||||
lib/libargtable3.so.0
|
||||
lib/libargtable3.so.0.0.0
|
||||
lib/libargtable3_static.a
|
||||
|
|
Loading…
Reference in a new issue