Hello community,

here is the log from the commit of package liborigin for openSUSE:Factory 
checked in at 2019-05-02 19:20:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/liborigin (Old)
 and      /work/SRC/openSUSE:Factory/.liborigin.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "liborigin"

Thu May  2 19:20:53 2019 rev:5 rq:699958 version:3.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/liborigin/liborigin.changes      2018-03-09 
10:42:26.391659710 +0100
+++ /work/SRC/openSUSE:Factory/.liborigin.new.5148/liborigin.changes    
2019-05-02 19:21:19.085781480 +0200
@@ -1,0 +2,27 @@
+Tue Apr 23 09:30:45 UTC 2019 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 3.0.0:
+  * No news file or changelog from upstream.
+- Drop liborigin2-nostatic.patch: instead specify build targets
+  for make individually, omitting the static lib.
+- Add liborigin-link-opj2dat-against-sharedlib.patch: compile
+  opj2dat against the shared lib instead of the static lib; patch
+  taken from upstream bug report
+  (https://sourceforge.net/p/liborigin/bugs/24/).
+- Add liborigin-remove-exit-calls.patch: Remove exit calls from
+  library; patch taken from upstream git (commit #a8b25b48).
+- Update shared lib package name in keeping with upstream so
+  versioning bump.
+- Use %%cmake_build for building and pass individual targets for
+  make: origin, opj2dat, and doc.
+- Building doc now requires doxygen.
+- Drop boost-devel BuildRequires: no longer needed.
+- Update sed command to fix location of documentation in keeping
+  with changes to upstream CMakelists.txt file.
+- Use %%autosetup to setup build dir.
+- Package pkgconfig file; introduce BuildRequires: pkgconfig to
+  auto-generate appropriate pkgconfig-based Provides.
+- Drop sed script for libdir, no longer needed.
+- Minor cleanups using spec-cleaner.
+
+-------------------------------------------------------------------

Old:
----
  liborigin-2.0.0.tar.gz
  liborigin2-nostatic.patch

New:
----
  liborigin-3.0.0.tar.gz
  liborigin-link-opj2dat-against-sharedlib.patch
  liborigin-remove-exit-calls.patch

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

Other differences:
------------------
++++++ liborigin.spec ++++++
--- /var/tmp/diff_new_pack.GmaWk6/_old  2019-05-02 19:21:20.813785127 +0200
+++ /var/tmp/diff_new_pack.GmaWk6/_new  2019-05-02 19:21:20.817785135 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package liborigin
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,20 +16,23 @@
 #
 
 
+%define shlib %{name}3
 Name:           liborigin
-Version:        2.0.0
+Version:        3.0.0
 Release:        0
 Summary:        A library for reading OriginLab OPJ project files
 License:        GPL-2.0-or-later
 Group:          Development/Libraries/C and C++
-Url:            http://sourceforge.net/projects/liborigin/
+URL:            http://sourceforge.net/projects/liborigin/
 Source:         
http://downloads.sourceforge.net/liborigin/%{name}-%{version}.tar.gz
-# PATCH-FIX-OPENSUSE liborigin2-nostatic.patch -- disable static library
-Patch1:         liborigin2-nostatic.patch
-BuildRequires:  boost-devel
+# PATCH-FIX-UPSTREAM liborigin-link-opj2dat-against-sharedlib.patch 
badshah...@gmail.com -- Link opj2dat against the shared library so we avoid 
generating and installing the static lib 
(https://sourceforge.net/p/liborigin/bugs/24)
+Patch1:         liborigin-link-opj2dat-against-sharedlib.patch
+# PATCH-FIX-UPSTREAM liborigin-remove-exit-calls.patch badshah...@gmail.com -- 
Remove exit calls from library; patch taken from upstream commit
+Patch2:         liborigin-remove-exit-calls.patch
 BuildRequires:  cmake
+BuildRequires:  doxygen
 BuildRequires:  gcc-c++
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildRequires:  pkgconfig
 
 %description
 A library for reading OriginLab OPJ project files.
@@ -37,11 +40,11 @@
 * reads any worksheets with all columns
 * supports 4.1, 5.0, 6.0, 6.1, 7.0, 7.5 projects
 
-%package     -n %{name}2
+%package     -n %{shlib}
 Summary:        A library for reading OriginLab OPJ project files
 Group:          System/Libraries
 
-%description -n %{name}2
+%description -n %{shlib}
 A library for reading OriginLab OPJ project files.
 Features:
 * reads any worksheets with all columns
@@ -50,7 +53,7 @@
 %package        devel
 Summary:        Libraries and header files for liborigin
 Group:          Development/Libraries/C and C++
-Requires:       %{name}2 = %{version}
+Requires:       %{shlib} = %{version}
 Recommends:     %{name}-doc
 
 %description    devel
@@ -78,42 +81,33 @@
 * supports 4.1, 5.0, 6.0, 6.1, 7.0, 7.5 projects
 
 %prep
-%setup -q -n %{name}
-%patch1 -p1
-
-# fix hardcoded library path
-sed -i "s|DESTINATION lib)|DESTINATION %{_lib})|" CMakeLists.txt
+%autosetup -p1
 
 # fix documentation directory
-sed -i "s|DESTINATION share/doc/liborigin)|DESTINATION %{_docdir}/%{name})|" 
CMakeLists.txt
+sed -i "s|DESTINATION share/doc/liborigin|DESTINATION %{_docdir}/%{name}|" 
CMakeLists.txt
 
 %build
 %cmake
-
-make %{?_smp_mflags}
+%cmake_build origin opj2dat doc
 
 %install
 %cmake_install
 
-%post -n %{name}2 -p /sbin/ldconfig
-
-%postun -n %{name}2 -p /sbin/ldconfig
+%post -n %{shlib} -p /sbin/ldconfig
+%postun -n %{shlib} -p /sbin/ldconfig
 
-%files -n %{name}2
-%defattr(-,root,root)
+%files -n %{shlib}
 %{_libdir}/%{name}.so.*
 
 %files devel
-%defattr(-,root,root)
 %{_libdir}/%{name}.so
 %{_includedir}/%{name}/
+%{_libdir}/pkgconfig/*.pc
 
 %files doc
-%defattr(-,root,root)
 %{_docdir}/%{name}/
 
 %files tools
-%defattr(-,root,root)
 %{_bindir}/opj2dat
 
 %changelog

++++++ liborigin-2.0.0.tar.gz -> liborigin-3.0.0.tar.gz ++++++
++++ 14703 lines of diff (skipped)

++++++ liborigin-link-opj2dat-against-sharedlib.patch ++++++
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17c613b..18b7aee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,8 +78,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liborigin.pc 
DESTINATION lib${LIB_SUFF
 
 # command line util
 add_executable(opj2dat opj2dat.cpp)
-target_link_libraries (opj2dat origin-static)
+target_link_libraries (opj2dat origin)
 
+add_executable(opj2dat-static opj2dat.cpp)
+target_link_libraries (opj2dat-static origin-static)
+
+install(PROGRAMS opj2dat-static RENAME opj2dat DESTINATION bin OPTIONAL)
 install(TARGETS opj2dat DESTINATION bin OPTIONAL)
 
 # documentation
++++++ liborigin-remove-exit-calls.patch ++++++
--- a/OriginFile.cpp
+++ b/OriginFile.cpp
@@ -33,14 +33,15 @@
 #include <string>
 
 OriginFile::OriginFile(const string& fileName)
-:      fileVersion(0)
+:      fileVersion(0), ioError(0)
 {
        ifstream file(fileName.c_str(), ios_base::binary);
 
        if (!file.is_open())
        {
-               cerr <<  "Could not open " << fileName.c_str() << "!" << endl;
-               exit(EXIT_FAILURE);
+               cerr << endl << "liborigin: " << strerror(errno) << ": " << 
fileName.c_str() << endl;
+               ioError = errno;
+               return;
        }
 
 #ifdef GENERATE_CODE_FOR_LOG
@@ -48,8 +49,9 @@
        logfile = fopen("./opjfile.log", "w");
        if (logfile == nullptr)
        {
-               cerr <<  "Could not open opjfile.log !" << endl;
-               exit(EXIT_FAILURE);
+               cerr << endl <<  "liborigin: " << strerror(errno) << ": 
opjfile.log" << endl;
+               ioError = errno;
+               return;
        }
 #endif // GENERATE_CODE_FOR_LOG
 
@@ -152,10 +154,13 @@
        fclose(logfile);
 #endif // GENERATE_CODE_FOR_LOG
        parser.reset(createOriginAnyParser(fileName));
+       ioError=0;
 }
 
 bool OriginFile::parse()
 {
+       if (ioError != 0)
+               return false;
        parser->buildVersion = buildVersion;
        parser->fileVersion = fileVersion;
        return parser->parse();
--- a/OriginFile.h
+++ b/OriginFile.h
@@ -70,7 +70,7 @@
        string resultsLogString() const;                                        
                                                                //!< get 
Results Log
 
 private:
-       unsigned int fileVersion, buildVersion;
+       unsigned int fileVersion, buildVersion, ioError;
        unique_ptr<OriginParser> parser;
 };

--- a/opj2dat.cpp
+++ b/opj2dat.cpp
@@ -54,6 +54,8 @@
        OriginFile opj(inputfile);
        int status = opj.parse();
        cout << "Parsing status = " << status << endl;
+       if (! status)
+               return -1;
        cout << "OPJ PROJECT \"" << inputfile.c_str() << "\" VERSION = " <<  
opj.version() << endl;
 
        cout << "number of datasets     = " << opj.datasetCount() << endl;

Reply via email to