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

Antonio Rojas arojas at archlinux.org
Wed May 15 14:50:59 UTC 2019


    Date: Wednesday, May 15, 2019 @ 14:50:58
  Author: arojas
Revision: 353390

Build shared library

Modified:
  zxing-cpp/trunk/PKGBUILD

----------+
 PKGBUILD |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-05-15 13:51:28 UTC (rev 353389)
+++ PKGBUILD	2019-05-15 14:50:58 UTC (rev 353390)
@@ -8,13 +8,18 @@
 arch=(x86_64)
 url="https://github.com/nu-book/zxing-cpp"
 license=(Apache)
-depends=()
+depends=(gcc-libs)
 makedepends=(cmake)
-source=($pkgname-$pkgver.tar.gz::"https://github.com/nu-book/zxing-cpp/archive/v$pkgver.tar.gz")
-sha256sums=('e3bb5c135523638ca875c242efb958742b4b8e02a1acdf6b182ecd85021463dd')
+source=($pkgname-$pkgver.tar.gz::"https://github.com/nu-book/zxing-cpp/archive/v$pkgver.tar.gz"
+        zxing-cpp-shared.patch::"https://github.com/nu-book/zxing-cpp/commit/f77a2db2.patch")
+sha256sums=('e3bb5c135523638ca875c242efb958742b4b8e02a1acdf6b182ecd85021463dd'
+            '40045b7d32d3f435a50a1398ff1ed90605cff75f1496d2dc0964c7f9c7cc790e')
 
 prepare() {
   mkdir -p build
+
+  cd $pkgname-$pkgver
+  patch -p1 -i ../zxing-cpp-shared.patch # Allow to build shared library
 }
 
 build() {
@@ -21,7 +26,8 @@
   cd build
   cmake ../$pkgname-$pkgver/core \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DCMAKE_CXX_FLAGS="${CXXFLAGS} -fPIC"
+    -DCMAKE_CXX_FLAGS="${CXXFLAGS} -fPIC" \
+    -DBUILD_SHARED_LIBRARY=ON
   make
 }
 


More information about the arch-commits mailing list