Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libharu for openSUSE:Factory checked 
in at 2023-06-30 19:58:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libharu (Old)
 and      /work/SRC/openSUSE:Factory/.libharu.new.13546 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libharu"

Fri Jun 30 19:58:29 2023 rev:10 rq:1096044 version:2.4.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/libharu/libharu.changes  2022-09-14 
13:45:27.349965808 +0200
+++ /work/SRC/openSUSE:Factory/.libharu.new.13546/libharu.changes       
2023-06-30 19:58:45.373602067 +0200
@@ -1,0 +2,29 @@
+Thu Jun 29 07:07:46 UTC 2023 - Atri Bhattacharya <[email protected]>
+
+- Move Conflicts against libhpdf2_4_2 to devel package.
+
+-------------------------------------------------------------------
+Mon Jun 26 12:52:05 UTC 2023 - Atri Bhattacharya <[email protected]>
+
+- Add libharu-so-versioning.patch -- Add correct versioning to
+  shared object libhpdf.so [gh#libharu/libharu#284]; patch sent
+  upstream.
+- Drop so version setting snippet from specfile in light of
+  above patch.
+- Re-name shared library as libhpdf2; add Conflicts against
+  previously named libhpdf2_4_2, which violated the SLPP.
+- Use fdupes to clean up a duplicate.
+
+-------------------------------------------------------------------
+Sat Oct 15 00:32:47 UTC 2022 - Stefan Brüns <[email protected]>
+
+- update to 2.4.3:
+  * Add static hpdf_version.h header
+  * hpdf_version.h included again
+  * File attachment issue resolved
+  * Renamed *_LIBZ defines to _*ZLIB, enables compression of
+    PDF files again.
+- Clean up spec file
+- Add SOVERSION to library, remove rpmlintrc
+
+-------------------------------------------------------------------

Old:
----
  libharu-2.4.2.tar.gz
  libharu-rpmlintrc

New:
----
  libharu-2.4.3.tar.gz
  libharu-so-versioning.patch

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

Other differences:
------------------
++++++ libharu.spec ++++++
--- /var/tmp/diff_new_pack.CjmsDi/_old  2023-06-30 19:58:46.093606349 +0200
+++ /var/tmp/diff_new_pack.CjmsDi/_new  2023-06-30 19:58:46.097606373 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libharu
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,18 +16,20 @@
 #
 
 
-%define relver 2_4_2
+%define relver 2
 %define lname  libhpdf%{relver}
 Name:           libharu
-Version:        2.4.2
+Version:        2.4.3
 Release:        0
 Summary:        Library for generating PDF files
 License:        Zlib
 Group:          Productivity/Office/Other
 URL:            http://libharu.org
 Source0:        
https://github.com/libharu/libharu/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-Source1:        %{name}-rpmlintrc
+# PATCH-FIX-UPSTREAM libharu-so-versioning.patch gh#libharu/libharu#284 
[email protected] -- Add correct versioning to shared object libhpdf.so
+Patch0:         libharu-so-versioning.patch
 BuildRequires:  cmake
+BuildRequires:  fdupes
 BuildRequires:  libpng-devel
 BuildRequires:  zlib-devel
 
@@ -45,9 +47,9 @@
 
 %package -n %{lname}
 Summary:        Library for generating PDF files
-# used wrong shlib packaging name..
 Group:          System/Libraries
 
+
 %description -n %{lname}
 libHaru is a library for generating PDF files.
 It supports the following features:
@@ -66,21 +68,25 @@
 Requires:       %{lname} = %{version}
 Requires:       libpng-devel
 Requires:       zlib-devel
+Conflicts:      libhpdf2_4_2
 
 %description    devel
 This package contains libraries and header files for developing
 applications that use %{name}.
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
-%cmake -DLIBHPDF_STATIC=NO
-%make_jobs
+%cmake \
+  -DBUILD_SHARED_LIBS:BOOL=ON \
+  %{nil}
+%cmake_build
 
 %install
 %cmake_install
-find %{buildroot} -type f -name "*.la" -delete -print
+
+%fdupes %{buildroot}%{_datadir}/%{name}/
 
 %post -n %{lname} -p /sbin/ldconfig
 %postun -n %{lname} -p /sbin/ldconfig
@@ -88,9 +94,10 @@
 %files -n %{lname}
 %license LICENSE
 %doc README.md
-%{_libdir}/libhpdf.so
+%{_libdir}/libhpdf.so.*
 
 %files devel
+%{_libdir}/libhpdf.so
 %{_includedir}/*.h
 %{_datadir}/%{name}/
 

++++++ libharu-2.4.2.tar.gz -> libharu-2.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/CMakeLists.txt 
new/libharu-2.4.3/CMakeLists.txt
--- old/libharu-2.4.2/CMakeLists.txt    2022-09-11 13:21:37.000000000 +0200
+++ new/libharu-2.4.3/CMakeLists.txt    2022-10-14 12:04:02.000000000 +0200
@@ -1,24 +1,18 @@
 cmake_minimum_required(VERSION 3.10)
 
+file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/include/hpdf_version.h 
HPDF_VERSION_H_CONTENTS REGEX " HPDF_(MAJOR|MINOR|BUGFIX)_VERSION ")
+string(REGEX MATCH "MAJOR_VERSION [0-9]+"  HPDF_MAJOR_VERSION  
${HPDF_VERSION_H_CONTENTS})
+string(REGEX MATCH "MINOR_VERSION [0-9]+"  HPDF_MINOR_VERSION  
${HPDF_VERSION_H_CONTENTS})
+string(REGEX MATCH "BUGFIX_VERSION [0-9]+" HPDF_BUGFIX_VERSION 
${HPDF_VERSION_H_CONTENTS})
+string(REGEX MATCH "[0-9]+" HPDF_MAJOR_VERSION  ${HPDF_MAJOR_VERSION})
+string(REGEX MATCH "[0-9]+" HPDF_MINOR_VERSION  ${HPDF_MINOR_VERSION})
+string(REGEX MATCH "[0-9]+" HPDF_BUGFIX_VERSION ${HPDF_BUGFIX_VERSION})
+
 project(libharu
-    VERSION 2.4.2
+    VERSION ${HPDF_MAJOR_VERSION}.${HPDF_MINOR_VERSION}.${HPDF_BUGFIX_VERSION}
     DESCRIPTION "libHaru is a free, cross platform, open source library for 
generating PDF files."
     LANGUAGES C)
 
-set(PROJECT_VERSION_EXTRA "")
-if (PROJECT_VERSION_EXTRA)
-    set(PROJECT_VERSION_TEXT "${PROJECT_VERSION}-${PROJECT_VERSION_EXTRA}")
-else()
-    set(PROJECT_VERSION_TEXT ${PROJECT_VERSION})
-endif()
-
-# Set version id
-math(EXPR PROJECT_VERSION_ID "
-    10000 * ${PROJECT_VERSION_MAJOR} +
-    100 * ${PROJECT_VERSION_MINOR} +
-    ${PROJECT_VERSION_PATCH}
-")
-
 include(GNUInstallDirs)
 
 
@@ -55,7 +49,7 @@
 
 # check zlib availability
 find_package(ZLIB)
-  
+
 # check png availability
 find_package(PNG)
 
@@ -85,13 +79,7 @@
 set (LIBHPDF_HAVE_LIBPNG ${PNG_FOUND})
 
 # support different zlib defines
-set (LIBHPDF_HAVE_LIBZ ${ZLIB_FOUND})
-
-# create hpdf_version.h
-configure_file(
-  ${PROJECT_SOURCE_DIR}/include/hpdf_version.h.cmake
-  ${PROJECT_BINARY_DIR}/include/hpdf_version.h
-)
+set (LIBHPDF_HAVE_ZLIB ${ZLIB_FOUND})
 
 # create hpdf_config.h
 configure_file(
@@ -143,8 +131,8 @@
     include/hpdf_pdfa.h
     include/hpdf_3dmeasure.h
     include/hpdf_exdata.h
+    include/hpdf_version.h
     ${PROJECT_BINARY_DIR}/include/hpdf_config.h
-    ${PROJECT_BINARY_DIR}/include/hpdf_version.h
 )
 
 # install header files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/cmake/modules/summary.cmake 
new/libharu-2.4.3/cmake/modules/summary.cmake
--- old/libharu-2.4.2/cmake/modules/summary.cmake       2022-09-11 
13:21:37.000000000 +0200
+++ new/libharu-2.4.3/cmake/modules/summary.cmake       2022-10-14 
12:04:02.000000000 +0200
@@ -42,7 +42,7 @@
 DEVPAK:                        ${DEVPAK}
 
 Optional libraries:
-HAVE_LIBZ:             ${LIBHPDF_HAVE_LIBZ}
+HAVE_ZLIB:             ${LIBHPDF_HAVE_ZLIB}
 HAVE_LIBPNG:           ${LIBHPDF_HAVE_LIBPNG}
 ")
 message("${_output_results}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/demo/CMakeLists.txt 
new/libharu-2.4.3/demo/CMakeLists.txt
--- old/libharu-2.4.2/demo/CMakeLists.txt       2022-09-11 13:21:37.000000000 
+0200
+++ new/libharu-2.4.3/demo/CMakeLists.txt       2022-10-14 12:04:02.000000000 
+0200
@@ -9,6 +9,7 @@
   # =======================================================================
 set(
   demos_NAMES
+       attach
        character_map
        encoding_list
        encryption
@@ -57,7 +58,7 @@
   if(DEMO_C_FLAGS)
     set_target_properties(${demo} PROPERTIES COMPILE_FLAGS ${DEMO_C_FLAGS})
   endif(DEMO_C_FLAGS)
-endforeach(demo)
+endforeach()
   
 # some demos need grid_sheet.c compiled in
 foreach(demo ${demos_with_grid_NAMES})
@@ -69,7 +70,7 @@
   if(DEMO_C_FLAGS)
     set_target_properties(${demo} PROPERTIES COMPILE_FLAGS ${DEMO_C_FLAGS})
   endif(DEMO_C_FLAGS)
-endforeach(demo)
+endforeach()
   
 # the grid_sheet demo needs extra defines
 add_executable(grid_sheet grid_sheet.c)
@@ -88,7 +89,7 @@
 )
 foreach(demo ${demos_NAMES} ${demos_with_grid_NAMES} grid_sheet)
   install(FILES ${demo}.c DESTINATION demo)
-endforeach(demo)
+endforeach()
 
 # install demo files
 install(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/demo/attach.c 
new/libharu-2.4.3/demo/attach.c
--- old/libharu-2.4.2/demo/attach.c     2022-09-11 13:21:37.000000000 +0200
+++ new/libharu-2.4.3/demo/attach.c     2022-10-14 12:04:02.000000000 +0200
@@ -18,7 +18,7 @@
 #include <setjmp.h>
 #include "hpdf.h"
 
-const char *text = "This PDF should have an attachment named attach.c";
+const char *text = "This PDF should have an attachment named basn3p08.png";
 
 jmp_buf env;
 
@@ -76,8 +76,7 @@
     HPDF_Page_EndText (page);
 
     /* attach a file to the document */
-    HPDF_AttachFile (pdf, "attach.c");
-    HPDF_AttachFile (pdf, "jpeg_demo.c");
+    HPDF_AttachFile (pdf, "pngsuite/basn3p08.png");
 
     /* save the document to a file */
     HPDF_SaveToFile (pdf, fname);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/include/hpdf.h 
new/libharu-2.4.3/include/hpdf.h
--- old/libharu-2.4.2/include/hpdf.h    2022-09-11 13:21:37.000000000 +0200
+++ new/libharu-2.4.3/include/hpdf.h    2022-10-14 12:04:02.000000000 +0200
@@ -18,6 +18,7 @@
 #define _HPDF_H
 
 #include "hpdf_config.h"
+#include "hpdf_version.h"
 
 #define HPDF_UNUSED(a) ((void)(a))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/include/hpdf_config.h.cmake 
new/libharu-2.4.3/include/hpdf_config.h.cmake
--- old/libharu-2.4.2/include/hpdf_config.h.cmake       2022-09-11 
13:21:37.000000000 +0200
+++ new/libharu-2.4.3/include/hpdf_config.h.cmake       2022-10-14 
12:04:02.000000000 +0200
@@ -8,7 +8,7 @@
 #cmakedefine LIBHPDF_HAVE_LIBPNG
 
 /* Define to 1 if you have the `z' library (-lz). */
-#cmakedefine LIBHPDF_HAVE_LIBZ
+#cmakedefine LIBHPDF_HAVE_ZLIB
 
 /* Define to 1 if you have the <memory.h> header file. */
 #cmakedefine LIBHPDF_HAVE_MEMORY_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/include/hpdf_version.h 
new/libharu-2.4.3/include/hpdf_version.h
--- old/libharu-2.4.2/include/hpdf_version.h    1970-01-01 01:00:00.000000000 
+0100
+++ new/libharu-2.4.3/include/hpdf_version.h    2022-10-14 12:04:02.000000000 
+0200
@@ -0,0 +1,10 @@
+#define HPDF_MAJOR_VERSION 2
+#define HPDF_MINOR_VERSION 4
+#define HPDF_BUGFIX_VERSION 3
+#define HPDF_EXTRA_VERSION ""
+
+#define hpdf_vquote(x) #x
+#define hpdf_vexp(x) hpdf_vquote(x)
+
+#define HPDF_VERSION_TEXT (hpdf_vexp(HPDF_MAJOR_VERSION) "." 
hpdf_vexp(HPDF_MINOR_VERSION) "." hpdf_vexp(HPDF_BUGFIX_VERSION) 
HPDF_EXTRA_VERSION)
+#define HPDF_VERSION_ID ((HPDF_MAJOR_VERSION) * 10000 + (HPDF_MINOR_VERSION) * 
100 + (HPDF_BUGFIX_VERSION))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/include/hpdf_version.h.cmake 
new/libharu-2.4.3/include/hpdf_version.h.cmake
--- old/libharu-2.4.2/include/hpdf_version.h.cmake      2022-09-11 
13:21:37.000000000 +0200
+++ new/libharu-2.4.3/include/hpdf_version.h.cmake      1970-01-01 
01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#define HPDF_MAJOR_VERSION @PROJECT_VERSION_MAJOR@
-#define HPDF_MINOR_VERSION @PROJECT_VERSION_MINOR@
-#define HPDF_BUGFIX_VERSION @PROJECT_VERSION_PATCH@
-#define HPDF_EXTRA_VERSION "@PROJECT_VERSION_EXTRA@"
-#define HPDF_VERSION_TEXT "@PROJECT_VERSION_TEXT@"
-#define HPDF_VERSION_ID @PROJECT_VERSION_ID@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/src/hpdf_array.c 
new/libharu-2.4.3/src/hpdf_array.c
--- old/libharu-2.4.2/src/hpdf_array.c  2022-09-11 13:21:37.000000000 +0200
+++ new/libharu-2.4.3/src/hpdf_array.c  2022-10-14 12:04:02.000000000 +0200
@@ -289,7 +289,7 @@
         void *ptr = HPDF_List_ItemAt (array->list, i);
         void *obj_ptr;
 
