Source: libhdate
Version: 1.6.02-1
Followup-For: Bug #684382

Here is an updated patch for php7.

-- System Information:
Debian Release: 9.12
  APT prefers oldstable
  APT policy: (990, 'oldstable')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 4.9.210 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE= 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Naur old/bindings/php/Makefile.am new/bindings/php/Makefile.am
--- old/bindings/php/Makefile.am        2020-06-21 16:01:58.000000000 -0400
+++ new/bindings/php/Makefile.am        2020-06-21 16:57:11.000000000 -0400
@@ -5,17 +5,17 @@
 
 DEPS= $(top_builddir)/src/libhdate.la
 
-CLEANFILES = *.o *.cpp *.h *.so *.php *wrap*
+CLEANFILES = *.o *.cpp *.cxx *.h *.so *.php *wrap*
 
 all-am: hdate.so
        
 
-hdate.so: hdate_wrap.cpp
-       g++ -I$(top_srcdir)/src `php-config --includes` -fpic -c hdate_wrap.cpp
+hdate.so: hdate_wrap.cxx
+       g++ -I$(top_srcdir)/src `php-config --includes` -fpic -c hdate_wrap.cxx
        gcc -shared hdate_wrap.o ../../src/.libs/libhdate.so -lstdc++ -o 
hdate.so
 
-hdate_wrap.cpp: hdate.i
-       swig -php5 -c++ hdate.i
+hdate_wrap.cxx: hdate.i
+       swig -php7 -c++ hdate.i
 
 install-data-local: hdate.so hdate.ini hdate.php
        $(mkinstalldirs) $(DESTDIR)$(PH_MODULES_PATH)
diff -Naur old/configure.in new/configure.in
--- old/configure.in    2020-06-21 16:01:58.000000000 -0400
+++ new/configure.in    2020-06-21 16:24:56.000000000 -0400
@@ -184,13 +184,13 @@
   [path to php site lib])])
 
 if test "$have_php" = "yes"; then
-         AC_CHECK_PROG(have_php_config, "php-config5", yes, no)
+         AC_CHECK_PROG(have_php_config, "php-config", yes, no)
          if test "$have_php_config" = "yes"; then
              
              PH_CONFIG_PATH=`php --ini |  grep "Scan" | cut -d: -f2 | sed 
's/\s//g'`
              PH_INCLUDE_PATH=`php -r "echo get_include_path();" | cut -f2 -d:`
                  if test "$with_php_sitelib_dir" = "" ; then
-                   PH_MODULES_PATH=`php-config5 --extension-dir`
+                   PH_MODULES_PATH=`php-config --extension-dir`
                  else
                    PH_MODULES_PATH=$with_php_sitelib_dir
                  fi
diff -Naur old/debian/control new/debian/control
--- old/debian/control  2017-01-24 12:08:21.000000000 -0500
+++ new/debian/control  2020-06-21 16:21:59.000000000 -0400
@@ -6,7 +6,7 @@
 Vcs-Svn: svn://anonscm.debian.org/debian-hebrew/pkg/libhdate/trunk
 Vcs-Browser: https://anonscm.debian.org/viewvc/debian-hebrew/pkg/libhdate/trunk
 Build-Depends: debhelper (>= 9),
- swig,
+ swig (>= 3.0.12-1),
  python-dev (>= 2.6.6-3~),
  dh-python,
  dh-autoreconf,
@@ -53,6 +53,19 @@
  .
  This package contains perl bindings to libhdate
 
+Package: libhdate-php
+Section: php
+Architecture: any
+Depends: libhdate1 (= ${binary:Version}), ${php:Depends}, ${shlibs:Depends}, 
${misc:Depends}
+Description: Provides a library that help use hebrew dates (php bindings)
+ LibHdate is a small C,C++ library for Hebrew dates,
+ holidays, and reading sequence (parasha). It is using 
+ the source code from Amos Shapir's "hdate" package fixed 
+ and patched by Nadav Har'El. The Torah reading sequence
+ is from tables by Zvi Har'El.
+ .
+ This package contains PHP bindings to libhdate
+
 Package: libhdate1
 Section: libs
 Architecture: any
