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

Alexander Rødseth arodseth at archlinux.org
Mon Sep 9 10:04:54 UTC 2019


    Date: Monday, September 9, 2019 @ 10:04:53
  Author: arodseth
Revision: 509090

upgpkg: pdcurses 3.9-1

Modified:
  pdcurses/trunk/PKGBUILD

----------+
 PKGBUILD |   32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-09-09 09:56:36 UTC (rev 509089)
+++ PKGBUILD	2019-09-09 10:04:53 UTC (rev 509090)
@@ -8,20 +8,48 @@
 arch=(x86_64)
 url='https://pdcurses.org/'
 license=(GPL)
-depends=(libxpm xaw3d)
+makedepends=(sdl sdl2 libxpm xaw3d)
 source=("$pkgname-$pkgver.tgz::https://github.com/wmcbrine/PDCurses/archive/$pkgver.tar.gz")
 options=(staticlibs)
 sha256sums=('590dbe0f5835f66992df096d3602d0271103f90cf8557a5d124f693c2b40d7ec')
 
 build() {
+  export CFLAGS="$CFLAGS -fPIC"
+
+  # X11
   cd PDCurses-$pkgver/x11
-  ./configure --prefix=/usr --enable-widec --enable-xim --with-xaw3d --with-x
+  ./configure --prefix=/usr --enable-widec --with-xaw3d --with-x
   make
+  gcc $CFLAGS $LDFLAGS -shared -o libXCurses.so *.o
+
+  # SDL1
+  cd ../sdl1
+  make
+  gcc $CFLAGS $LDFLAGS -shared -o pdcurses.so *.o
+
+  # SDL2
+  cd ../sdl2
+  make
+  gcc $CFLAGS $LDFLAGS -shared -o pdcurses2.so *.o
 }
 
 package() {
+  # X11
   cd PDCurses-$pkgver/x11
   make prefix="$pkgdir/usr" install
+  cd ..
+  install -Dm644 curspriv.h "$pkgdir/usr/include/curspriv.h"
+
+  # SDL1, compatible with asciiportal
+  install -Dm644 sdl1/pdcsdl.h "$pkgdir/usr/include/pdcsdl.h"
+  install -Dm644 sdl1/pdcurses.so "$pkgdir/usr/lib/libpdcurses.so"
+
+  # SDL2, incompatible with asciiportal
+  install -Dm644 sdl2/pdcsdl.h "$pkgdir/usr/include/pdcsdl2.h"
+  install -Dm644 sdl2/pdcurses2.so "$pkgdir/usr/lib/libpdcurses2.so"
+
+  # Only keep shared libraries
+  rm -f "$pkgdir/usr/lib/libXCurses.a"
 }
 
 # getver: raw.githubusercontent.com/wmcbrine/PDCurses/master/curses.h


More information about the arch-commits mailing list