Hello community,

here is the log from the commit of package armadillo for openSUSE:Factory 
checked in at 2016-11-05 21:28:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/armadillo (Old)
 and      /work/SRC/openSUSE:Factory/.armadillo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "armadillo"

Changes:
--------
--- /work/SRC/openSUSE:Factory/armadillo/armadillo.changes      2016-10-31 
09:56:50.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.armadillo.new/armadillo.changes 2016-11-05 
21:28:23.000000000 +0100
@@ -1,0 +2,13 @@
+Sat Oct 29 10:05:40 UTC 2016 - [email protected]
+
+- Add armadillo-install-pkgconfig.patch: Generate and install a
+  pkgconfig file (PATCH-FEATURE-OPENSUSE for now, but in
+  discussions with upstream to have this included).
+- Add armadillo-tests.patch: Generate tests/Makefile by
+  configuring tests/Makefile.in using cmake so that the tests can
+  be run before actually installing the library. Then, use a
+  make check section to test the built library
+  (PATCH-FEATURE-OPENSUSE for now, but in discussions with
+  upstream to have this included).
+
+-------------------------------------------------------------------

New:
----
  armadillo-install-pkgconfig.patch
  armadillo-tests.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ armadillo.spec ++++++
--- /var/tmp/diff_new_pack.E8yq07/_old  2016-11-05 21:28:25.000000000 +0100
+++ /var/tmp/diff_new_pack.E8yq07/_new  2016-11-05 21:28:25.000000000 +0100
@@ -17,7 +17,6 @@
 
 
 %define soname libarmadillo7
-
 Name:           armadillo
 Version:        7.500.0
 Release:        0
@@ -27,11 +26,16 @@
 Url:            http://arma.sourceforge.net/
 Source:         http://downloads.sourceforge.net/arma/%{name}-%{version}.tar.xz
 Source2:        baselibs.conf
+# PATCH-FEATURE-OPENSUSE armadillo-install-pkgconfig.patch 
[email protected] -- Generate and install a pkgconfig file
+Patch0:         armadillo-install-pkgconfig.patch
+# PATCH-FEATURE-OPENSUSE armadillo-tests.patch [email protected] -- 
Generate tests/Makefile by configuring tests/Makefile.in using cmake so that 
the tests can be run before actually installing the library; patch sent upstream
+Patch1:         armadillo-tests.patch
 BuildRequires:  arpack-ng-devel
 BuildRequires:  blas-devel
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
 BuildRequires:  lapack-devel
+BuildRequires:  pkgconfig
 BuildRequires:  superlu-devel >= 5.2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -127,6 +131,8 @@
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 #Convert DOS end-of-line to UNIX end-of-line
 sed -i 's/\r//' README.txt
 sed -i 's/\r//' LICENSE.txt
@@ -146,6 +152,12 @@
 rm -rf examples/example2_win64.*
 rm -rf examples/lib_win64
 
+%check
+pushd tests
+make %{?_smp_mflags}
+./main
+popd
+
 %post -n %{soname} -p /sbin/ldconfig
 
 %postun -n %{soname} -p /sbin/ldconfig
