[packages/draco] - new; system-gtest patch from Fedora

qboosh qboosh at pld-linux.org
Wed Mar 29 20:44:57 CEST 2023


commit 42750112412d2063fee60af973ce75c5516ccba3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Mar 29 20:47:16 2023 +0200

    - new; system-gtest patch from Fedora

 draco-system-gtest.patch |  76 ++++++++++++++++++++++++++++++
 draco.spec               | 120 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 196 insertions(+)
---
diff --git a/draco.spec b/draco.spec
new file mode 100644
index 0000000..ebac3c8
--- /dev/null
+++ b/draco.spec
@@ -0,0 +1,120 @@
+Summary:	Draco 3D graphics compression library
+Summary(pl.UTF-8):	Draco - biblioteka kompresji grafiki 3D
+Name:		draco
+Version:	1.5.6
+Release:	1
+License:	Apache v2.0
+Group:		Libraries
+#Source0Download: https://github.com/google/draco/releases
+Source0:	https://github.com/google/draco/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	dbe3a9e286ee5b79016470349d78b2a3
+Patch0:		%{name}-system-gtest.patch
+URL:		https://github.com/google/draco
+BuildRequires:	cmake >= 3.12
+BuildRequires:	gtest-devel
+BuildRequires:	libstdc++-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Draco is a library for compressing and decompressing 3D geometric
+meshes and point clouds. It is intended to improve the storage and
+transmission of 3D graphics.
+
+Draco was designed and built for compression efficiency and speed. The
+code supports compressing points, connectivity information, texture
+coordinates, color information, normals, and any other generic
+attributes associated with geometry. With Draco, applications using 3D
+graphics can be significantly smaller without compromising visual
+fidelity. For users, this means apps can now be downloaded faster, 3D
+graphics in the browser can load quicker, and VR and AR scenes can now
+be transmitted with a fraction of the bandwidth and rendered quickly.
+
+Draco is released as C++ source code that can be used to compress 3D
+graphics as well as C++ and Javascript decoders for the encoded data.
+
+%description -l pl.UTF-8
+Draco to biblioteka do kompresji i dekompresji trójwymiarowych siatek
+geometrycznych i chmur punktów. Ma za zadanie usprawnić przechowywanie
+i transmisję grafiki 3D.
+
+Biblioteka została zaprojektowana z myślą o wydajności kompresji i
+szybkości. Kod obsługuje kompresję punktów, informacji o połączeniach,
+współrzędnych tekstur, informacji o kolorach, wektorów normalnych oraz
+dowolnych innych atrybutów związnych z geometrią. Przy użyciu Draco
+aplikacje wykorzystujące grafikę 3D mogą być znacząco mniejsze bez
+poświęcania doznań wizualnych. Dla użytkowników oznacza to, że
+aplikacje mogą być pobrane szybciej, grafika 3D w przeglądarce może
+ładować się szybciej, a sceny VR i AR mogą być przesyłane z mniejszym
+zużyciem sieci i szybko renderowane.
+
+Draco zawiera kod C++ do kompresji grafiki 3D oraz dekodery w C++ i
+Javascripcie.
+
+%package devel
+Summary:	Header files for draco library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki draco
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for draco library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki draco.
+
+%package static
+Summary:	Static draco library
+Summary(pl.UTF-8):	Statyczna biblioteka draco
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static draco library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka draco.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+install -d build
+cd build
+%cmake ..
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/draco_decoder{-%{version},}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/draco_encoder{-%{version},}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS README.md
+%attr(755,root,root) %{_bindir}/draco_decoder
+%attr(755,root,root) %{_bindir}/draco_encoder
+%attr(755,root,root) %{_libdir}/libdraco.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libdraco.so.8
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libdraco.so
+%{_includedir}/draco
+%{_pkgconfigdir}/draco.pc
+%{_datadir}/cmake/draco
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libdraco.a
diff --git a/draco-system-gtest.patch b/draco-system-gtest.patch
new file mode 100644
index 0000000..bdde143
--- /dev/null
+++ b/draco-system-gtest.patch
@@ -0,0 +1,76 @@
+From 887cea73f798ab4b8947ed55f600fdfddc263915 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code at musicinmybrain.net>
+Date: Mon, 16 Jan 2023 21:48:15 -0500
+Subject: [PATCH] Use system gtest
+
+---
+ cmake/draco_tests.cmake | 29 ++++-------------------------
+ 1 file changed, 4 insertions(+), 25 deletions(-)
+
+diff --git a/cmake/draco_tests.cmake b/cmake/draco_tests.cmake
+index 2d7f05e..b0a2977 100644
+--- a/cmake/draco_tests.cmake
++++ b/cmake/draco_tests.cmake
+@@ -106,37 +106,8 @@
+ 
+ macro(draco_setup_test_targets)
+   if(DRACO_TESTS)
+-    draco_setup_googletest()
+-
+-    if(NOT (EXISTS ${draco_gtest_all} AND EXISTS ${draco_gtest_main}))
+-      message(FATAL_ERROR "googletest missing, run git submodule update --init")
+-    endif()
+-
+-    list(APPEND draco_test_defines GTEST_HAS_PTHREAD=0)
+-
+-    draco_add_library(
+-      TEST
+-      NAME draco_test_common
+-      TYPE STATIC
+-      SOURCES ${draco_test_common_sources}
+-      DEFINES ${draco_defines} ${draco_test_defines}
+-      INCLUDES ${draco_test_include_paths})
+-
+-    draco_add_library(
+-      TEST
+-      NAME draco_gtest
+-      TYPE STATIC
+-      SOURCES ${draco_gtest_all}
+-      DEFINES ${draco_defines} ${draco_test_defines}
+-      INCLUDES ${draco_test_include_paths})
+-
+-    draco_add_library(
+-      TEST
+-      NAME draco_gtest_main
+-      TYPE STATIC
+-      SOURCES ${draco_gtest_main}
+-      DEFINES ${draco_defines} ${draco_test_defines}
+-      INCLUDES ${draco_test_include_paths})
++    find_package(GTest REQUIRED)
++    list(APPEND draco_test_include_paths ${draco_include_paths})
+ 
+     set(DRACO_TEST_DATA_DIR "${draco_root}/testdata")
+     set(DRACO_TEST_TEMP_DIR "${draco_build}/draco_test_temp")
+@@ -154,8 +125,7 @@
+       SOURCES ${draco_test_sources}
+       DEFINES ${draco_defines} ${draco_test_defines}
+       INCLUDES ${draco_test_include_paths}
+-      LIB_DEPS ${draco_dependency} draco_gtest draco_gtest_main
+-               draco_test_common)
++      LIB_DEPS ${draco_dependency} GTest::gtest GTest::gtest_main)
+ 
+     draco_add_executable(
+       TEST
+@@ -163,8 +133,7 @@
+       SOURCES ${draco_factory_test_sources}
+       DEFINES ${draco_defines} ${draco_test_defines}
+       INCLUDES ${draco_test_include_paths}
+-      LIB_DEPS ${draco_dependency} draco_gtest draco_gtest_main
+-               draco_test_common)
++      LIB_DEPS ${draco_dependency} GTest::gtest GTest::gtest_main)
+ 
+ 
+   endif()
+-- 
+2.38.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/draco.git/commitdiff/42750112412d2063fee60af973ce75c5516ccba3



More information about the pld-cvs-commit mailing list