summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Diehl2023-03-11 20:30:39 +0100
committerMartin Diehl2023-03-11 20:30:39 +0100
commit0759ad72e43ae8ac8268342004f15cc1d82952e8 (patch)
treedc682f57fcbf1d7d30fd272fb224d20ae27e0085
parentd2d2fa809bc0ff25d312d870237ab049eb089c73 (diff)
downloadaur-0759ad72e43ae8ac8268342004f15cc1d82952e8.tar.gz
GNUMake 4.4.1 compatibility
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD14
-rw-r--r--make.patch56
3 files changed, 70 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 50aa3fadc57b..5975f1bc7d58 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = petsc
pkgdesc = Portable, extensible toolkit for scientific computation
pkgver = 3.18.5
- pkgrel = 1
+ pkgrel = 2
url = https://www.mcs.anl.gov/petsc
install = petsc.install
arch = i686
@@ -33,7 +33,9 @@ pkgbase = petsc
options = staticlibs
source = http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.18.5.tar.gz
source = test_optdepends.sh
+ source = make.patch
sha512sums = 951614eda67636a12a69799ece8a2cb44b1e6238acc471cda63d1147861a2a15ce6af86c33ee80123d90be7b8f2a3494a9288997728737b33e28c77a5d53a7a6
sha512sums = bdbff55c99205ae6edf574af319d19133aaf91eeae2dbb826f207be9f77ec08dfaf4afca6642b1536f159b7516c1fdeb29f35356dbc69c53c4ce506d44bf5e40
+ sha512sums = 1ec8805df29c87d482a4ff937353feae16830cec70743421b75dbe737c1d569b3995ad832aecd8126782e2ea8f56655285549acce098aad66e7902c78e3f5ad9
pkgname = petsc
diff --git a/PKGBUILD b/PKGBUILD
index d4ec56095391..30b62e4e1205 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Contributor: Myles English <myles at rockhead dot biz>
# Contributor: Lucas H. Gabrielli <heitzmann at gmail dot com>
pkgver=3.18.5
-pkgrel=1
+pkgrel=2
pkgname=petsc
_config=linux-c-opt
# if --with-debugging=yes is set then PETSC_ARCH is automatically set to
@@ -35,13 +35,21 @@ optdepends=('trilinos: support for trilinos'
install=petsc.install
source=(http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${pkgname}-${pkgver}.tar.gz
- test_optdepends.sh)
+ test_optdepends.sh
+ make.patch)
sha512sums=('951614eda67636a12a69799ece8a2cb44b1e6238acc471cda63d1147861a2a15ce6af86c33ee80123d90be7b8f2a3494a9288997728737b33e28c77a5d53a7a6'
- 'bdbff55c99205ae6edf574af319d19133aaf91eeae2dbb826f207be9f77ec08dfaf4afca6642b1536f159b7516c1fdeb29f35356dbc69c53c4ce506d44bf5e40')
+ 'bdbff55c99205ae6edf574af319d19133aaf91eeae2dbb826f207be9f77ec08dfaf4afca6642b1536f159b7516c1fdeb29f35356dbc69c53c4ce506d44bf5e40'
+ '1ec8805df29c87d482a4ff937353feae16830cec70743421b75dbe737c1d569b3995ad832aecd8126782e2ea8f56655285549acce098aad66e7902c78e3f5ad9')
_install_dir=/opt/petsc/${_config}
_petsc_arch=arch-${_config}
+
+prepare() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch --strip=1 --input=${srcdir}/make.patch
+}
+
build() {
_build_dir=${srcdir}/${pkgname}-${pkgver}
cd ${_build_dir}
diff --git a/make.patch b/make.patch
new file mode 100644
index 000000000000..841d6e93e284
--- /dev/null
+++ b/make.patch
@@ -0,0 +1,56 @@
+diff --color --unified --recursive --text petsc-3.18.5.orig/lib/petsc/conf/rules petsc-3.18.5.new/lib/petsc/conf/rules
+--- petsc-3.18.5.orig/lib/petsc/conf/rules 2023-03-11 20:17:33.736352026 +0100
++++ petsc-3.18.5.new/lib/petsc/conf/rules 2023-03-11 20:22:42.750019218 +0100
+@@ -53,7 +53,21 @@
+ @${MKDIR} -p ${PETSC_DIR}/${PETSC_ARCH}/tests && touch -t 197102020000 ${PETSC_DIR}/${PETSC_ARCH}/tests/testfiles
+
+ libs: ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/files ${PETSC_DIR}/${PETSC_ARCH}/tests/testfiles
+- +@cd ${PETSC_DIR} && MAKEFLAGS="-j$(MAKE_NP) -l$(MAKE_LOAD) $(MAKEFLAGS)" ${OMAKE_PRINTDIR} -f gmakefile ${MAKE_PAR_OUT_FLG} V=${V} libs
++ +@r=`echo "${MAKEFLAGS}" | grep ' \-j'`; \
++ if [ "$$?" = 0 ]; then \
++ make_j="";\
++ echo "Skipping adding -jMAKE_NP option as -j option is already specified"; \
++ else \
++ make_j="-j${MAKE_NP}"; \
++ fi; \
++ r=`echo "${MAKEFLAGS}" | grep ' \-l'`; \
++ if [ "$$?" = 0 ]; then \
++ make_l="";\
++ echo "Skipping adding -lMAKE_LOAD option as -l option is already specified"; \
++ else \
++ make_l="-l${MAKE_LOAD}"; \
++ fi; \
++ cd ${PETSC_DIR} && ${OMAKE_PRINTDIR} -f gmakefile $${make_j} $${make_l} ${MAKE_PAR_OUT_FLG} V=${V} libs
+
+ # Does nothing; needed for some rules that require actions.
+ foo:
+@@ -471,6 +485,7 @@
+ DOCTEXT_PATH=${PETSC_DIR}/doc/classic/doctext \
+ ${DOCTEXT} -myst -mpath ${LOC}/docs/manualpages/$${LMANSEC} -heading PETSc -defn ${PETSC_DIR}/doc/classic/doctext/myst.def \
+ -indexdir ../$${LMANSEC} -index ${LOC}/docs/manualpages/manualpages.cit -locdir ${LOCDIR} -Wargdesc $${doctext_common_def} $${f} 2>&1 | tee -a ${PETSC_DIR}/${PETSC_ARCH}/manualpages.err; \
++ if [ -f "${LOC}/docs/manualpages/$${LMANSEC}" ]; then chmod g+w "${LOC}"/docs/manualpages/$${LMANSEC}/*; fi; \
+ done; \
+ else \
+ if [ "${SUBMANSEC}" = "" ] ; then LMANSEC=${MANSEC}; else LMANSEC=${SUBMANSEC}; fi; \
+@@ -480,6 +495,7 @@
+ DOCTEXT_PATH=${PETSC_DIR}/doc/classic/doctext \
+ ${DOCTEXT} -myst -mpath ${LOC}/docs/manualpages/$${LMANSEC} -heading PETSc -defn ${PETSC_DIR}/doc/classic/doctext/myst.def \
+ -indexdir ../$${LMANSEC} -index ${LOC}/docs/manualpages/manualpages.cit -locdir ${LOCDIR} -Wargdesc $${doctext_common_def} ${SOURCED} 2>&1 | tee -a ${PETSC_DIR}/${PETSC_ARCH}/manualpages.err; \
++ if [ -f "${LOC}/docs/manualpages/$${LMANSEC}" ]; then chmod g+w "${LOC}"/docs/manualpages/$${LMANSEC}/*; fi; \
+ fi;
+ #
+ # Example usage for manual pages; adds each example that uses a function to that functions
+diff --color --unified --recursive --text petsc-3.18.5.orig/makefile petsc-3.18.5.new/makefile
+--- petsc-3.18.5.orig/makefile 2023-03-11 20:17:33.416354360 +0100
++++ petsc-3.18.5.new/makefile 2023-03-11 20:17:57.102844766 +0100
+@@ -122,8 +122,8 @@
+ -@echo "------------------------------------------"
+ -@echo "Using mpiexec: ${MPIEXEC}"
+ -@echo "------------------------------------------"
+- -@echo "Using MAKE: $(MAKE)"
+- -@echo "Using MAKEFLAGS: -j$(MAKE_NP) -l$(MAKE_LOAD) $(MAKEFLAGS)"
++ -@echo "Using MAKE: ${MAKE}"
++ -@echo "Default MAKEFLAGS: MAKE_NP:${MAKE_NP} MAKE_LOAD:${MAKE_LOAD} MAKEFLAGS:${MAKEFLAGS}"
+ -@echo "=========================================="
+
+ #