@@ -163,6 +175,7 @@
 %files devel
 %defattr(-,root,root)
 %{_libdir}/*.so
+%{_libdir}/pkgconfig/%{name}.pc
 %{_includedir}/armadillo
 %{_includedir}/armadillo_bits/
 %{_datadir}/Armadillo/

++++++ armadillo-install-pkgconfig.patch ++++++
Index: armadillo-7.500.0/misc/armadillo.pc.in
===================================================================
--- /dev/null
+++ armadillo-7.500.0/misc/armadillo.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INCLUDE_DIR@
+
+Name: armadillo
+Description: A fast and user-friendly C++ linear algebra library
+URL: http://arma.sourceforge.net
+Version: @ARMA_VERSION_MAJOR@.@ARMA_VERSION_MINOR@.@ARMA_VERSION_PATCH@
+Cflags: -I${includedir}
+Libs: -L${libdir} -larmadillo
Index: armadillo-7.500.0/CMakeLists.txt
===================================================================
--- armadillo-7.500.0.orig/CMakeLists.txt
+++ armadillo-7.500.0/CMakeLists.txt
@@ -270,6 +269,11 @@ if(DETECT_HDF5)
   endif()
 endif()
 
+# Install pkgconfig file if pkg-config is found on system
+find_package(PkgConfig)
+if (PKG_CONFIG_FOUND)
+  set(ARMA_INSTALL_PKGCONFIG true)
+endif()
 
 include(ARMA_FindARPACK)
 message(STATUS "ARPACK_FOUND = ${ARPACK_FOUND}")
@@ -403,6 +407,11 @@ if(NOT INSTALL_BIN_DIR)
   set(INSTALL_BIN_DIR "bin")
 endif()
 
+# pkgconfig install dir
+if(ARMA_INSTALL_PKGCONFIG)
+  set(PKGCONFIG_DIR ${INSTALL_LIB_DIR}/pkgconfig)
+endif()
+
 # Make relative paths absolute so we can write them in Config.cmake files
 foreach(p LIB INCLUDE DATA BIN)
   set(var INSTALL_${p}_DIR)
@@ -452,6 +460,11 @@ message(STATUS "Generating '${PROJECT_BI
 
configure_file(${PROJECT_SOURCE_DIR}/cmake_aux/InstallFiles/ArmadilloConfigVersion.cmake.in
   "${PROJECT_BINARY_DIR}/ArmadilloConfigVersion.cmake" @ONLY)
 
+if(ARMA_INSTALL_PKGCONFIG)
+  message(STATUS "Generating '${PROJECT_BINARY_DIR}/misc/armadillo.pc'")
+  configure_file(${PROJECT_SOURCE_DIR}/misc/armadillo.pc.in
+    "${PROJECT_SOURCE_DIR}/misc/armadillo.pc" @ONLY)
+endif()
 
 # Install the export set for use with the install-tree
 install(EXPORT ArmadilloLibraryDepends DESTINATION
@@ -481,3 +494,9 @@ install(FILES
   "${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfig.cmake"
   "${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfigVersion.cmake"
   DESTINATION "${ARMADILLO_CMAKE_DIR}" COMPONENT dev)
+
+# Install pkgconfig file if wanted
+if(ARMA_INSTALL_PKGCONFIG)
+  install(FILES "${PROJECT_SOURCE_DIR}/misc/armadillo.pc"
+          DESTINATION "${PKGCONFIG_DIR}")
+endif()
++++++ armadillo-tests.patch ++++++
Index: armadillo-7.500.0/tests/Makefile.in
===================================================================
--- /dev/null
+++ armadillo-7.500.0/tests/Makefile.in
@@ -0,0 +1,38 @@
+
+LIB_FLAGS = -L@PROJECT_SOURCE_DIR@ -larmadillo
+
+ifeq (${ARMA_USE_LAPACK},true)
+  LIB_FLAGS += -llapack
+endif
+ifeq (${ARMA_USE_BLAS},true)
+  LIB_FLAGS += -lblas
+endif
+ifeq (${ARMA_USE_SUPERLU},true)
+  LIB_FLAGS += -lsuperlu
+endif
+ifeq (${ARMA_USE_ARPACK},true)
+  LIB_FLAGS += -larpack
+endif
+
+#LIB_FLAGS = -lblas -llapack 
+#LIB_FLAGS = -lopenblas -llapack 
+
+CXX_FLAGS = -I@PROJECT_SOURCE_DIR@/include -std=c++11 -Wshadow -Wall -pedantic 
-O0
+#CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O0 -DARMA_DONT_USE_WRAPPER
+#CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O2
+
+OBJECTS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
+
+%.o: %.cpp $(DEPS)
+       $(CXX) $(CXX_FLAGS) -o $@ -c $<
+
+main: $(OBJECTS)
+       $(CXX) $(CXX_FLAGS) -o $@ $(OBJECTS) $(LIB_FLAGS)
+
+
+all: main
+
+.PHONY: clean
+
+clean:
+       rm -f main *.o
Index: armadillo-7.500.0/CMakeLists.txt
===================================================================
--- armadillo-7.500.0.orig/CMakeLists.txt
+++ armadillo-7.500.0/CMakeLists.txt
@@ -453,6 +453,10 @@ set(ARMADILLO_LIB_DIR      "${PROJECT_BI
 set(ARMADILLO_CMAKE_DIR    "${PROJECT_BINARY_DIR}")
 
 
+# Configure tests/Makefile.in for running tests without installing first
+message(STATUS "Configuring tests/Makefile")
+configure_file(${PROJECT_SOURCE_DIR}/tests/Makefile.in 
${PROJECT_SOURCE_DIR}/tests/Makefile)
+
 message(STATUS "Generating '${PROJECT_BINARY_DIR}/ArmadilloConfig.cmake'")
 # copy/change config and configVersion file (modify only the @xyz@ variables)
 
configure_file(${PROJECT_SOURCE_DIR}/cmake_aux/InstallFiles/ArmadilloConfig.cmake.in
Index: armadillo-7.500.0/tests/Makefile
===================================================================
--- armadillo-7.500.0.orig/tests/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-
-LIB_FLAGS = -larmadillo
-#LIB_FLAGS = -lblas -llapack 
-#LIB_FLAGS = -lopenblas -llapack 
-
-CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O0
-#CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O0 -DARMA_DONT_USE_WRAPPER
-#CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O2
-
-OBJECTS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
-
-%.o: %.cpp $(DEPS)
-       $(CXX) $(CXX_FLAGS) -o $@ -c $< $
-
-main: $(OBJECTS)
-       $(CXX) $(CXX_FLAGS) -o $@ $(OBJECTS) $(LIB_FLAGS)
-
-
-all: main
-
-.PHONY: clean
-
-clean:
-       rm -f main *.o

Reply via email to