Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package diff-pdf for openSUSE:Factory checked in at 2026-07-26 11:30:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/diff-pdf (Old) and /work/SRC/openSUSE:Factory/.diff-pdf.new.2004 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "diff-pdf" Sun Jul 26 11:30:16 2026 rev:7 rq:1367783 version:0.5.3 Changes: -------- --- /work/SRC/openSUSE:Factory/diff-pdf/diff-pdf.changes 2023-02-13 16:43:15.640203039 +0100 +++ /work/SRC/openSUSE:Factory/.diff-pdf.new.2004/diff-pdf.changes 2026-07-26 11:32:53.623848348 +0200 @@ -1,0 +2,14 @@ +Sat Jul 25 19:31:24 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to version 0.5.3: + * Left/right document isolated view with hotkeys (gh#92) +- Includes 0.5.1 and 0.5.2: + * New --per-page-pixel-tolerance option for a per page pixel + difference tolerance + * Windows-only build and packaging changes (64-bit binaries, + usage message box) +- Pin the obs_scm service to the v0.5.3 tag instead of tracking + the default branch +- Drop the obsolete Group tag + +------------------------------------------------------------------- Old: ---- diff-pdf-0.5.obscpio New: ---- diff-pdf-0.5.3.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ diff-pdf.spec ++++++ --- /var/tmp/diff_new_pack.xNw4tO/_old 2026-07-26 11:32:54.139866126 +0200 +++ /var/tmp/diff_new_pack.xNw4tO/_new 2026-07-26 11:32:54.139866126 +0200 @@ -1,7 +1,7 @@ # # spec file for package diff-pdf # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,11 +17,10 @@ Name: diff-pdf -Version: 0.5 +Version: 0.5.3 Release: 0 Summary: Simple PDF comparison tool License: GPL-2.0-only AND LGPL-2.0-only -Group: Productivity/Publishing/PDF URL: https://vslavik.github.io/diff-pdf/ Source0: %{name}-%{version}.tar.gz Source1: %{name}.1 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.xNw4tO/_old 2026-07-26 11:32:54.171867229 +0200 +++ /var/tmp/diff_new_pack.xNw4tO/_new 2026-07-26 11:32:54.175867367 +0200 @@ -3,6 +3,7 @@ <param name="versionformat">@PARENT_TAG@</param> <param name="url">https://github.com/vslavik/diff-pdf.git</param> <param name="scm">git</param> + <param name="revision">v0.5.3</param> <param name="changesgenerate">enable</param> <param name="exclude">.*</param> <param name="versionrewrite-pattern">v(.*)</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.xNw4tO/_old 2026-07-26 11:32:54.199868194 +0200 +++ /var/tmp/diff_new_pack.xNw4tO/_new 2026-07-26 11:32:54.203868332 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/vslavik/diff-pdf.git</param> - <param name="changesrevision">201dab3d230c0d9513d9330bd10030d590894056</param></service></servicedata> + <param name="changesrevision">8e22eaf8140cb7536f4f8e01efd37411b146aa03</param></service></servicedata> (No newline at EOF) ++++++ diff-pdf-0.5.obscpio -> diff-pdf-0.5.3.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diff-pdf-0.5/.appveyor.yml new/diff-pdf-0.5.3/.appveyor.yml --- old/diff-pdf-0.5/.appveyor.yml 2021-02-26 18:51:58.000000000 +0100 +++ new/diff-pdf-0.5.3/.appveyor.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,36 +0,0 @@ -image: -- Ubuntu -- Visual Studio 2019 - -for: -- - matrix: - except: - - image: Ubuntu - environment: - MSYSTEM: MINGW32 - PATH: C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH% - CHERE_INVOKING: 1 - - -install: - - sh: sudo apt-get update - - sh: sudo apt-get --yes install libpoppler-glib-dev poppler-utils libwxgtk3.0-dev - - cmd: sh -lc "pacman --noconfirm -Syuu" - - cmd: sh -lc "pacman --noconfirm -S zip mingw-w64-i686-{poppler,wxWidgets}" - -build_script: - - sh: ./bootstrap && ./configure && make - - cmd: sh -lc "./bootstrap && ./configure && make" - -after_build: - - sh: make dist - - sh: appveyor PushArtifact diff-pdf*.tar.gz - - cmd: sh -lc "make windows-dist" - - ps: Get-ChildItem .\diff-pdf*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } - -deploy: - provider: Environment - name: github - on: - APPVEYOR_REPO_TAG: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diff-pdf-0.5/README.md new/diff-pdf-0.5.3/README.md --- old/diff-pdf-0.5/README.md 2021-02-26 18:51:58.000000000 +0100 +++ new/diff-pdf-0.5.3/README.md 2026-03-28 13:40:25.000000000 +0100 @@ -5,7 +5,7 @@ implementation of feature requests or fixes. If you're not a developer and/or willing to get your hands dirty, this tool is probably not for you.* -[](https://ci.appveyor.com/project/vslavik/diff-pdf) +[](https://github.com/vslavik/diff-pdf/actions/workflows/build.yml) ## Usage @@ -31,16 +31,23 @@ It is also possible to shift the two pages relatively to each other using Ctrl-arrows (Cmd-arrows on MacOS). This is useful for identifying translation-only differences. +You can also use `Ctrl+<` and `Ctrl+>` (`Cmd+<` and `Cmd+>` on MacOS) show the left and right documents respecively. `Ctrl+D` to return back to the diff view. + See the output of `$ diff-pdf --help` for complete list of options. ## Obtaining the binaries Precompiled version of the tool for Windows is available as part of -[the latest release](https://github.com/vslavik/diff-pdf/releases/tag/v0.5) +[the latest release](https://github.com/vslavik/diff-pdf/releases/latest/) as a ZIP archive, which contains everything you need to run diff-pdf. It will work from any place you unpack it to. +Alternatively, if you use [Chocolatey](https://chocolatey.org/), you can install +diff-pdf on Windows with: +``` +$ choco install diff-pdf +``` On Mac, if you use [Homebrew](https://brew.sh), you can use it to install diff-pdf with it: ``` $ brew install diff-pdf @@ -86,7 +93,14 @@ $ sudo yum install wxGTK wxGTK-devel poppler-glib poppler-glib-devel ``` -#### Ubuntu: +#### Ubuntu 24.04 / Debian 12 or newer: + +``` +$ sudo apt-get install make automake g++ +$ sudo apt-get install libpoppler-glib-dev poppler-utils libwxgtk3.2-dev +``` + +#### Older versions of Ubuntu / Debian: ``` $ sudo apt-get install make automake g++ @@ -132,8 +146,8 @@ ``` $ pacman -Syu - $ pacman -S automake autoconf pkg-config make zip - $ pacman -S mingw-w64-i686-{gcc,poppler,wxWidgets} + $ pacman -S automake autoconf pkg-config make zip pactoys + $ pacboy -S gcc:p poppler:p wxWidgets:p ``` 1. Build diff-pdf in the same way as in the instructions for Unix above: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diff-pdf-0.5/configure.ac new/diff-pdf-0.5.3/configure.ac --- old/diff-pdf-0.5/configure.ac 2021-02-26 18:51:58.000000000 +0100 +++ new/diff-pdf-0.5.3/configure.ac 2026-03-28 13:40:25.000000000 +0100 @@ -18,7 +18,7 @@ AC_PREREQ(2.61) -AC_INIT(diff-pdf, 0.5, [[email protected]]) +AC_INIT(diff-pdf, 0.5.3, [[email protected]]) AC_CONFIG_SRCDIR([diff-pdf.cpp]) AC_CONFIG_AUX_DIR([admin]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diff-pdf-0.5/diff-pdf.cpp new/diff-pdf-0.5.3/diff-pdf.cpp --- old/diff-pdf-0.5/diff-pdf.cpp 2021-02-26 18:51:58.000000000 +0100 +++ new/diff-pdf-0.5.3/diff-pdf.cpp 2026-03-28 13:40:25.000000000 +0100 @@ -42,6 +42,14 @@ #include <wx/progdlg.h> #include <wx/filesys.h> + +enum DisplayMode +{ + SHOW_DIFF_DOCUMENT, + SHOW_LEFT_DOCUMENT, + SHOW_RIGHT_DOCUMENT +}; + // ------------------------------------------------------------------------ // PDF rendering functions // ------------------------------------------------------------------------ @@ -50,6 +58,7 @@ bool g_skip_identical = false; bool g_mark_differences = false; long g_channel_tolerance = 0; +long g_per_page_pixel_tolerance = 0; bool g_grayscale = false; // Resolution to use for rasterization, in DPI #define DEFAULT_RESOLUTION 300 @@ -98,12 +107,13 @@ // Creates image of differences between s1 and s2. If the offset is specified, // then s2 is displaced by it. If thumbnail and thumbnail_width are specified, // then a thumbnail with highlighted differences is created too. -cairo_surface_t *diff_images(cairo_surface_t *s1, cairo_surface_t *s2, +cairo_surface_t *diff_images(int page, cairo_surface_t *s1, cairo_surface_t *s2, int offset_x = 0, int offset_y = 0, wxImage *thumbnail = NULL, int thumbnail_width = -1) { assert( s1 || s2 ); + long pixel_diff_count = 0; wxRect r1, r2; if ( s1 ) @@ -205,6 +215,7 @@ || cb1 > (cb2+g_channel_tolerance) || cb1 < (cb2-g_channel_tolerance) ) { + pixel_diff_count++; changes = true; linediff = true; @@ -313,7 +324,11 @@ } } - if ( changes ) + if ( g_verbose ) + printf("page %d has %ld pixels that differ\n", page, pixel_diff_count); + + // If we specified a tolerance, then return if we have exceeded that for this page + if ( g_per_page_pixel_tolerance == 0 ? changes : pixel_diff_count > g_per_page_pixel_tolerance) { return diff; } @@ -329,14 +344,14 @@ // differences or unmodified page, if there are no diffs) is drawn to it. // If thumbnail and thumbnail_width are specified, then a thumbnail with // highlighted differences is created too. -bool page_compare(cairo_t *cr_out, +bool page_compare(int page, cairo_t *cr_out, PopplerPage *page1, PopplerPage *page2, wxImage *thumbnail = NULL, int thumbnail_width = -1) { cairo_surface_t *img1 = page1 ? render_page(page1) : NULL; cairo_surface_t *img2 = page2 ? render_page(page2) : NULL; - cairo_surface_t *diff = diff_images(img1, img2, 0, 0, + cairo_surface_t *diff = diff_images(page, img1, img2, 0, 0, thumbnail, thumbnail_width); const bool has_diff = (diff != NULL); @@ -449,7 +464,7 @@ if ( gutter ) { wxImage thumbnail; - page_same = page_compare(cr_out, page1, page2, + page_same = page_compare(page, cr_out, page1, page2, &thumbnail, Gutter::WIDTH); wxString label1("(null)"); @@ -481,7 +496,7 @@ } else { - page_same = page_compare(cr_out, page1, page2); + page_same = page_compare(page, cr_out, page1, page2); } if ( differences ) @@ -530,6 +545,9 @@ const int ID_OFFSET_UP = wxNewId(); const int ID_OFFSET_DOWN = wxNewId(); const int ID_GUTTER = wxNewId(); +const int ID_LEFT_DOC = wxNewId(); +const int ID_RIGHT_DOC = wxNewId(); +const int ID_DIFF_DOC = wxNewId(); #define BMP_ARTPROV(id) wxArtProvider::GetBitmap(id, wxART_TOOLBAR) @@ -541,6 +559,10 @@ #define BMP_OFFSET_UP BMP_ARTPROV(wxART_GO_UP) #define BMP_OFFSET_DOWN BMP_ARTPROV(wxART_GO_DOWN) +#define BMP_LEFT_DOC BMP_ARTPROV(wxART_GO_BACK) +#define BMP_RIGHT_DOC BMP_ARTPROV(wxART_GO_FORWARD) +#define BMP_DIFF_DOC BMP_ARTPROV(wxART_REDO) + #ifdef __WXGTK__ #define BMP_ZOOM_IN BMP_ARTPROV("gtk-zoom-in") #define BMP_ZOOM_OUT BMP_ARTPROV("gtk-zoom-out") @@ -590,11 +612,17 @@ "Offset one of the pages up (Ctrl up)"); toolbar->AddTool(ID_OFFSET_DOWN, "", BMP_OFFSET_DOWN, "Offset one of the pages down (Ctrl down)"); + toolbar->AddTool(ID_LEFT_DOC, "Left document", BMP_LEFT_DOC, + "Show left document (Ctrl+<)"); + toolbar->AddTool(ID_DIFF_DOC, "Diff document", BMP_DIFF_DOC, + "Show diff document (Ctrl+d)"); + toolbar->AddTool(ID_RIGHT_DOC, "Right document", BMP_RIGHT_DOC, + "Show right document (Ctrl+>)"); toolbar->Realize(); SetToolBar(toolbar); - wxAcceleratorEntry accels[8]; + wxAcceleratorEntry accels[11]; accels[0].Set(wxACCEL_NORMAL, WXK_PAGEUP, ID_PREV_PAGE); accels[1].Set(wxACCEL_NORMAL, WXK_PAGEDOWN, ID_NEXT_PAGE); accels[2].Set(wxACCEL_CTRL, (int)'=', ID_ZOOM_IN); @@ -603,8 +631,11 @@ accels[5].Set(wxACCEL_CTRL, WXK_RIGHT, ID_OFFSET_RIGHT); accels[6].Set(wxACCEL_CTRL, WXK_UP, ID_OFFSET_UP); accels[7].Set(wxACCEL_CTRL, WXK_DOWN, ID_OFFSET_DOWN); + accels[8].Set(wxACCEL_CTRL, (int)',', ID_LEFT_DOC); + accels[9].Set(wxACCEL_CTRL, (int)'.', ID_RIGHT_DOC); + accels[10].Set(wxACCEL_CTRL, (int)'d', ID_DIFF_DOC); - wxAcceleratorTable accel_table(8, accels); + wxAcceleratorTable accel_table(11, accels); SetAcceleratorTable(accel_table); m_gutter = new Gutter(this, ID_GUTTER); @@ -683,12 +714,38 @@ wxImage thumbnail; cairo_surface_t *diff = diff_images ( + m_cur_page, img1, img2, m_offset.x, m_offset.y, &thumbnail, Gutter::WIDTH ); + // Render page according to the current display mode + switch ( m_display_mode ) + { + case SHOW_LEFT_DOCUMENT: + // Try showing the left document; if not available, fall back + if ( img1 ) + m_viewer->Set(img1); + else if ( img2 ) + m_viewer->Set(img2); + else + m_viewer->Set(NULL); + break; - m_viewer->Set(diff ? diff : img1); + case SHOW_RIGHT_DOCUMENT: + // Try showing the right document; if not available, fall back + if ( img2 ) + m_viewer->Set(img2); + else if ( img1 ) + m_viewer->Set(img1); + else + m_viewer->Set(NULL); + break; + + case SHOW_DIFF_DOCUMENT: + default: + m_viewer->Set(diff ? diff : img1); + } // Always update the diff map. It will be all-white if there were // no differences. @@ -780,6 +837,30 @@ DoUpdatePage(); } + void ResetOffset() + { + m_offset = wxPoint(0, 0); + DoUpdatePage(); + } + + void OnShowLeftDocument(wxCommandEvent&) + { + m_display_mode = SHOW_LEFT_DOCUMENT; + DoUpdatePage(); + } + + void OnShowDiffDocument(wxCommandEvent&) + { + m_display_mode = SHOW_DIFF_DOCUMENT; + DoUpdatePage(); + } + + void OnShowRightDocument(wxCommandEvent&) + { + m_display_mode = SHOW_RIGHT_DOCUMENT; + DoUpdatePage(); + } + void OnOffsetLeft(wxCommandEvent&) { DoOffset(-1, 0); } void OnOffsetRight(wxCommandEvent&) { DoOffset(1, 0); } void OnOffsetUp(wxCommandEvent&) { DoOffset(0, -1); } @@ -795,6 +876,7 @@ int m_diff_count; int m_cur_page; wxPoint m_offset; + DisplayMode m_display_mode; }; BEGIN_EVENT_TABLE(DiffFrame, wxFrame) @@ -809,6 +891,9 @@ EVT_TOOL (ID_OFFSET_RIGHT, DiffFrame::OnOffsetRight) EVT_TOOL (ID_OFFSET_UP, DiffFrame::OnOffsetUp) EVT_TOOL (ID_OFFSET_DOWN, DiffFrame::OnOffsetDown) + EVT_TOOL (ID_LEFT_DOC, DiffFrame::OnShowLeftDocument) + EVT_TOOL (ID_DIFF_DOC, DiffFrame::OnShowDiffDocument) + EVT_TOOL (ID_RIGHT_DOC, DiffFrame::OnShowRightDocument) END_EVENT_TABLE() @@ -903,6 +988,10 @@ wxCMD_LINE_VAL_NUMBER }, { wxCMD_LINE_OPTION, + NULL, "per-page-pixel-tolerance", "total number of pixels allowed to be different per page before specifying the page is different", + wxCMD_LINE_VAL_NUMBER }, + + { wxCMD_LINE_OPTION, NULL, "dpi", "rasterization resolution (default: " wxSTRINGIZE(DEFAULT_RESOLUTION) " dpi)", wxCMD_LINE_VAL_NUMBER }, @@ -919,9 +1008,6 @@ wxCmdLineParser parser(cmd_line_desc, argc, argv); - // Set default output to stderr - wxMessageOutput::Set(new wxMessageOutputStderr); - switch ( parser.Parse() ) { case -1: // --help @@ -971,6 +1057,14 @@ return 3; } + if ( parser.Found("per-page-pixel-tolerance", &g_per_page_pixel_tolerance) ) + { + if (g_per_page_pixel_tolerance < 0) { + fprintf(stderr, "Invalid per-page-pixel-tolerance: %ld. Must be 0 or more\n", g_per_page_pixel_tolerance); + return 2; + } + } + if ( parser.Found("channel-tolerance", &g_channel_tolerance) ) { if (g_channel_tolerance < 0 || g_channel_tolerance > 255) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/diff-pdf-0.5/win32/collect-dlls.sh new/diff-pdf-0.5.3/win32/collect-dlls.sh --- old/diff-pdf-0.5/win32/collect-dlls.sh 2021-02-26 18:51:58.000000000 +0100 +++ new/diff-pdf-0.5.3/win32/collect-dlls.sh 2026-03-28 13:40:25.000000000 +0100 @@ -11,19 +11,30 @@ mkdir -p $OUTPUT rm -rf $OUTPUT/* -cp -a $EXE $OUTPUT +add_binary() +{ + destfile="$OUTPUT/`basename $1`" + if [ ! -f $destfile ] ; then + cp -anv $1 $destfile + objdump -x $1 | grep "DLL Name" | cut -d: -f2 >${destfile}.objdeps + fi +} + last_file_count=0 +add_binary $EXE while true ; do - file_count=`ls -1 $OUTPUT/* | wc -l` + file_count=`ls -1 $OUTPUT/*.objdeps | wc -l` echo "count=$file_count" if [ $file_count -eq $last_file_count ] ; then break ; fi last_file_count=$file_count - objdump -x $OUTPUT/* | grep "DLL Name" | cut -d: -f2 | sort | uniq | while read i ; do + cat $OUTPUT/*.objdeps | sort | uniq | while read i ; do dll=`echo $i` # fixup weird line endings - if [[ -f /mingw32/bin/$dll ]] ; then - cp -anv /mingw32/bin/$dll $OUTPUT + if [[ -f /ucrt64/bin/$dll ]] ; then + add_binary /ucrt64/bin/$dll fi done done + +rm -rf $OUTPUT/*.objdeps ++++++ diff-pdf.obsinfo ++++++ --- /var/tmp/diff_new_pack.xNw4tO/_old 2026-07-26 11:32:54.351873431 +0200 +++ /var/tmp/diff_new_pack.xNw4tO/_new 2026-07-26 11:32:54.351873431 +0200 @@ -1,6 +1,5 @@ name: diff-pdf -version: 0.5 -mtime: 1614361918 -commit: 201dab3d230c0d9513d9330bd10030d590894056 - +version: 0.5.3 +mtime: 1774701625 +commit: 8e22eaf8140cb7536f4f8e01efd37411b146aa03