diff -Naur old/debian/control.orig new/debian/control.orig
--- old/debian/control.orig     1969-12-31 19:00:00.000000000 -0500
+++ new/debian/control.orig     2017-01-24 12:08:21.000000000 -0500
@@ -0,0 +1,83 @@
+Source: libhdate
+Priority: optional
+Section: libdevel
+Maintainer: Debian Hebrew Packaging Team 
<debian-hebrew-pack...@lists.alioth.debian.org>
+Uploaders: Lior Kaplan <kap...@debian.org>, Shachar Shemesh 
<shac...@debian.org>, Tzafrir Cohen <tzaf...@debian.org>
+Vcs-Svn: svn://anonscm.debian.org/debian-hebrew/pkg/libhdate/trunk
+Vcs-Browser: https://anonscm.debian.org/viewvc/debian-hebrew/pkg/libhdate/trunk
+Build-Depends: debhelper (>= 9),
+ swig,
+ python-dev (>= 2.6.6-3~),
+ dh-python,
+ dh-autoreconf,
+Standards-Version: 3.9.8
+Homepage: http://libhdate.sourceforge.net/
+
+Package: libhdate-dev
+Architecture: any
+Depends: libhdate1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Provides a library that help use Hebrew dates (development files)
+ LibHdate is a small C,C++ library for Hebrew dates,
+ holidays, and reading sequence (parasha). It is using 
+ the source code from Amos Shapir's "hdate" package fixed and 
+ patched by Nadav Har'El. The Torah reading sequence
+ is from tables by Zvi Har'El.
+ .
+ This package contains headers and support files required
+ to build new applications with libhdate.
+
+Package: python-hdate
+Section: python
+Architecture: any
+Provides: ${python:Provides}
+Depends: libhdate1 (= ${binary:Version}), ${python:Depends}, 
${shlibs:Depends}, ${misc:Depends}
+Description: Provides a library that help use Hebrew dates (Python bindings)
+ LibHdate is a small C,C++ library for Hebrew dates,
+ holidays, and reading sequence (parasha). It is using 
+ the source code from Amos Shapir's "hdate" package fixed and 
+ patched by Nadav Har'El. The Torah reading sequence
+ is from tables by Zvi Har'El.
+ .
+ This package contains Python bindings to libhdate
+
+Package: libhdate-perl
+Section: perl
+Architecture: any
+Depends: libhdate1 (= ${binary:Version}), ${perl:Depends}, ${shlibs:Depends}, 
${misc:Depends}
+Description: Provides a library that help use Hebrew dates (perl bindings)
+ LibHdate is a small C,C++ library for Hebrew dates,
+ holidays, and reading sequence (parasha). It is using 
+ the source code from Amos Shapir's "hdate" package fixed 
+ and patched by Nadav Har'El. The Torah reading sequence
+ is from tables by Zvi Har'El.
+ .
+ This package contains perl bindings to libhdate
+
+Package: libhdate1
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Conflicts: libhdate0
+Replaces: libhdate0
+Description: Provides a library that help use Hebrew dates
+ LibHdate is a small C,C++ library for Hebrew dates,
+ holidays, and reading sequence (parasha). It is using 
+ the source code from Amos Shapir's "hdate" package fixed 
+ and patched by Nadav Har'El. The Torah reading sequence
+ is from tables by Zvi Har'El.
+
+Package: hdate
+Section: utils
+Architecture: any
+Depends: libhdate1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Replaces: libhdate0 (<< 1.6-1ubuntu1)
+Description: Provides the hcal and hdate binaries that help use Hebrew dates
+ LibHdate is a small C,C++ library for Hebrew dates,
+ holidays, and reading sequence (parasha). It is using 
+ the source code from Amos Shapir's "hdate" package fixed 
+ and patched by Nadav Har'El. The Torah reading sequence
+ is from tables by Zvi Har'El.
+ .
+ This package provides the hdate command-line utility.
diff -Naur old/debian/libhdate-php.dirs new/debian/libhdate-php.dirs
--- old/debian/libhdate-php.dirs        2013-08-16 09:23:02.000000000 -0400
+++ new/debian/libhdate-php.dirs        2020-06-21 16:36:02.000000000 -0400
@@ -1 +1 @@
-etc/php5/conf.d
+etc/php/7.0/mods-available
diff -Naur old/debian/libhdate-php.install new/debian/libhdate-php.install
--- old/debian/libhdate-php.install     2013-08-16 09:23:02.000000000 -0400
+++ new/debian/libhdate-php.install     2020-06-21 16:38:07.000000000 -0400
@@ -1,2 +1,3 @@
-bindings/php/hdate.ini etc/php5/conf.d
-usr/lib/php5/*
+bindings/php/hdate.ini etc/php/7.0/mods-available
+usr/lib/php/*
+usr/share/php/hdate.php
diff -Naur old/debian/libhdate-php.postinst new/debian/libhdate-php.postinst
--- old/debian/libhdate-php.postinst    1969-12-31 19:00:00.000000000 -0500
+++ new/debian/libhdate-php.postinst    2020-06-21 16:40:42.000000000 -0400
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+[ "$1" = "configure" ] && phpenmod hdate
+
+#DEBHELPER#
+
+exit 0
diff -Naur old/debian/libhdate-php.preinst new/debian/libhdate-php.preinst
--- old/debian/libhdate-php.preinst     1969-12-31 19:00:00.000000000 -0500
+++ new/debian/libhdate-php.preinst     2020-06-21 16:41:17.000000000 -0400
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+exit 0
diff -Naur old/debian/libhdate-php.prerm new/debian/libhdate-php.prerm
--- old/debian/libhdate-php.prerm       1969-12-31 19:00:00.000000000 -0500
+++ new/debian/libhdate-php.prerm       2020-06-21 16:41:29.000000000 -0400
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+[ "$1" = "remove" ] && phpdismod hdate
+
+#DEBHELPER#
+
+exit 0
diff -Naur old/debian/rules new/debian/rules
--- old/debian/rules    2015-08-17 10:18:40.000000000 -0400
+++ new/debian/rules    2020-06-21 16:42:21.000000000 -0400
@@ -3,10 +3,13 @@
 ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
 
 %:
-       dh $* --with python2,autoreconf
+       dh $* --with python2,autoreconf,php
 
 override_dh_auto_configure:
        dh_auto_configure -- --with-perl-sitelib-dir=$(ARCHLIB)
 
 override_dh_python2:
        dh_python2 -s --no-guessing-versions
+
+binary-arch:
+       echo "php:Depends=phpapi-`php-config --phpapi`" >> 
debian/libhdate-php.substvars

Reply via email to