[arch-commits] Commit in freetype2/trunk (PKGBUILD)

Jan Steffens heftig at archlinux.org
Tue Jul 12 11:20:57 UTC 2016


    Date: Tuesday, July 12, 2016 @ 11:20:56
  Author: heftig
Revision: 271491

Fix demos

Modified:
  freetype2/trunk/PKGBUILD

----------+
 PKGBUILD |   34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-07-12 10:54:00 UTC (rev 271490)
+++ PKGBUILD	2016-07-12 11:20:56 UTC (rev 271491)
@@ -11,6 +11,8 @@
 # adding harfbuzz for improved OpenType features auto-hinting
 # introduces a cycle dep to harfbuzz depending on freetype wanted by upstream
 depends=('zlib' 'bzip2' 'sh' 'libpng' 'harfbuzz')
+makedepends=('libx11')
+optdepends=('libx11: Some demo programs')
 provides=('libfreetype.so')
 install=freetype2.install
 source=(http://download.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.bz2{,.sig}
@@ -33,19 +35,25 @@
 validpgpkeys=('58E0C111E39F5408C5D3EC76C1A60EACE707FDA5')
 
 prepare() {
-  # rename source dir to allow building the demos
+  # Rename source dir to allow building the demos
   mv freetype-${pkgver} freetype2
+
   cd freetype2
-  patch -Np1 -i "${srcdir}/0001-Enable-table-validation-modules.patch"
-  patch -Np1 -i "${srcdir}/0002-Enable-subpixel-rendering.patch"
+  patch -Np1 -i ../0001-Enable-table-validation-modules.patch
+  patch -Np1 -i ../0002-Enable-subpixel-rendering.patch
 
   # Provide a way to set the default subpixel hinting mode
   # at runtime, without depending on the application to do so.
-  patch -Np1 -i "${srcdir}/0003-Make-subpixel-hinting-mode-configurable.patch"
+  patch -Np1 -i ../0003-Make-subpixel-hinting-mode-configurable.patch
 
   # Keep the classic subpixel hinting mode as default, as expected
   # by upstream for the 2.6 series
-  patch -Np1 -i "${srcdir}/0004-Keep-default-interpreter-version-as-35.patch"
+  patch -Np1 -i ../0004-Keep-default-interpreter-version-as-35.patch
+
+  cd ../ft2demos-${pkgver}
+
+  # Suppress RPATH
+  sed -i '/X11_LIB:%=-R%/d' graph/x11/rules.mk
 }
 
 build() {
@@ -54,9 +62,8 @@
   make
 
   # Build demos
-  pushd ../ft2demos-${pkgver}
+  cd ../ft2demos-${pkgver}
   make
-  popd
 }
 
 check() {
@@ -68,10 +75,13 @@
   cd freetype2
   make DESTDIR="${pkgdir}" install
 
-  # package demos
-  install -m755 ../ft2demos-${pkgver}/bin/.libs/{f,t}t* "$pkgdir/usr/bin/"
+  # Package docs
+  install -dm755 "${pkgdir}/usr/share/doc"
+  cp -a docs "${pkgdir}/usr/share/doc/${pkgname}"
 
-  # package docs
-  install -dm755 ${pkgdir}/usr/share/doc/${pkgname}
-  cp -a docs/* ${pkgdir}/usr/share/doc/${pkgname}
+  # Package demos
+  cd ../ft2demos-${pkgver}
+  for _i in bin/{f,t}t*; do
+    libtool --mode=install install $_i "$pkgdir/usr/bin/"
+  done
 }



More information about the arch-commits mailing list