devel/libcrossguid: Update to latest commit and switch to CMake
The current version is very old and requires a lot of hacking, update
to latest commit as the latest release was back in 2017 and switch
to CMake. This update also includes following commit from 3rd party
repo for performance:
23a8c007a6
PR: 253531
Approved by: mentors (implicit), Mickael Maillot (maintainer timeout, 9+ months)
Differential Revision: https://reviews.freebsd.org/D33415
This commit is contained in:
parent
a49daaafcd
commit
ddc0332a1c
@ -1,8 +1,13 @@
|
||||
PORTNAME= libcrossguid
|
||||
PORTVERSION= 20150803
|
||||
PORTREVISION= 6
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.2.2-52
|
||||
DISTVERSIONSUFFIX= -gca1bf4b
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= devel
|
||||
|
||||
PATCH_SITES= https://github.com/jhaws1982/crossguid/commit/
|
||||
PATCHFILES= 23a8c007a668413c2e8cbd00984d223ed5ecfe05.patch:-p1
|
||||
|
||||
MAINTAINER= mickael.maillot@gmail.com
|
||||
COMMENT= Minimal and cross platform C++ GUID library
|
||||
|
||||
@ -11,36 +16,13 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid
|
||||
|
||||
USES= cmake compiler:c++17-lang pkgconfig
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= graeme-hill
|
||||
GH_PROJECT= crossguid
|
||||
GH_TAGNAME= 8f399e8
|
||||
|
||||
USES= compiler:c++11-lang pkgconfig
|
||||
USE_CXXSTD= c++11
|
||||
CXXFLAGS+= `pkg-config --cflags uuid`
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
PLIST_FILES= include/guid.h \
|
||||
lib/libcrossguid.so \
|
||||
lib/libcrossguid.so.0 \
|
||||
libdata/pkgconfig/libcrossguid.pc
|
||||
|
||||
post-patch:
|
||||
@${SED} -e 's|%PREFIX%|${PREFIX}|' -e 's|%VERSION%|${PORTVERSION}|' \
|
||||
${FILESDIR}/libcrossguid.pc.in > ${WRKDIR}/libcrossguid.pc
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${CXX} ${CXXFLAGS} -shared -fPIC \
|
||||
-Wl,-soname,libcrossguid.so.0 \
|
||||
-DGUID_LIBUUID -L${LOCALBASE}/lib guid.cpp \
|
||||
-o libcrossguid.so.0 -luuid
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/guid.h ${STAGEDIR}${PREFIX}/include
|
||||
${INSTALL_LIB} ${WRKSRC}/libcrossguid.so.0 ${STAGEDIR}${PREFIX}/lib
|
||||
${INSTALL_DATA} ${WRKDIR}/libcrossguid.pc \
|
||||
${STAGEDIR}${PREFIX}/libdata/pkgconfig
|
||||
${LN} -sf libcrossguid.so.0 ${STAGEDIR}${PREFIX}/lib/libcrossguid.so
|
||||
CMAKE_ON= BUILD_SHARED_LIBS
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,5 @@
|
||||
SHA256 (graeme-hill-crossguid-20150803-8f399e8_GH0.tar.gz) = 929397adfe57b945c5153e09f1e0bc1763300e2b30578ec7ed6facc2821d7f6f
|
||||
SIZE (graeme-hill-crossguid-20150803-8f399e8_GH0.tar.gz) = 46576
|
||||
TIMESTAMP = 1639380917
|
||||
SHA256 (graeme-hill-crossguid-v0.2.2-52-gca1bf4b_GH0.tar.gz) = 731eab92a5b916eb1195208eac448155e209f9634436c0e877cb32cadd71bdc3
|
||||
SIZE (graeme-hill-crossguid-v0.2.2-52-gca1bf4b_GH0.tar.gz) = 141678
|
||||
SHA256 (23a8c007a668413c2e8cbd00984d223ed5ecfe05.patch) = 4ac3983dee2df81397b8d835563b4fcbf2c24877ff33630b07f78b73eac5effa
|
||||
SIZE (23a8c007a668413c2e8cbd00984d223ed5ecfe05.patch) = 1780
|
||||
|
@ -1,9 +0,0 @@
|
||||
prefix=%PREFIX%
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libguid
|
||||
Description: minimal and cross platform C++ GUID library
|
||||
Version: %VERSION%
|
||||
Libs: -L${libdir} -lcrossguid
|
||||
Cflags: -I${includedir}
|
20
devel/libcrossguid/files/patch-CMakeLists.txt
Normal file
20
devel/libcrossguid/files/patch-CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
--- CMakeLists.txt.orig 2019-05-29 15:36:34 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -64,7 +64,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURC
|
||||
set(CROSSGUID_ARCHIVE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
|
||||
set(CROSSGUID_FRAMEWORK_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
|
||||
|
||||
- set(CROSSGUID_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/crossguid/cmake")
|
||||
+ set(CROSSGUID_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/crossguid/")
|
||||
set(CROSSGUID_ADDITIONAL_FILES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/crossguid")
|
||||
|
||||
# Install target
|
||||
@@ -75,7 +75,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURC
|
||||
FRAMEWORK DESTINATION ${CROSSGUID_FRAMEWORK_INSTALL_DIR})
|
||||
|
||||
# Install headers
|
||||
- install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/"
|
||||
+ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/crossguid/"
|
||||
DESTINATION ${CROSSGUID_INC_INSTALL_DIR})
|
||||
|
||||
# Make cmake config files for all targets
|
9
devel/libcrossguid/pkg-plist
Normal file
9
devel/libcrossguid/pkg-plist
Normal file
@ -0,0 +1,9 @@
|
||||
include/guid.hpp
|
||||
lib/cmake/crossguid/crossguid-config-%%CMAKE_BUILD_TYPE%%.cmake
|
||||
lib/cmake/crossguid/crossguid-config.cmake
|
||||
lib/libcrossguid.so
|
||||
lib/libcrossguid.so.0
|
||||
lib/libcrossguid.so.0.2.3
|
||||
libdata/pkgconfig/crossguid.pc
|
||||
share/crossguid/LICENSE
|
||||
share/crossguid/README.md
|
Loading…
Reference in New Issue
Block a user