Source: libimage-imlib2-perl
Version: 2.03-1.1
Severity: grave
Tags: bookworm trixie sid
Justification: renders package unusable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

While looking at Niko's and Dom's first rebuilds for perl 5.38, I
noticed that libimage-imlib2-perl "successfully" builds but creates
a basically empty package:

http://perl.debian.net/rebuild-logs/perl-5.38/libimage-imlib2-perl_2.03-1.1/libimage-imlib2-perl_2.03-1.1.buildlog

     dh_auto_configure -a
  dh_auto_configure: warning: Compatibility levels before 10 are deprecated 
(level 8 in use)
      /usr/bin/perl -I. Build.PL --installdirs vendor
  You must install the imlib2 library before you can install
  Image::Imlib2. You can obtain imlib2 from
  http://sourceforge.net/projects/enlightenment/

  Alternatively, if you have downloaded and installed imlib2 and this
  still will not work, modify the $CONFIG variable inside Build.PL to
  point to the imlib2-config program that provides.
  …
  drwxr-xr-x root/root         0 2023-06-28 20:39 ./
  drwxr-xr-x root/root         0 2023-06-28 20:39 ./usr/
  drwxr-xr-x root/root         0 2023-06-28 20:39 ./usr/share/
  drwxr-xr-x root/root         0 2023-06-28 20:39 ./usr/share/doc/
  drwxr-xr-x root/root         0 2023-06-28 20:39 
./usr/share/doc/libimage-imlib2-perl/
  -rw-r--r-- root/root       440 2011-10-16 00:34 
./usr/share/doc/libimage-imlib2-perl/NEWS.Debian.gz
  -rw-r--r-- root/root       215 2023-06-28 20:39 
./usr/share/doc/libimage-imlib2-perl/changelog.Debian.amd64.gz
  -rw-r--r-- root/root       439 2023-06-28 20:39 
./usr/share/doc/libimage-imlib2-perl/changelog.Debian.gz
  -rw-r--r-- root/root      1967 2009-11-24 21:41 
./usr/share/doc/libimage-imlib2-perl/changelog.gz
  -rw-r--r-- root/root       561 2006-02-04 00:17 
./usr/share/doc/libimage-imlib2-perl/copyright
  drwxr-xr-x root/root         0 2023-06-28 20:39 
./usr/share/doc/libimage-imlib2-perl/examples/
  -rw-r--r-- root/root       860 2023-06-28 20:39 
./usr/share/doc/libimage-imlib2-perl/examples/benchmark.pl
  -rw-r--r-- root/root       639 2023-06-28 20:39 
./usr/share/doc/libimage-imlib2-perl/examples/benchmark.txt
  -rw-r--r-- root/root      1122 2023-06-28 20:39 
./usr/share/doc/libimage-imlib2-perl/examples/maeda.pl



I tried locally, and the same happens in a sid chroot, a trixie
chroot, and also a bookworm chroot. bullseye aka oldstable is the
first distribution, where the expected files can be found (and the
above-quoted warning is not present).


The warning ("You must install the imlib2 library …") comes from
Build.PL:

     4  # We need to find imlib2-config
     5  my $CONFIG = "imlib2-config";
     6  
     7  my $version = `$CONFIG --version`;
     8  if (!$version) {
     9    warn 'You must install the imlib2 library before you can install
    10  Image::Imlib2. You can obtain imlib2 from
    11  http://sourceforge.net/projects/enlightenment/
    12  
    13  Alternatively, if you have downloaded and installed imlib2 and this
    14  still will not work, modify the $CONFIG variable inside Build.PL to
    15  point to the imlib2-config program that provides.
    16  ';
    17    exit 0;
    18  } else {
    19    print "Found imlib2 $version";
    20  }
    21  

