Package Details: php-systemd 0.1.2-6

Git Clone URL: https://aur.archlinux.org/php-systemd.git (read-only, click to copy)
Package Base: php-systemd
Description: PHP extension allowing native interaction with systemd and its journal
Upstream URL: https://github.com/systemd/php-systemd
Keywords: journald php systemd
Licenses: MIT
Submitter: NiNjA
Maintainer: Thaodan
Last Packager: Thaodan
Votes: 7
Popularity: 0.027228
First Submitted: 2016-01-21 19:04 (UTC)
Last Updated: 2022-04-15 13:50 (UTC)

Latest Comments

1 2 Next › Last »

adelks commented on 2025-04-28 15:14 (UTC)

Hey, here's a patch for the legacy version

diff --git a/PKGBUILD b/PKGBUILD
index e4384f6..d66ae4b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Contributor: Heine Pedersen <heinep at gmail dot com>
 # Contributor: Thaodan AUR+me@thaodan.de

-pkgname=php-systemd
+pkgname=('php-systemd' 'php-legacy-systemd')
 pkgver=0.1.2
 pkgrel=6

@@ -9,8 +9,7 @@ pkgdesc="PHP extension allowing native interaction with systemd and its journal"
 arch=("any")
 url="https://github.com/systemd/php-systemd"
 license=("MIT")
-makedepends=("php"
-            "systemd")
+makedepends=("php" "php-legacy" "systemd")
 depends=("libsystemd")
 backup=("etc/php/conf.d/systemd.ini")
 source=("https://github.com/systemd/php-systemd/archive/release-${pkgver}.zip"
@@ -34,7 +33,7 @@ md5sums=('986a24e147ae2a816ee315edb0b2e856'


 prepare() {
-  cd ${srcdir}/${pkgname}-release-${pkgver}
+  cd ${srcdir}/php-systemd-release-${pkgver}

   patch -p1 -i "${srcdir}/0001-Fixes-outdated-build-config.patch"
   patch -p1 -i "${srcdir}/0002-Updates-build-instructions-and-example.patch"
@@ -42,17 +41,23 @@ prepare() {
   patch -p1 -i "${srcdir}/0004-Adds-fixes-for-PHP-7.0.patch"
   patch -p1 -i "${srcdir}/0005-Define-SD_JOURNAL_SUPPRESS_LOCATION.-Fixes-2.patch"patch -p1 -i "${srcdir}/0006-Provide-arginfo.patch"

-  phpize
+  cp -a ${srcdir}/php-systemd-release-${pkgver} ${srcdir}/php-legacy-systemd-release-${pkgver}
 }

 build() {
-  cd ${srcdir}/${pkgname}-release-${pkgver}
+  cd ${srcdir}/php-systemd-release-${pkgver}
   phpize
   ./configure --prefix=/usr --with-systemd
   make
+
+  cd ${srcdir}/php-legacy-systemd-release-${pkgver}
+  phpize-legacy
+  ./configure --prefix=/usr --with-systemd
+  make
+
 }

-package() {
+package_php-systemd() {
   cd ${srcdir}/${pkgname}-release-${pkgver}
   install -Dm644 README.md ${pkgdir}/usr/share/doc/${pkgname}/README.md
   install -Dm644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt
@@ -60,4 +65,12 @@ package() {
   install -Dm644 modules/systemd.so ${pkgdir}/usr/lib/php/modules/systemd.so
 }

+package_php-legacy-systemd() {
+  cd ${srcdir}/${pkgname}-release-${pkgver}
+  install -Dm644 README.md ${pkgdir}/usr/share/doc/${pkgname}/README.md
+  install -Dm644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt
+  install -Dm644 ${srcdir}/systemd.ini ${pkgdir}/etc/php-legacy/conf.d/systemd.ini
+  install -Dm644 modules/systemd.so ${pkgdir}/usr/lib/php-legacy/modules/systemd.so
+}
+
 # vim:set ts=2 sw=2 et:

risto3 commented on 2023-05-21 11:38 (UTC)

I think yes, perhaps something like is done for php- and php-legacy imagick.

Thaodan commented on 2023-02-23 22:16 (UTC)

Hey,

Do you mean build for both legacy and regular php?

jip commented on 2023-02-17 22:49 (UTC)

I actually already have a patch but I'm not sure how I should send it.

jip commented on 2023-02-17 22:48 (UTC)

Could you please update package to build php-legacy-systemd? I can provide a patch if necessary but that should be straightforward.

Thaodan commented on 2022-04-15 13:52 (UTC)

I added some patches to fix the issues mentioned an replaced the patches used to then upstream patches.

https://github.com/systemd/php-systemd/pull/8

NiNjA commented on 2021-09-16 15:57 (UTC)

@j12t: I have the same problem. This patch should fix the issue: http://ix.io/3z4i

I'm not sure when the problem arose.

j12t commented on 2021-09-16 03:33 (UTC)

Getting lots of "'PHP Warning: Missing arginfo for sd_journal_send() in Unknown on line 0" with PHP 8. Not sure how to fix this. There is an example here: https://github.com/php/php-src/tree/master/ext/skeleton but I don't understand enough about all those macros to known how to apply them. Anybody know more than I do?

Thaodan commented on 2021-03-27 17:37 (UTC)

@marcool04: Care to upstream that fix?

marcool04 commented on 2021-02-26 22:37 (UTC)

In order to make this work with php8, I had to add this:

sed -ie 's/ZEND_NUM_ARGS() TSRMLS_CC/ZEND_NUM_ARGS()/' systemd.c

under the patch lines in the build() function. See first part of answer 1 here