Bug#684382: PHP bindings for libhdate

2020-06-21 Thread Ariel
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.am2020-06-21 16:01:58.0 -0400
+++ new/bindings/php/Makefile.am2020-06-21 16:57:11.0 -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.in2020-06-21 16:01:58.0 -0400
+++ new/configure.in2020-06-21 16:24:56.0 -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.0 -0500
+++ new/debian/control  2020-06-21 16:21:59.0 -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.0 -0500
+++ new/debian/control.orig 2017-01-24 12:08:21.0 -0500
@@ -0,0 +1,83 @@
+Source: libhdate
+Priority: optional
+Section: libdevel
+Maintainer: Debian Hebrew Packaging Team 

+Uploaders: Lior Kaplan , Shachar Shemesh 
, Tzafrir Cohen 
+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 H

Bug#684382: PHP bindings for libhdate

2016-09-15 Thread Ariel
Source: libhdate
Followup-For: Bug #684382

Please enable the PHP bindings. I am including a patchfile with everything 
necessary.

Just apply the patch and rebuild, you don't have to do anything else.

-- System Information:
Debian Release: 8.5
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.16.36 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Naur old/debian/control new/debian/control
--- old/debian/control	2014-09-10 11:04:04.0 -0400
+++ new/debian/control	2016-09-15 19:24:30.842054753 -0400
@@ -51,6 +51,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/libhdate-php.install new/debian/libhdate-php.install
--- old/debian/libhdate-php.install	2016-09-15 18:52:02.306608632 -0400
+++ new/debian/libhdate-php.install	2016-09-15 19:01:06.835711780 -0400
@@ -1,2 +1,3 @@
-bindings/php/hdate.ini etc/php5/conf.d
+bindings/php/hdate.ini etc/php5/mods-available
 usr/lib/php5/*
+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.0 -0500
+++ new/debian/libhdate-php.postinst	2016-09-15 19:10:03.269678201 -0400
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/hdate.ini \
+/etc/php5/mods-available/hdate.ini 1.6-3+b2 -- "$@"
+rm -f /etc/php5/conf.d/hdate.ini
+
+[ "$1" = "configure" ] && php5enmod 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.0 -0500
+++ new/debian/libhdate-php.preinst	2016-09-15 19:10:23.446030225 -0400
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/hdate.ini \
+/etc/php5/mods-available/hdate.ini 1.6-3+b2 -- "$@"
+rm -f /etc/php5/conf.d/hdate.ini
+
+#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.0 -0500
+++ new/debian/libhdate-php.prerm	2016-09-15 19:10:55.480600612 -0400
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/hdate.ini \
+/etc/php5/mods-available/hdate.ini 1.6-3+b2 -- "$@"
+rm -f /etc/php5/conf.d/hdate.ini
+
+[ "$1" = "remove" ] && php5dismod hdate
+
+#DEBHELPER#
+
+exit 0
diff -Naur old/debian/rules new/debian/rules
--- old/debian/rules	2016-09-15 19:43:46.027354228 -0400
+++ new/debian/rules	2016-09-15 19:44:09.540765571 -0400
@@ -3,10 +3,13 @@
 ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
 
 %:
-	dh $* --with python2,autoreconf
+	dh $* --with python2,autoreconf,php5
 
 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-config5 --phpapi`" >> debian/libhdate-php.substvars


Bug#684382: [Debian-hebrew-package] Bug#684382: PHP bindings for libhdate

2012-08-09 Thread Ariel


On Fri, 10 Aug 2012, Lior Kaplan wrote:


On Thu, Aug 9, 2012 at 1:56 PM, Ariel  wrote:



But why drop them? They work perfectly. Is there any harm in leaving them
there?



As I said, lack of use. No harm in keeping them, just work due to PHP
related chanes (at that time it was work on PHP 5.4).


Please put it back? I need it! I've been searching for a package like this 
for over a year! And I was just about to program it myself when I stumbled 
across this.



And I don't understand how you can use popcon to track it considering
libhdate-php didn't even exist in squeeze. In fact, as far as I can tell
libhdate-php has never existed in debian at all.



That's becuase the package never made it to stable, but it was there
between October 2010 and April 2012 (see the changelog of the source
package). Let just say it had less users than the libhdate-python users in
this graph: http://qa.debian.org/popcon.php?package=libhdate


libhdate-python made it to stable so that's not a fair comparison. This 
is a server package, and servers virtually never run testing.


Please put it back. It works perfectly, so there is no extra maintenance
for you.

-Ariel


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#684382: [Debian-hebrew-package] Bug#684382: PHP bindings for libhdate

2012-08-09 Thread Lior Kaplan
On Thu, Aug 9, 2012 at 1:56 PM, Ariel  wrote:

>
> On Thu, 9 Aug 2012, Lior Kaplan wrote:
>
>  The php binding were dropped, as in we don't build and provide them any
>> more. This is due to lack of use (judging by the popcon statistics).
>>
>
> But why drop them? They work perfectly. Is there any harm in leaving them
> there?
>

As I said, lack of use. No harm in keeping them, just work due to PHP
related chanes (at that time it was work on PHP 5.4).


> And I don't understand how you can use popcon to track it considering
> libhdate-php didn't even exist in squeeze. In fact, as far as I can tell
> libhdate-php has never existed in debian at all.
>

That's becuase the package never made it to stable, but it was there
between October 2010 and April 2012 (see the changelog of the source
package). Let just say it had less users than the libhdate-python users in
this graph: http://qa.debian.org/popcon.php?package=libhdate

Kaplan


Bug#684382: [Debian-hebrew-package] Bug#684382: PHP bindings for libhdate

2012-08-09 Thread Ariel


On Thu, 9 Aug 2012, Lior Kaplan wrote:


The php binding were dropped, as in we don't build and provide them any
more. This is due to lack of use (judging by the popcon statistics).


But why drop them? They work perfectly. Is there any harm in leaving them 
there?


And I don't understand how you can use popcon to track it considering 
libhdate-php didn't even exist in squeeze. In fact, as far as I can tell 
libhdate-php has never existed in debian at all.


http://archive.debian.net/search?keywords=libhdate-php&searchon=names&suite=all§ion=all

So how can you draw any conclusions from this when people never even had 
the option of installing it in the first place?


-Ariel


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#684382: [Debian-hebrew-package] Bug#684382: PHP bindings for libhdate

2012-08-09 Thread Lior Kaplan
On Thu, Aug 9, 2012 at 12:59 PM, Ariel  wrote:

> I noticed the changelog said you removed libhdate-php - did you intend to
> replace it with php-libhdate or was it supposed to be included in the core
> libhdate1 package?
>

The php binding were dropped, as in we don't build and provide them any
more. This is due to lack of use (judging by the popcon statistics).

You're welcome to take a look at the code change which was done for the
drop (
http://anonscm.debian.org/viewvc/debian-hebrew?view=revision&revision=947)
and revert it on your own build environment.

Good luck,

Kaplan


Bug#684382: PHP bindings for libhdate

2012-08-09 Thread Ariel


Actually, bindings/php/hdate.php should go in /usr/share/php

-Ariel


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#684382: PHP bindings for libhdate

2012-08-09 Thread Ariel
Package: libhdate
Version: 1.6
Severity: normal

I'm trying to get the PHP bindings for libhdate to work. (I was
successful, just not with the stock packages from debian.)

I noticed the changelog said you removed libhdate-php - did you intend to
replace it with php-libhdate or was it supposed to be included in the core
libhdate1 package?

When I compile it myself it compiles the PHP bindings with no trouble, but
they are not actually installed anywhere since nothing lists them in
.install and there is no php package in control.

When the debian build machine makes the package, the PHP bindings are not
even built since php-dev is not included as a Build-Depends.

Is there something I am missing?

Also, you need to include bindings/php/hdate.php in
/usr/share/doc/libhdate-dev/examples/bindings otherwise it doesn't work.

-- System Information:
Debian Release: 6.0.5
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org