]> git.sesse.net Git - itkacl/commitdiff
Update for PHP 7.
authorSteinar H. Gunderson <sesse@samfundet.no>
Thu, 8 Aug 2019 22:03:23 +0000 (00:03 +0200)
committerSteinar H. Gunderson <sesse@samfundet.no>
Thu, 8 Aug 2019 22:07:35 +0000 (00:07 +0200)
php5-itkacl-2.0/debian/changelog [deleted file]
php5-itkacl-2.0/debian/php5-itkacl.dirs [deleted file]
php7-itkacl-2.0/Makefile [moved from php5-itkacl-2.0/Makefile with 86% similarity]
php7-itkacl-2.0/debian/changelog [new file with mode: 0644]
php7-itkacl-2.0/debian/compat [moved from php5-itkacl-2.0/debian/compat with 100% similarity]
php7-itkacl-2.0/debian/control [moved from php5-itkacl-2.0/debian/control with 72% similarity]
php7-itkacl-2.0/debian/itkacl.ini [moved from php5-itkacl-2.0/debian/itkacl.ini with 100% similarity]
php7-itkacl-2.0/debian/php7-itkacl.dirs [new file with mode: 0644]
php7-itkacl-2.0/debian/rules [moved from php5-itkacl-2.0/debian/rules with 73% similarity]
php7-itkacl-2.0/itkacl.i [moved from php5-itkacl-2.0/itkacl.i with 81% similarity]

diff --git a/php5-itkacl-2.0/debian/changelog b/php5-itkacl-2.0/debian/changelog
deleted file mode 100644 (file)
index 9f4f4b3..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-php5-itkacl (2.0) unstable; urgency=low
-
-  * Initial release.
-
- -- Steinar H. Gunderson <sesse@samfundet.no>  Tue, 14 May 2013 19:02:22 +0200
diff --git a/php5-itkacl-2.0/debian/php5-itkacl.dirs b/php5-itkacl-2.0/debian/php5-itkacl.dirs
deleted file mode 100644 (file)
index 8ca3a0f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-etc/php5/conf.d
similarity index 86%
rename from php5-itkacl-2.0/Makefile
rename to php7-itkacl-2.0/Makefile
index 74968dcb867e2042190ccd270b0bc3f88ee13ad6..e282a1edf9163037eaad310185d8cfc261602970 100644 (file)
@@ -8,8 +8,8 @@ php_itkacl.so: itkacl_wrap.o
 itkacl_wrap.o: itkacl_wrap.cpp
        $(CXX) $(shell php-config --includes) $(CXXFLAGS) -c itkacl_wrap.cpp -o itkacl_wrap.o
 
-itkacl_wrap.cpp:
-       swig -php5 -c++ itkacl.i
+itkacl_wrap.cpp: itkacl.i
+       swig -php7 -noproxy -c++ -cppext cpp itkacl.i
 
 clean:
        $(RM) itkacl.php itkacl_wrap.cpp itkacl_wrap.o php_itkacl.h php_itkacl.so
diff --git a/php7-itkacl-2.0/debian/changelog b/php7-itkacl-2.0/debian/changelog
new file mode 100644 (file)
index 0000000..4dbb7c2
--- /dev/null
@@ -0,0 +1,11 @@
+php7-itkacl (2.1) unstable; urgency=medium
+
+  * Port to PHP 7.
+
+ -- Steinar H. Gunderson <sesse@samfundet.no>  Fri, 09 Aug 2019 00:05:36 +0200
+
+php5-itkacl (2.0) unstable; urgency=low
+
+  * Initial release.
+
+ -- Steinar H. Gunderson <sesse@samfundet.no>  Tue, 14 May 2013 19:02:22 +0200
similarity index 72%
rename from php5-itkacl-2.0/debian/control
rename to php7-itkacl-2.0/debian/control
index 288ecb18a6ce22ddb242dc1cdf33fe6397e4d5ad..b7ce5e8e91416edf04a76a75fa2d739b53b93bc6 100644 (file)
@@ -1,11 +1,11 @@
-Source: php5-itkacl
+Source: php7-itkacl
 Priority: extra
 Maintainer: Steinar H. Gunderson <sesse@samfundet.no>
-Build-Depends: debhelper (>= 7.0.50~), libitkacl-dev, php5-dev
+Build-Depends: debhelper (>= 7.0.50~), libitkacl-dev, php7.3-dev
 Standards-Version: 3.9.1
 Section: php
 
-Package: php5-itkacl
+Package: php7-itkacl
 Section: php
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${php:Depends}
diff --git a/php7-itkacl-2.0/debian/php7-itkacl.dirs b/php7-itkacl-2.0/debian/php7-itkacl.dirs
new file mode 100644 (file)
index 0000000..db7d8a6
--- /dev/null
@@ -0,0 +1 @@
+etc/php7/conf.d
similarity index 73%
rename from php5-itkacl-2.0/debian/rules
rename to php7-itkacl-2.0/debian/rules
index f177e9e7732aa91890fa528d9294e9d9b7494bd6..84044520664cfeb98a1fa8b00e91aa842d047dc0 100755 (executable)
@@ -16,8 +16,8 @@ binary-arch:
        dh_testroot
        dh_prep
        dh_installdirs
-       $(MAKE) install DESTDIR=debian/php5-itkacl
-       install -m 0644 -o root -g root debian/itkacl.ini debian/php5-itkacl/etc/php5/conf.d/
+       $(MAKE) install DESTDIR=debian/php7-itkacl
+       install -m 0644 -o root -g root debian/itkacl.ini debian/php7-itkacl/etc/php7/conf.d/
        dh_installdocs
        dh_installchangelogs
        dh_compress
@@ -25,7 +25,7 @@ binary-arch:
        dh_strip
        dh_makeshlibs
        dh_shlibdeps
-       echo "php:Depends=phpapi-$(shell php-config --phpapi)" >> debian/php5-itkacl.substvars
+       echo "php:Depends=phpapi-$(shell php-config --phpapi)" >> debian/php7-itkacl.substvars
        dh_installdeb
        dh_gencontrol
        dh_md5sums
similarity index 81%
rename from php5-itkacl-2.0/itkacl.i
rename to php7-itkacl-2.0/itkacl.i
index 18ae21cf56a4cc33f0cf2d477272a8ec9021e5fd..06eef1e77fc83b4656983ec3fe2e03a75bcd8c21 100644 (file)
@@ -10,9 +10,6 @@
  * restrictions.
  */
 %inline %{
-       /* This is due to Swig forgetting one file */
-       #include <php5/Zend/zend_exceptions.h>
-
        extern "C" int itkacl_check(char *realm, char *user, char *errmsg, size_t errmsgsize);
        
        class itkaclwrap {
                int ret = itkacl_check(realm, user, itkacl_errmsg, 1024);
                if (ret == -1) {
                        SWIG_exception(SWIG_RuntimeError,itkacl_errmsg);
+thrown: return -1;
                } else {
                        return ret == 0;
                }
        }
 %}
 
+%pragma(php) code="
+class itkacl {
+      static function check($realm,$user) {
+              return itkaclwrap_check($realm,$user);
+      }
+} "
+