+++ /dev/null
-php5-itkacl (2.0) unstable; urgency=low
-
- * Initial release.
-
- -- Steinar H. Gunderson <sesse@samfundet.no> Tue, 14 May 2013 19:02:22 +0200
+++ /dev/null
-etc/php5/conf.d
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
--- /dev/null
+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
-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}
--- /dev/null
+etc/php7/conf.d
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
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
* 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);
+ }
+} "
+