Bug 241225 - graphics/sane-backends: Update to 1.0.28
Summary: graphics/sane-backends: Update to 1.0.28
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL: https://gitlab.com/sane-project/backe...
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-10-13 13:34 UTC by mq
Modified: 2019-11-16 14:54 UTC (History)
0 users

See Also:


Attachments
patch for sane-backends (38.72 KB, patch)
2019-10-13 13:34 UTC, mq
no flags Details | Diff
2nd iteration of patching graphics/sane-backends to version 1.0.28 (37.61 KB, patch)
2019-11-06 18:55 UTC, mq
no flags Details | Diff
3rd iteration for patching sane-backends 1.0.28 for FreeBSD. (25.62 KB, patch)
2019-11-15 22:44 UTC, mq
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mq 2019-10-13 13:34:34 UTC
Created attachment 208278 [details]
patch for sane-backends

Dear developers,


you find a patch to upgrade graphics/sane-backend to the current version 1.0.28 in the attachment.

Pay attention to the following changes in this port:
 
 -  I removed the options for IEEE1284 because it requires an i386 computer that I don't have.

 - The sane-backends kvs40xx and mustek_usb2 are skipped during build because of pthread library issue but it is investigated: https://gitlab.com/sane-project/backends/issues/153

The sane-backend port of 1.0.28 is useful because it supports some modern scanners like CanoScan LiDE 400.

Is this patch sufficient to get integrated into SVN or is something missing?


Kind regards,
Martin
Comment 1 Tobias Kortkamp freebsd_committer 2019-10-13 14:22:21 UTC
 LIB_DEPENDS=	libpng.so:graphics/png \
-		libtiff.so:graphics/tiff
+		libtiff.so:graphics/tiff \
+		libpkg.so:ports-mgmt/pkg

This cannot be right.  Why does sane-backends link with libpkg now?

-@sample etc/sane.d/dist/abaton.conf etc/sane.d/abaton.conf
+etc/sane.d/abaton.conf

These changes will cause people's configuration files to be overwritten
on the next update.  Please restore the previous behavior.

Please restore files/patch-tools_sane-desc.c since it reverts ports r464242
for no reason.

> I removed the options for IEEE1284 because it requires an i386 computer that I don't have.

Is there a reason to remove the option beyond that?  Because others
might still use it.

> The sane-backends kvs40xx and mustek_usb2 are skipped during build because of pthread library issue but it is investigated: https://gitlab.com/sane-project/backends/issues/153

