diff options
author | Daniel Engberg <diizzy@FreeBSD.org> | 2021-12-23 21:08:42 +0000 |
---|---|---|
committer | Daniel Engberg <diizzy@FreeBSD.org> | 2021-12-23 21:21:00 +0000 |
commit | ddc0332a1c48da23f4d4bc5f71e68ad7aa513dfb (patch) | |
tree | fc168c342071e9f1d5946b2cf33c839487656501 | |
parent | a49daaafcd5f1bdad87f83f95a1f49eaced3c4c7 (diff) | |
download | ports-ddc0332a1c48da23f4d4bc5f71e68ad7aa513dfb.tar.gz ports-ddc0332a1c48da23f4d4bc5f71e68ad7aa513dfb.zip |
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:
https://github.com/jhaws1982/crossguid/commit/23a8c007a668413c2e8cbd00984d223ed5ecfe05
PR: 253531
Approved by: mentors (implicit), Mickael Maillot (maintainer timeout, 9+ months)
Differential Revision: https://reviews.freebsd.org/D33415
-rw-r--r-- | devel/libcrossguid/Makefile | 40 | ||||
-rw-r--r-- | devel/libcrossguid/distinfo | 7 | ||||
-rw-r--r-- | devel/libcrossguid/files/libcrossguid.pc.in | 9 | ||||
-rw-r--r-- | devel/libcrossguid/files/patch-CMakeLists.txt | 20 | ||||
-rw-r--r-- | devel/libcrossguid/pkg-plist | 9 |
5 files changed, 45 insertions, 40 deletions
diff --git a/devel/libcrossguid/Makefile b/devel/libcrossguid/Makefile index 45d49a7fbce9..e45cdea48224 100644 --- a/devel/libcrossguid/Makefile +++ b/devel/libcrossguid/Makefile @@ -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> diff --git a/devel/libcrossguid/distinfo b/devel/libcrossguid/distinfo index 67b60a85af45..7f2f47277d46 100644 --- a/devel/libcrossguid/distinfo +++ b/devel/libcrossguid/distinfo @@ -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 diff --git a/devel/libcrossguid/files/libcrossguid.pc.in b/devel/libcrossguid/files/libcrossguid.pc.in deleted file mode 100644 index 0c109c01c879..000000000000 --- a/devel/libcrossguid/files/libcrossguid.pc.in +++ /dev/null @@ -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} diff --git a/devel/libcrossguid/files/patch-CMakeLists.txt b/devel/libcrossguid/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..47de8e3d6fdc --- /dev/null +++ b/devel/libcrossguid/files/patch-CMakeLists.txt @@ -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 diff --git a/devel/libcrossguid/pkg-plist b/devel/libcrossguid/pkg-plist new file mode 100644 index 000000000000..22cf856d9ff4 --- /dev/null +++ b/devel/libcrossguid/pkg-plist @@ -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 |