From 93c488c19234b5d2a1a816253a5af22b52585bfa Mon Sep 17 00:00:00 2001 From: Till Hofmann Date: May 18 2017 11:23:48 +0000 Subject: switch to github upstream morxa/alvar --- diff --git a/libalvar.opencv3.patch b/libalvar.opencv3.patch deleted file mode 100644 index b8b5549..0000000 --- a/libalvar.opencv3.patch +++ /dev/null @@ -1,198 +0,0 @@ -Only in alvar-2.0.0-src: build -Only in alvar.build: build_fedora -diff -ur alvar-2.0.0-src/CMakeLists.txt alvar.build/CMakeLists.txt ---- alvar-2.0.0-src/CMakeLists.txt 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/CMakeLists.txt 2017-04-29 10:18:38.699784270 +0200 -@@ -4,7 +4,7 @@ - else(WIN32) - cmake_minimum_required(VERSION 2.8) - endif(WIN32) --set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build/cmake") -+#set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build/cmake") - - # define project - project(ALVAR) -@@ -74,7 +74,9 @@ - if($ENV{OPENCV_ROOT}) - set(OpenCV_ROOT_DIR $ENV{OPENCV_ROOT} CACHE PATH "The OpenCV root directory") - endif($ENV{OPENCV_ROOT}) --find_package(OpenCV COMPONENTS calib3d core features2d flann highgui imgproc legacy ml video) -+find_package(OpenCV REQUIRED) -+find_package(OpenCV REQUIRED COMPONENTS opencv_calib3d opencv_core opencv_features2d opencv_flann opencv_highgui opencv_imgproc opencv_ml opencv_video) -+#set(OpenCV_FOUND 1) - if(NOT OpenCV_FOUND) - find_package(OpenCV COMPONENTS calib3d core features2d flann highgui imgproc legacy ml video - NO_MODULE NAMES OpenCV -@@ -267,7 +269,7 @@ - if(OPENSCENEGRAPH_FOUND) - add_subdirectory(demo) - endif(OPENSCENEGRAPH_FOUND) --add_subdirectory(build) -+#add_subdirectory(build) - add_subdirectory(data) - - # hack macro to help copy runtime dependencies -diff -ur alvar-2.0.0-src/demo/CMakeLists.txt alvar.build/demo/CMakeLists.txt ---- alvar-2.0.0-src/demo/CMakeLists.txt 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/demo/CMakeLists.txt 2017-04-29 10:51:06.849967714 +0200 -@@ -10,7 +10,7 @@ - # define demos in alphabetical order - set(ALVAR_DEMOS - Demo3DMarkerField -- DemoFern -+ #DemoFern - DemoMarkerField - DemoMarkerHide - DemoModel2Marker -diff -ur alvar-2.0.0-src/sample/CMakeLists.txt alvar.build/sample/CMakeLists.txt ---- alvar-2.0.0-src/sample/CMakeLists.txt 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/sample/CMakeLists.txt 2017-04-29 10:50:41.965748225 +0200 -@@ -18,7 +18,7 @@ - SampleIntegralImage - SampleLabeling - SampleMarkerCreator -- SampleMarkerlessCreator -+ #SampleMarkerlessCreator - SampleMultiMarker - SampleMultiMarkerBundle - SampleOptimization -@@ -29,7 +29,7 @@ - set(ALVAR_SAMPLES_GLUTVIEWER - SampleMarkerDetector - SampleMarkerHide -- SampleMarkerlessDetector -+ #SampleMarkerlessDetector - SamplePointcloud - ) - -diff -ur alvar-2.0.0-src/sample/GlutViewer.cpp alvar.build/sample/GlutViewer.cpp ---- alvar-2.0.0-src/sample/GlutViewer.cpp 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/sample/GlutViewer.cpp 2017-04-29 10:20:41.687869072 +0200 -@@ -2,6 +2,7 @@ - - #include "Rotation.h" - #include "Platform.h" -+#include - - using namespace std; - using namespace alvar; -diff -ur alvar-2.0.0-src/src/Camera.cpp alvar.build/src/Camera.cpp ---- alvar-2.0.0-src/src/Camera.cpp 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/src/Camera.cpp 2017-04-29 10:34:26.430143621 +0200 -@@ -26,6 +26,8 @@ - #include "FileFormatUtils.h" - #include - -+#include -+ - using namespace std; - - namespace alvar { -diff -ur alvar-2.0.0-src/src/CMakeLists.txt alvar.build/src/CMakeLists.txt ---- alvar-2.0.0-src/src/CMakeLists.txt 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/src/CMakeLists.txt 2017-04-29 10:42:16.217287327 +0200 -@@ -42,8 +42,8 @@ - Container3d.h - Draw.h - EC.h -- FernImageDetector.h -- FernPoseEstimator.h -+ #FernImageDetector.h -+ #FernPoseEstimator.h - FileFormat.h - FileFormatUtils.h - Filter.h -@@ -77,8 +77,8 @@ - ConnectedComponents.cpp - Draw.cpp - EC.cpp -- FernImageDetector.cpp -- FernPoseEstimator.cpp -+ #FernImageDetector.cpp -+ #FernPoseEstimator.cpp - FileFormatUtils.cpp - Filter.cpp - IntegralImage.cpp -diff -ur alvar-2.0.0-src/src/EC.cpp alvar.build/src/EC.cpp ---- alvar-2.0.0-src/src/EC.cpp 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/src/EC.cpp 2017-04-29 10:35:14.000563210 +0200 -@@ -24,6 +24,8 @@ - #include "EC.h" - #include "Optimization.h" - -+#include -+ - namespace alvar { - - struct ProjectParams -diff -ur alvar-2.0.0-src/src/MultiMarkerBundle.cpp alvar.build/src/MultiMarkerBundle.cpp ---- alvar-2.0.0-src/src/MultiMarkerBundle.cpp 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/src/MultiMarkerBundle.cpp 2017-04-29 10:43:29.033929598 +0200 -@@ -23,6 +23,8 @@ - - #include "MultiMarkerBundle.h" - -+#include -+ - using namespace std; - - namespace alvar { -diff -ur alvar-2.0.0-src/src/platform/CaptureFactory_unix.cpp alvar.build/src/platform/CaptureFactory_unix.cpp ---- alvar-2.0.0-src/src/platform/CaptureFactory_unix.cpp 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/src/platform/CaptureFactory_unix.cpp 2017-04-29 10:44:43.722588381 +0200 -@@ -24,6 +24,7 @@ - #include "CaptureFactory_private.h" - - #include -+#include - - namespace alvar { - -diff -ur alvar-2.0.0-src/src/platform/capture_plugin_file/CapturePluginFile.h alvar.build/src/platform/capture_plugin_file/CapturePluginFile.h ---- alvar-2.0.0-src/src/platform/capture_plugin_file/CapturePluginFile.h 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/src/platform/capture_plugin_file/CapturePluginFile.h 2017-04-29 10:49:06.143903039 +0200 -@@ -21,6 +21,8 @@ - * . - */ - -+#include -+ - #ifndef CAPTUREPLUGINFILE_H - #define CAPTUREPLUGINFILE_H - -diff -ur alvar-2.0.0-src/src/platform/capture_plugin_highgui/CapturePluginHighgui.h alvar.build/src/platform/capture_plugin_highgui/CapturePluginHighgui.h ---- alvar-2.0.0-src/src/platform/capture_plugin_highgui/CapturePluginHighgui.h 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/src/platform/capture_plugin_highgui/CapturePluginHighgui.h 2017-04-29 10:48:25.894548024 +0200 -@@ -21,6 +21,8 @@ - * . - */ - -+#include -+ - #ifndef CAPTUREPLUGINHIGHGUI_H - #define CAPTUREPLUGINHIGHGUI_H - -diff -ur alvar-2.0.0-src/src/Rotation.cpp alvar.build/src/Rotation.cpp ---- alvar-2.0.0-src/src/Rotation.cpp 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/src/Rotation.cpp 2017-04-29 10:43:58.514189625 +0200 -@@ -24,6 +24,8 @@ - #include "Alvar.h" - #include "Rotation.h" - -+#include -+ - using namespace std; - - namespace alvar { -diff -ur alvar-2.0.0-src/src/TrackerOrientation.cpp alvar.build/src/TrackerOrientation.cpp ---- alvar-2.0.0-src/src/TrackerOrientation.cpp 2012-05-29 17:11:26.000000000 +0200 -+++ alvar.build/src/TrackerOrientation.cpp 2017-04-29 10:44:15.073335684 +0200 -@@ -24,6 +24,8 @@ - #include "TrackerOrientation.h" - #include "Optimization.h" - -+#include -+ - using namespace std; - - namespace alvar { diff --git a/libalvar.spec b/libalvar.spec index a10bf7a..c25bfde 100644 --- a/libalvar.spec +++ b/libalvar.spec @@ -1,12 +1,11 @@ Name: libalvar Version: 2.0.0 -Release: 5%{?dist} +Release: 8%{?dist} Summary: library for creating AR applications License: LGPLv2+ URL: http://virtual.vtt.fi/virtual/proj2/multimedia/alvar/desktop/index.html -Source0: https://trac.fawkesrobotics.org/raw-attachment/wiki/Plugins/TagVision/alvar-2.0.0-src.tar.gz -Patch0: libalvar.opencv3.patch +Source0: https://github.com/morxa/alvar/archive/opencv3.tar.gz#/alvar.tar.gz BuildRequires: chrpath BuildRequires: cmake @@ -31,7 +30,7 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep -%autosetup -p1 -n alvar-%{version}-src +%autosetup -p1 -n alvar-opencv3 %build mkdir -p build_fedora @@ -45,28 +44,41 @@ pushd build_fedora %make_install mkdir -p %{buildroot}/%{_libdir} mv %{buildroot}/%{_bindir}/*.so %{buildroot}/%{_libdir} -mv %{buildroot}/%{_bindir}/alvarplugins/*.so %{buildroot}/%{_libdir} -#find %{buildroot}/%{_bindir} -perm -111 -exec chrpath -d '{}' \; -find %{buildroot}/%{_libdir} -name "*.so*" -exec chrpath -d '{}' \; -install -p -m 0644 -D src/Alvar.h %{buildroot}/%{_includedir}/%{name}/Alvar.h -install -p -m 0644 ../src/*.h %{buildroot}/%{_includedir}/%{name}/ +install -p -m 0644 -D src/Alvar.h %{buildroot}/%{_includedir}/alvar/Alvar.h +install -p -m 0644 ../src/*.h %{buildroot}/%{_includedir}/alvar/ +pushd sample +for file in sample* ; do + install -p $file %{buildroot}%{_bindir}/alvar$file +done +popd rm -f %{buildroot}/%{_bindir}/*.{xml,png,osg} rm -f %{buildroot}/%{_prefix}/LICENSE rm -rf %{buildroot}/%{_prefix}/doc +find %{buildroot}/%{_libdir} -name "*.so*" -exec chrpath -d '{}' \; +find %{buildroot}/%{_bindir} -exec chrpath -d '{}' \; %files %license LICENSE %doc README %doc doc/ALVAR.pdf -%{_bindir}/alvarplugins +%{_bindir}/alvar* %{_libdir}/* %files devel -%{_includedir}/%{name}/* +%{_includedir}/alvar/* %changelog +* Tue May 02 2017 Till Hofmann - 2.0.0-8 +- Do not move alvar plugins to libdir, but keep them in bindir + +* Sun Apr 30 2017 Till Hofmann - 2.0.0-7 +- Also install sample programs + +* Sat Apr 29 2017 Till Hofmann - 2.0.0-6 +- Fix install dir for header files + * Sat Apr 29 2017 Till Hofmann - 2.0.0-5 - Add patch to build with opencv3