From 17111557c06948edf2599934d02ba393a54ae8db Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 26 Aug 2023 15:19:32 -0700 Subject: [PATCH] sage/spkg-src: Adjust for building out of git repo --- sage/spkg-src | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/sage/spkg-src b/sage/spkg-src index 1b4b2d0..1034116 100755 --- a/sage/spkg-src +++ b/sage/spkg-src @@ -9,7 +9,7 @@ set -e ORIGDIR=`pwd` SRC=`pwd` -SAGEPATCHES=$ORIGDIR/sage +SAGEPATCHES=$ORIGDIR/sage/patches # remove unnecessary files rm -rf $SRC/doc/pari/*.html @@ -20,24 +20,24 @@ sed -E -i.bak '/XCASHTML/s/[^ ]*[.](wasm|js)//g' $SRC/doc/Makefile.am # removing french html doc, but keep keywords, and working makefiles. # NB: the french html doc is huge and not GPL. # it is freely redistributable only for non commercial purposes. -cd $SRC/doc/fr -rm -rf [^Mkx]* -rm -rf *.pdf *.eps *.pdf *.png *.cxx *.cas *.jpg *.tex *.stamp *html* cas* *.fig fig* -# repair the build procedure with a minimal Makefile.am -echo -e "EXTRA_DIST = xcasmenu xcasex keywords\n\nlocaldocdir = \$(docdir)/fr \n\n\ -dist_localdoc_DATA = xcasmenu xcasex keywords html_mall html_mtt html_vall">Makefile.am -# copy and adjust a minimal Makefile.in -cp ../local/Makefile.in ./ -sed -ie 's|localdocdir = $(docdir)/local|localdocdir = $(docdir)/fr|' Makefile.in -sed -ie 's|doc/local|subdir = doc/fr|g' Makefile.in -# -touch html_mall -touch html_mtt -touch html_vall -# - -# building giac source tarball for the spkg -cd ../../ +if [ -d "$SRC/doc/fr" ]; then + cd $SRC/doc/fr + rm -rf [^Mkx]* + rm -rf *.pdf *.eps *.pdf *.png *.cxx *.cas *.jpg *.tex *.stamp *html* cas* *.fig fig* + # repair the build procedure with a minimal Makefile.am + echo -e "EXTRA_DIST = xcasmenu xcasex keywords\n\nlocaldocdir = \$(docdir)/fr \n\n\ + dist_localdoc_DATA = xcasmenu xcasex keywords html_mall html_mtt html_vall">Makefile.am + # copy and adjust a minimal Makefile.in + cp ../local/Makefile.in ./ + sed -ie 's|localdocdir = $(docdir)/local|localdocdir = $(docdir)/fr|' Makefile.in + sed -ie 's|doc/local|subdir = doc/fr|g' Makefile.in + # + touch html_mall + touch html_mtt + touch html_vall + # building giac source tarball for the spkg + cd ../../ +fi # get rid of micropython rm -rf micropython*