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

Bruno Pagani archange at gemini.archlinux.org
Sat Nov 6 09:49:10 UTC 2021


    Date: Saturday, November 6, 2021 @ 09:49:10
  Author: archange
Revision: 1037503

Switch to CMake build to fix FS#72574

Modified:
  libharu/trunk/PKGBUILD

----------+
 PKGBUILD |   33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-06 08:44:01 UTC (rev 1037502)
+++ PKGBUILD	2021-11-06 09:49:10 UTC (rev 1037503)
@@ -4,12 +4,13 @@
 
 pkgname=libharu
 pkgver=2.3.0
-pkgrel=4
+pkgrel=5
 pkgdesc="C library for generating PDF documents"
 arch=(x86_64)
 url="https://github.com/libharu/libharu"
 license=(custom:ZLIB)
-depends=(libpng gcc-libs)
+depends=(libpng zlib)
+makedepends=(cmake)
 source=(${url}/archive/RELEASE_${pkgver//./_}/${pkgname}-${pkgver}.tar.gz
         ${pkgname}-157.patch::${url}/pull/157.patch
         ${pkgname}-158.patch::${url}/pull/158.patch)
@@ -19,25 +20,25 @@
 
 prepare() {
   cd ${pkgname}-RELEASE_${pkgver//./_}
-  patch -p1 -i ../${pkgname}-157.patch
-  patch -p1 -i ../${pkgname}-158.patch
+  patch -p1 < ../${pkgname}-157.patch
+  patch -p1 < ../${pkgname}-158.patch
+  sed 's|set(LIBHPDF_MINOR 2)|set(LIBHPDF_MINOR 3)|' -i CMakeLists.txt
 }
 
 build() {
-  cd ${pkgname}-RELEASE_${pkgver//./_}
-  touch include/config.h.in
-  aclocal
-  libtoolize
-  automake --add-missing
-  autoconf
-  ./configure --prefix=/usr
-  make
+  cmake -B build -S ${pkgname}-RELEASE_${pkgver//./_} \
+    -DCMAKE_BUILD_TYPE=None \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DLIBHPDF_STATIC=OFF
+  make -C build
 }
 
 package() {
-  cd ${pkgname}-RELEASE_${pkgver//./_}
-  make DESTDIR="${pkgdir}" install
-  # license
+  make -C build DESTDIR="${pkgdir}" install
+  # License
   install -d "${pkgdir}"/usr/share/licenses/${pkgname}
-  sed -n '102,120p' README > "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  sed -n '102,120p' ${pkgname}-RELEASE_${pkgver//./_}/README > "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  # Remove some uneeded wrongly installed files
+  rm "${pkgdir}"/usr/{CHANGES,INSTALL,README}
+  rm -r "${pkgdir}"/usr/if
 }



More information about the arch-commits mailing list