summaryrefslogtreecommitdiffstats
path: root/php-endroid-qrcode-rpm.patch
blob: 39fb1d8ee7c45431b21d9ce3730b38f98719b34d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff -up src/QrCode.php.rpm src/QrCode.php
--- src/QrCode.php.rpm	2017-06-27 14:19:50.099124286 +0200
+++ src/QrCode.php	2017-06-27 14:19:54.373148551 +0200
@@ -177,9 +177,10 @@ class QrCode
      */
     public function __construct($text = '')
     {
-        $this->setPath(__DIR__.'/../assets/data');
-        $this->setImagePath(__DIR__.'/../assets/image');
-        $this->setLabelFontPath(__DIR__.'/../assets/font/opensans.ttf');
+        $assets = (getenv('RPM_ASSETS_BUILDROOT') ?: '') . '@ASSETS@';
+        $this->setPath($assets.'/data');
+        $this->setImagePath($assets.'/image');
+        $this->setLabelFontPath('/usr/share/fonts/open-sans/OpenSans-Regular.ttf');
         $this->setText($text);
     }