-        header = (HPDF_Obj_Header *)obj;
+        header = (HPDF_Obj_Header *)ptr;
         if (header->obj_class == HPDF_OCLASS_PROXY)
             obj_ptr = ((HPDF_Proxy)ptr)->obj;
         else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/src/hpdf_namedict.c 
new/libharu-2.4.3/src/hpdf_namedict.c
--- old/libharu-2.4.2/src/hpdf_namedict.c       2022-09-11 13:21:37.000000000 
+0200
+++ new/libharu-2.4.3/src/hpdf_namedict.c       2022-10-14 12:04:02.000000000 
+0200
@@ -135,27 +135,13 @@
 
     icount = HPDF_Array_Items(items);
 
-    /* If we're larger than the last element, append */
-    if (icount) {
-        HPDF_String last = HPDF_Array_GetItem(items, icount - 2, 
HPDF_OCLASS_STRING);
-
-        if (HPDF_String_Cmp(name, last) > 0) {
-            HPDF_Array_Add(items, name);
-            HPDF_Array_Add(items, obj);
-            return HPDF_OK;
-        }
-    }
-
-    /* Walk backwards through the list until we're smaller than an element=
-     * That's the element to insert in front of. */
-    for (i = icount - 4; i >= 0; i -= 2) {
-        HPDF_String elem = HPDF_Array_GetItem(items, i, HPDF_OCLASS_STRING);
-
-        if (i == 0 || HPDF_String_Cmp(name, elem) < 0) {
-            HPDF_Array_Insert(items, elem, name);
-            HPDF_Array_Insert(items, elem, obj);
-            return HPDF_OK;
-        }
+    for( i = 0; i < icount; i += 2 ) {
+      HPDF_String elem = HPDF_Array_GetItem( items, i, HPDF_OCLASS_STRING );
+      if( HPDF_String_Cmp( name, elem ) < 0 ) {
+        HPDF_Array_Insert( items, elem, name );
+        HPDF_Array_Insert( items, elem, obj );
+        return HPDF_OK;
+      }
     }
 
     /* Items list is empty */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/src/hpdf_string.c 
new/libharu-2.4.3/src/hpdf_string.c
--- old/libharu-2.4.2/src/hpdf_string.c 2022-09-11 13:21:37.000000000 +0200
+++ new/libharu-2.4.3/src/hpdf_string.c 2022-10-14 12:04:02.000000000 +0200
@@ -196,7 +196,19 @@
 HPDF_String_Cmp  (HPDF_String s1,
                   HPDF_String s2)
 {
-    if (s1->len < s2->len) return -1;
-    if (s1->len > s2->len) return +1;
-    return memcmp(s1->value, s2->value, s1->len);
+    HPDF_INT32 res;
+    HPDF_UINT  minLen;
+
+    minLen = s1->len;
+    if( s1->len > s2->len ) {
+      minLen = s2->len;
+    }
+
+    res = memcmp( s1->value, s2->value, minLen );
+    if( res == 0 ) {
+      if( s1->len < s2->len ) res = -1;
+      if( s1->len > s2->len ) res = +1;
+    }
+
+    return res;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libharu-2.4.2/win32/include/hpdf_config.h 
new/libharu-2.4.3/win32/include/hpdf_config.h
--- old/libharu-2.4.2/win32/include/hpdf_config.h       2022-09-11 
13:21:37.000000000 +0200
+++ new/libharu-2.4.3/win32/include/hpdf_config.h       2022-10-14 
12:04:02.000000000 +0200
@@ -10,7 +10,7 @@
 #define LIBHPDF_HAVE_LIBPNG 1
 
 /* Define to 1 if you have the `z' library (-lz). */
-#define LIBHPDF_HAVE_LIBZ 1
+#define LIBHPDF_HAVE_ZLIB 1
 
 /* Define to 1 if you have the <memory.h> header file. */
 #undef LIBHPDF_HAVE_MEMORY_H

++++++ libharu-so-versioning.patch ++++++
Index: libharu-2.4.3/src/CMakeLists.txt
===================================================================
--- libharu-2.4.3.orig/src/CMakeLists.txt
+++ libharu-2.4.3/src/CMakeLists.txt
@@ -93,3 +93,6 @@ install(
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
 )
+
+set_target_properties(hpdf PROPERTIES VERSION 
${HPDF_MAJOR_VERSION}.${HPDF_MINOR_VERSION}.${HPDF_BUGFIX_VERSION})
+set_target_properties(hpdf PROPERTIES SOVERSION ${HPDF_MAJOR_VERSION})

Reply via email to