[packages/crossguid] up to 0.2.3 snap 20190529 (abi incompatible)

atler atler at pld-linux.org
Sun Oct 18 13:04:37 CEST 2026


commit ec22d1bccdc6eb39ba4bdedb013dc8e05a1664f8
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Oct 18 12:58:06 2026 +0200

    up to 0.2.3 snap 20190529 (abi incompatible)
    
    project uses namespace for a very long time now although package in PLD
    was not updated for even longer. as the only user of it currently is
    kodi there shouldn't be too much damage without manual change of soname.

 Makefile               | 34 ----------------------------------
 cmake-config-dir.patch | 11 +++++++++++
 crossguid.spec         | 47 +++++++++++++++++++++++------------------------
 includes.patch         | 27 +++++++++++++++++++++++++++
 4 files changed, 61 insertions(+), 58 deletions(-)
---
diff --git a/crossguid.spec b/crossguid.spec
index 4d18b20..5ececab 100644
--- a/crossguid.spec
+++ b/crossguid.spec
@@ -2,22 +2,24 @@
 # Conditional build:
 %bcond_without	tests		# build without tests
 
-%define rel 2
-%define short_commit 8f399e8
-%define commit_date 20150803
+%define rel 1
+%define short_commit ca1bf4b
+%define commit_date 20190529
 Summary:	Lightweight cross platform C++ GUID/UUID library
 Name:		crossguid
-# 0.2.2 is being prepated on "dev-0.2" branch
-Version:	0
-Release:	0.%{rel}.%{commit_date}
+Version:	0.2.3
+Release:	0.%{commit_date}.%{rel}
 License:	MIT
 Group:		Libraries
 Source0:	https://github.com/graeme-hill/crossguid/archive/%{short_commit}/%{name}-%{short_commit}.tar.gz
-# Source0-md5:	696a6573286d6fdbfde18686aa9f6489
+# Source0-md5:	d4a8d62f3f8d6d946be75cf5bfa92687
+Patch0:		includes.patch
+Patch1:		cmake-config-dir.patch
 URL:		https://github.com/graeme-hill/crossguid/
-Source1:	Makefile
-BuildRequires:	libstdc++-devel
+BuildRequires:	cmake >= 3.5.1
+BuildRequires:	libstdc++-devel >= 6:8
 BuildRequires:	libuuid-devel
+BuildRequires:	rpmbuild(macros) >= 2.047
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -37,28 +39,23 @@ developing applications that use %{name}.
 %prep
 %setup -qc
 mv %{name}-*/* .
-
-cp -p %{SOURCE1} Makefile
+%patch -P0 -p1
+%patch -P1 -p1
 
 %build
-%{__make} \
-	CXX="%{__cxx}" \
-	LDFLAGS="%{rpmldflags}" \
-	CXXFLAGS="%{rpmcxxflags}"
+install -d build
+cd build
+%cmake .. \
+	-DCROSSGUID_TESTS:BOOL=%{__ON_OFF tests}
+%{__make}
 
 %if %{with tests}
-%{__make} test \
-	CXX="%{__cxx}" \
-	LDFLAGS="%{rpmldflags}" \
-	CXXFLAGS="%{rpmcxxflags}"
-./test
+./crossguid-test
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
-	LIBDIR=%{_libdir} \
-	INCLUDEDIR=%{_includedir} \
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 %clean
@@ -75,5 +72,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/guid.h
+%{_includedir}/crossguid
 %{_libdir}/libcrossguid.so
+%{_libdir}/cmake/crossguid
+%{_pkgconfigdir}/crossguid.pc
diff --git a/Makefile b/Makefile
deleted file mode 100644
index bf6f2fc..0000000
--- a/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-override CXXFLAGS += -std=c++11 -DGUID_LIBUUID -fPIC
-LIBS = -luuid
-MAJOR := 0
-MINOR := 0
-VERSION := $(MAJOR).$(MINOR).0
-NAME = crossguid
-
-INCLUDEDIR = /usr/include
-LIBDIR = /usr/lib
-
-LINK.o = $(LINK.cc)
-
-SRC = $(wildcard *.cpp)
-OBJ = $(SRC:.cpp=.o)
-LIB = lib$(NAME).so.$(VERSION)
-
-$(LIB): guid.o
-	$(CXX) $(LIBS) $(LDFLAGS) -shared -Wl,-soname,lib$(NAME).so.$(MAJOR) $^ -o $@
-
-test: $(OBJ)
-	$(CXX) $(LIBS) $(LDFLAGS) $^ -o $@
-
-install: guid.h $(LIB)
-	install -dm 0755 $(DESTDIR)$(INCLUDEDIR)
-	install -pm 0644 guid.h $(DESTDIR)$(INCLUDEDIR)
-	install -dm 0755 $(DESTDIR)$(LIBDIR)
-	install -pm 0755 $(LIB) $(DESTDIR)$(LIBDIR)
-	ln -sf $(LIB) $(DESTDIR)$(LIBDIR)/lib$(NAME).so
-	ln -sf $(LIB) $(DESTDIR)$(LIBDIR)/lib$(NAME).so.$(MAJOR)
-
-clean:
-	$(RM) $(OBJ) $(LIB) test
-
-.PHONY: run-test install clean 
diff --git a/cmake-config-dir.patch b/cmake-config-dir.patch
new file mode 100644
index 0000000..e11b8d1
--- /dev/null
+++ b/cmake-config-dir.patch
@@ -0,0 +1,11 @@
+--- crossguid-0.2.3/CMakeLists.txt.orig	2019-05-29 17:36:34.000000000 +0200
++++ crossguid-0.2.3/CMakeLists.txt	2026-10-14 14:51:04.461780636 +0200
+@@ -64,7 +64,7 @@
+ 	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
diff --git a/includes.patch b/includes.patch
new file mode 100644
index 0000000..36176b9
--- /dev/null
+++ b/includes.patch
@@ -0,0 +1,27 @@
+From 1eb9bea38c320b2b588635cffceaaa2a8d434780 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Wed, 25 Jan 2023 22:09:26 -0800
+Subject: [PATCH] include missing <cstdint>
+
+gcc 13 moved some includes around and as a result <cstdint> is no longer transitively
+included [1]. Explicitly include it for uint{32,64}_t.
+
+[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ include/crossguid/guid.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/crossguid/guid.hpp b/include/crossguid/guid.hpp
+index 61e0f17..70966f2 100644
+--- a/include/crossguid/guid.hpp
++++ b/include/crossguid/guid.hpp
+@@ -29,6 +29,7 @@ THE SOFTWARE.
+ #include <jni.h>
+ #endif
+ 
++#include <cstdint>
+ #include <functional>
+ #include <iostream>
+ #include <array>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crossguid.git/commitdiff/ec22d1bccdc6eb39ba4bdedb013dc8e05a1664f8



More information about the pld-cvs-commit mailing list