Package: libcurses-perl
Version: 1.12-1wide1
Severity: wishlist
Tags: patch

I'd like to be able to use curses from perl with wide-characters.

The attached patch builds an alternative version "libcursesw-perl"
that links to the wide libraries. It could be done cleaner by building
each version in a separate build-directory, but I don't know how to do
that with perl extensions. Therefore I punted and built both
alternatives from the install target.

Another option is to *always* link libcurses-perl with the wide
libraries, offering no "narrow" alternative. AFAICS libncursesw is
fully compatible with libncurses, so that should not be a problem, but
I don't know for sure. That would make the patch much cleaner.

Perhaps the two-alternatives option could be used for now, and the
wide-only option in the future.

The patch also includes an important dh_shlibdeps call, without which
the packages lack "Depends: libncurses5" (this should probably be in a
separate bug).
diff -ruN libcurses-perl-1.13/debian/changelog 
libcurses-perl-1.13+/debian/changelog
--- libcurses-perl-1.13/debian/changelog        2006-01-06 19:18:10.000000000 
+0100
+++ libcurses-perl-1.13+/debian/changelog       2006-01-07 11:25:52.000000000 
+0100
@@ -1,3 +1,16 @@
+libcurses-perl (1.13-1rb1) unstable; urgency=low
+
+  * Build versions based on wide-character and normal ("narrow") ncurses:
+    + Build-depend on libcursesw5-dev as well.
+    + The build target now does nothing.
+    + Split off three sub-targets from the install target: "install-pre",
+      and one for each library version to be built and installed.
+    + Put the examples in both packages.
+  * dh_installdirs call was superflous.
+  * Add missing dh_shlibdeps call.
+
+ -- Robert Bihlmeyer <[EMAIL PROTECTED]>  Sat,  7 Jan 2006 11:25:52 +0100
+
 libcurses-perl (1.13-1) unstable; urgency=low
 
   * New upstream release (Closes: #338211)
diff -ruN libcurses-perl-1.13/debian/control libcurses-perl-1.13+/debian/control
--- libcurses-perl-1.13/debian/control  2006-01-06 19:18:10.000000000 +0100
+++ libcurses-perl-1.13+/debian/control 2006-01-06 19:20:15.000000000 +0100
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Jay Bonci <[EMAIL PROTECTED]>
 Standards-Version: 3.6.2.1
-Build-Depends: perl (>= 5.8), libncurses5-dev, debhelper (>= 4.0)
+Build-Depends: perl (>= 5.8), libncurses5-dev, libncursesw5-dev, debhelper (>= 
4.0)
 
 Package: libcurses-perl
 Architecture: any
@@ -19,3 +19,16 @@
  This package was previously called perl-curses.  To comply with informal
  Debian standards, it has been renamed to libcurses-perl.
 
+Package: libcursesw-perl
+Architecture: any
+Depends: ${perl:Depends}, ${shlibs:Depends}
+Provides: perl-curses, libcurses-perl
+Replaces: perl-curses
+Conflicts: perl-curses, libcurses-perl
+Description: Curses interface for Perl
+ libcurses-perl (the Curses module from CPAN) will let you
+ use the ncurses/curses terminal screen manipulation
+ routines from Perl programs.
+ .
+ This version of the package is based on the wide-character (unicode) version
+ of ncurses.
diff -ruN libcurses-perl-1.13/debian/dirs libcurses-perl-1.13+/debian/dirs
--- libcurses-perl-1.13/debian/dirs     2006-01-06 19:18:10.000000000 +0100
+++ libcurses-perl-1.13+/debian/dirs    1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-usr/bin
-usr/sbin
-usr/lib/perl5
-usr/share/doc/libcurses-perl
-usr/share/man/man1
-usr/share/man/man3
diff -ruN libcurses-perl-1.13/debian/libcursesw-perl.examples 
libcurses-perl-1.13+/debian/libcursesw-perl.examples
--- libcurses-perl-1.13/debian/libcursesw-perl.examples 1970-01-01 
01:00:00.000000000 +0100
+++ libcurses-perl-1.13+/debian/libcursesw-perl.examples        2006-01-06 
18:45:23.000000000 +0100
@@ -0,0 +1 @@
+demo*
diff -ruN libcurses-perl-1.13/debian/rules libcurses-perl-1.13+/debian/rules
--- libcurses-perl-1.13/debian/rules    2006-01-06 19:18:10.000000000 +0100
+++ libcurses-perl-1.13+/debian/rules   2006-01-07 11:20:59.000000000 +0100
@@ -10,27 +10,38 @@
 
 #PACKAGE=`pwd | sed -e "s/.*\/\\(.*\\)-.*/\\1/"`
 PACKAGE='libcurses-perl'
+PACKAGEW='libcursesw-perl'
 
 build:
-       dh_testdir
-       # Add here commands to compile the package.
-       #perl Makefile.PL PANELS MENUS FORMS verbose INSTALLDIRS=vendor
-       perl Makefile.PL PANELS MENUS verbose INSTALLDIRS=vendor
+
 clean:
        dh_testdir
        dh_testroot
 
        -$(MAKE) clean
-       rm -f Makefile.old
+       rm -f Makefile.old stamp-install-narrow stamp-install-wide
        dh_clean
 
-install:
+install-pre:
        dh_testdir
        dh_testroot
-       dh_clean -k
-       dh_installdirs
 
+stamp-install-narrow:
+       -$(MAKE) clean
+       perl Makefile.PL PANELS MENUS verbose INSTALLDIRS=vendor
        $(MAKE) PREFIX=$(CURDIR)/debian/$(PACKAGE)/usr OPTIMIZE="-O2 -g -Wall" 
test install
+       touch $@
+
+stamp-install-wide:
+       -$(MAKE) clean
+       CURSES_CFLAGS=-I/usr/include/ncursesw CURSES_LDFLAGS=-lncursesw \
+               CURSES_PANEL_LDFLAGS=-lpanelw CURSES_MENU_LDFLAGS=-lmenuw \
+               CURSES_FORM_LDFLAGS=-lformw \
+                       perl Makefile.PL PANELS MENUS verbose INSTALLDIRS=vendor
+       $(MAKE) PREFIX=$(CURDIR)/debian/$(PACKAGEW)/usr OPTIMIZE="-O2 -g -Wall" 
test install
+       touch $@
+
+install: install-pre stamp-install-narrow stamp-install-wide
        -find $(CURDIR)/debian -type d | xargs rmdir -p 
--ignore-fail-on-non-empty
 
 binary-indep:;
@@ -47,9 +58,10 @@
        dh_fixperms
        dh_installdeb
        dh_perl
+       dh_shlibdeps
        dh_gencontrol
        dh_md5sums
        dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install install-pre

Reply via email to