(The `exit 0' in line 17 is typical because of CPAN testers, and
should be `exit 1' or something in Debian …)


But besides, it looks like `imlib2-config' went missing from libimlib2-dev
somewhere between 1.7.1-2 (oldstable) and 1.10.0-4+b1 (stable).


I've started to work on patch which uses pkg-config instead of
imlib2-config; good news: The package builds (as in: actually builds
code :)) in oldstable+stable+testing+sid and the
perl-5.38-rebuild-repo; but the tests only pass in oldstable,
starting with stable/bookworm (aka libimlib2-dev >= 1.10) they fail
with:


  t/simple.t .. 
  1..21
  ok 1 - use Image::Imlib2;
  ok 2
  ok 3
  ok 4
  ok 5
  ok 6
  ok 7
  ok 8
  ok 9
  ok 10
  ok 11
  not ok 12

  #   Failed test at t/simple.t line 68.
  #          got: '0'
  #     expected: '1'
  ok 13
  ok 14
  ok 15
  ok 16
  ok 17
  ok 18
  ok 19
  ok 20
  ok 21 - got to the end
  # Looks like you failed 1 test of 21.
  Dubious, test returned 1 (wstat 256, 0x100)
  Failed 1/21 subtests 


So there's some more work to do :/

I'm attaching a partial debdiff anyway …


Cheers,
gregor

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAmSi8KlfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx
RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ
qgaKeBAAjbizjqcg8ECQMtStEQKF5E4TW8cebyT/eBe5cDjAojbICo9329YMpR3/
W0mRoMzDN5hHU4QuXCtDfcV67KQdjC+GYWw5O9yuJ4/LePcpqthVyeu07MZQ+FyN
KlJt6KSqbWKswDi5pImCgOVlisED1qC3vKsqeOSuczkVGFIY6z/TAsc581x9z33I
8CKJEPkrykrixL1xd+yuK1XM26LNJmSa52yLSgljMrex9b2U8PUeRS4e44s3i1M4
3Z0gEsxkj+J1cvIvIY70AqQSvM6gK+66v2RWKpi5LFa2kacP/+zP99PJvds7AO/9
rqRkWpY71Fub+0jQHm+Op60riCgor4wuoTtQqUyjzWuCVPPxDMsKBdxT8PuT9Um/
+FsspfEpOltC3ESmdzIWL138E739S/Du1eQ5OF1+/NjBYXAZnvgYt/1cYwJ67ahL
DDUCJ5O5+fVbCu6iMZKVWBZLA7BISNv0N7V+k+l4d2AAoQ05Fe5bJxdPcPVqc33l
8zkoaejXzoT57T8EkQKotc/+w7IhvS1M8wHsPnJ3io898whJ/rjVJivT0KcyxEu9
SYCRSwIt5rTYZ0PIRlahtX35mlSGWL3pVaFcohhkKtx0JvtuGyK4Ihijso79l9UO
SapNqxVACXMVtVXZzdeuB/vqk7R3R+1sUASDV1m5sQf94GquVn0=
=DEF6
-----END PGP SIGNATURE-----
diff -Nru libimage-imlib2-perl-2.03/debian/control 
libimage-imlib2-perl-2.03/debian/control
--- libimage-imlib2-perl-2.03/debian/control    2011-10-16 02:28:18.000000000 
+0200
+++ libimage-imlib2-perl-2.03/debian/control    2023-07-03 17:48:25.000000000 
+0200
@@ -3,7 +3,7 @@
 Priority: extra
 Section: perl
 Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 8), libmodule-build-perl, libimlib2-dev, 
libtest-simple-perl, quilt
+Build-Depends: debhelper (>= 8), libmodule-build-perl, libimlib2-dev, 
libtest-simple-perl, quilt, libextutils-pkgconfig-perl
 
 Package: libimage-imlib2-perl
 Architecture: any
diff -Nru libimage-imlib2-perl-2.03/debian/patches/pkg-config.diff 
libimage-imlib2-perl-2.03/debian/patches/pkg-config.diff
--- libimage-imlib2-perl-2.03/debian/patches/pkg-config.diff    1970-01-01 
01:00:00.000000000 +0100
+++ libimage-imlib2-perl-2.03/debian/patches/pkg-config.diff    2023-07-03 
17:50:55.000000000 +0200
@@ -0,0 +1,37 @@
+--- a/Build.PL
++++ b/Build.PL
+@@ -1,11 +1,14 @@
+ use Module::Build;
+ use strict;
+ use Cwd;
++use ExtUtils::PkgConfig ;
+ 
+-# We need to find imlib2-config
+-my $CONFIG = "imlib2-config";
++my $pkg = 'imlib2';
++my %info = ExtUtils::PkgConfig->find ($pkg) ;
++my $version = $info{modversion} ;
++my $libs    = $info{libs} ;
++my $cflags  = $info{cflags} ;
+ 
+-my $version = `$CONFIG --version`;
+ if (!$version) {
+   warn 'You must install the imlib2 library before you can install
+ Image::Imlib2. You can obtain imlib2 from
+@@ -15,13 +18,12 @@
+ still will not work, modify the $CONFIG variable inside Build.PL to
+ point to the imlib2-config program that provides.
+ ';
+-  exit 0;
++  exit 1;
+ } else {
+-  print "Found imlib2 $version";
++  print "Found imlib2 $version\n";
+ }
+ 
+-my $libs = `$CONFIG --libs`;
+-my $cflags = "-DX_DISPLAY_MISSING " . `$CONFIG --cflags` . 
"-ffile-prefix-map=" . getcwd() . "=." ;
++$cflags = "-DX_DISPLAY_MISSING " . $cflags . "-ffile-prefix-map=" . getcwd() 
. "=." ;
+ 
+ my $build = Module::Build->new(
+   c_source     => './lib/Image',
diff -Nru libimage-imlib2-perl-2.03/debian/patches/series 
libimage-imlib2-perl-2.03/debian/patches/series
--- libimage-imlib2-perl-2.03/debian/patches/series     2022-10-06 
18:56:50.000000000 +0200
+++ libimage-imlib2-perl-2.03/debian/patches/series     2023-07-03 
17:43:59.000000000 +0200
@@ -1,2 +1,3 @@
 add_more_error_reporting.diff
 reproducible_build.diff
+pkg-config.diff

Reply via email to