But they still appear in the plist?
Comment 2 mq 2019-10-13 18:34:48 UTC
(In reply to Tobias Kortkamp from comment #1)

I added libpkg to LIB_DEPENDS in order to fix the following error during make:

Error: /usr/local/lib/sane/libsane-magicolor.so.1.0.28 is linked to /usr/local/lib/libpkg.so.4 from ports-mgmt/pkg but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libpkg.so:ports-mgmt/pkg

What do you recommend in this case?  Can I ignore it?

Concerning your other remarks:

 - @sample configuration files:  I will fix pkg-plist.

 - files/patch-tools_sane-desc.c:  I will restore it.

 - IEEE1284 option:  I can restore it but I cannot test it.

 - The sane-backends kvs40xx and mustek_usb2:  They appear in pkg-plist because I patched the configure script.  Yes,  they are pkg-plist.  Mea culpa!

I will come back when the patch is done.
Comment 3 Tobias Kortkamp freebsd_committer 2019-10-13 19:28:54 UTC
(In reply to mq from comment #2)
> What do you recommend in this case?  Can I ignore it?

It would be better to dig deep and find out what causes it.  It
seems to be a local issue that I cannot reproduce in Poudriere.  It
might only affect users who build ports in dirty environments

A good starting point would be to examine the build log for occurrences
of libpkg, -lpkg or similar.
Comment 4 mq 2019-10-20 10:55:30 UTC
(In reply to Tobias Kortkamp from comment #3)

The pkg dependency comes from net-snmp:

$ net-snmp-config --libs
-L/usr/lib -lm -lkvm -ldevstat -L/lib -L/usr/local/lib -L/usr/local/lib -lnetsnmp -lcrypto -lelf -lpkg -lssp_nonshared -lregex

I have installed it as a package from quarterly branch.

The libpkg dependency is already topic in another ticket:
net-mgmt/net-snmp [PATCH] Optionalize libpkg support to better support libressl
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206304

As a next step,  I will setup poudriere to check the build there.
Comment 5 mq 2019-11-06 18:55:36 UTC
Created attachment 208921 [details]
2nd iteration of patching graphics/sane-backends to version 1.0.28
Comment 6 mq 2019-11-06 19:01:17 UTC
Dear Tobias,


you find the second iteration of the sane-backends patch in the attachment.
A run of "poudriere testport" went fine except messages like

 Deleting files for sane-backends-1.0.28...
sane-backends-1.0.28: missing file /usr/local/etc/sane.d/pixma.conf

Probably,  these messages are due to @sample.

Let me know if there is still something missing for the patch to meet FreeBSD port standards!


Kind regards,
Martin
Comment 7 Tobias Kortkamp freebsd_committer 2019-11-06 19:57:02 UTC
(In reply to mq from comment #6)
> A run of "poudriere testport" went fine except messages like
>  Deleting files for sane-backends-1.0.28...
> sane-backends-1.0.28: missing file /usr/local/etc/sane.d/pixma.conf

This is not what I'd consider "fine". ;-)

Look closely at the diff. These lines in pkg-plist

@sample etc/sane.d/hp3900.conf etc/sane.d/hp3900.conf

are not like before and bogus.  They should be like

@sample etc/sane.d/dist/hp3900.conf etc/sane.d/hp3900.conf

It is no wonder that they are flagged.  Please fix this.  You probably
also need to restore patch-backend__Makefile.in.

Also look at /usr/ports/Keywords/sample.ucl to understand how @sample
works and how something like "@sample foo foo" does not make sense.
Comment 8 mq 2019-11-15 22:44:29 UTC
Created attachment 209173 [details]
3rd iteration for patching sane-backends 1.0.28 for FreeBSD.
Comment 9 mq 2019-11-15 22:49:45 UTC
(In reply to Tobias Kortkamp from comment #7)

Dear Tobias,

you find the 3rd iteration for patching sane-backends 1.0.28 for FreeBSD.
In particular,  I have respected your advice for @sample and have restored patch-backend__Makefile.in.  A run of `poudriere testport -o graphics/sane-backends ...` succeeded.  Let me know if we need another iteration.

I am so interested in sane-backends 1.0.28 because since that version the Canon scanners Canoscan LiDE 300 and 400 are supported.  These scanners are Canon's mainstream scanners that you find in many computer shops.


Kind regards,
Martin
Comment 10 Tobias Kortkamp freebsd_committer 2019-11-16 06:06:32 UTC
LGTM. Committed, thanks!
Comment 11 commit-hook freebsd_committer 2019-11-16 06:06:44 UTC
A commit references this bug:

Author: tobik
Date: Sat Nov 16 06:05:56 UTC 2019
New revision: 517720
URL: https://svnweb.freebsd.org/changeset/ports/517720

Log:
  graphics/sane-backends: Update to 1.0.28

  This adds support for some modern scanners like the CanoScan LiDE 400.

  - Take maintainership for a while

  Changes:	https://gitlab.com/sane-project/backends/-/tags/1.0.28
  PR:		241225
  Submitted by:	mq <freebsd@sosend.de>

Changes:
  head/graphics/sane-backends/Makefile
  head/graphics/sane-backends/distinfo
  head/graphics/sane-backends/files/patch-backend__epson2-ops.c
  head/graphics/sane-backends/files/patch-backend__epsonds.c
  head/graphics/sane-backends/files/patch-backend__kvs40xx_opt.c
  head/graphics/sane-backends/files/patch-backend_epsonds.c
  head/graphics/sane-backends/files/patch-backend_ricoh2__buffer.c
  head/graphics/sane-backends/files/patch-backend_umax__pp__low.c
  head/graphics/sane-backends/files/patch-include__sane__sane.h
  head/graphics/sane-backends/files/patch-include__sane__sanei_backend.h
  head/graphics/sane-backends/pkg-plist
Comment 12 mq 2019-11-16 13:54:04 UTC
(In reply to Tobias Kortkamp from comment #10)


Thank you for your patience!
Comment 13 commit-hook freebsd_committer 2019-11-16 14:54:19 UTC
A commit references this bug:

Author: tobik
Date: Sat Nov 16 14:53:25 UTC 2019
New revision: 517748
URL: https://svnweb.freebsd.org/changeset/ports/517748

Log:
  graphics/sane-frontends: Unbreak after r517720

  gtkglue.c:1479:24: error: use of undeclared identifier 'SANE_CAP_ALWAYS_SETTABLE'
        if (!(opt->cap & SANE_CAP_ALWAYS_SETTABLE))
                         ^
  1 error generated.

  PR:		241225
  Reported by:	cmt
  Obtained from:	Fedora
  Pointy hat:	tobik

Changes:
  head/graphics/sane-frontends/files/patch-src_gtkglue.c