--- /usr/bin/pg_buildext	2018-08-21 07:58:46.000000000 +0000
+++ /usr/bin/pg_buildext	2018-08-21 07:58:46.000000000 +0000
@@ -69,11 +69,13 @@
     if [ "$opt" ]; then
         cflags="$(echo $opt | sed -e "s:%v:$1:g")"
     fi
+    procs="$(nproc)"
+    mjobs="$(expr $procs + 1)"
 
     mkdir -p $vtarget
     # if a Makefile was created by configure, use it, else the top level Makefile
     [ -f $vtarget/Makefile ] || makefile="-f $srcdir/Makefile"
-    make -C $vtarget ${makefile:-} ${cflags:+CFLAGS="$cflags"} PG_CONFIG="$pgc" VPATH="$srcdir" USE_PGXS=1
+    make -j${mjobs} -C $vtarget ${makefile:-} ${cflags:+CFLAGS="$cflags"} PG_CONFIG="$pgc" VPATH="$srcdir" USE_PGXS=1
 }
 
 install() {

--- /usr/bin/pg_buildext	2018-12-16 10:56:59.000000000 +0000
+++ /usr/bin/pg_buildext	2018-12-16 10:56:59.000000000 +0000
@@ -71,11 +71,13 @@
     if [ "$opt" ]; then
         cflags="$(echo $opt | sed -e "s:%v:$1:g")"
     fi
+    procs="$(nproc)"
+    mjobs="$(expr $procs + 1)"
 
     mkdir -p $vtarget
     # if a Makefile was created by configure, use it, else the top level Makefile
     [ -f $vtarget/Makefile ] || makefile="-f $srcdir/Makefile"
-    make -C $vtarget ${makefile:-} ${cflags:+CFLAGS="$cflags"} PG_CONFIG="$pgc" VPATH="$srcdir" USE_PGXS=1 $MAKEVARS
+    make -j${mjobs} -C $vtarget ${makefile:-} ${cflags:+CFLAGS="$cflags"} PG_CONFIG="$pgc" VPATH="$srcdir" USE_PGXS=1 $MAKEVARS
 }
 
 install() {

Update parallel buildext patch for latest tools
Update parallel buildext patch for latest tools

Some lines changed slightly and the addition of more functionality
caused the line numbers in the patch to become incorrect.
