added autoconf

This commit is contained in:
Ella-0 2021-09-30 13:45:58 +01:00
parent 41fc569409
commit 28b6b47c23
4 changed files with 135 additions and 0 deletions

View file

@ -0,0 +1,23 @@
--- a/autoconf.sh
+++ b/autoconf.sh
@@ -115,13 +115,14 @@
# Use the frozen version of Autoconf if available.
r= f=
# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
-case `$M4 --help < /dev/null 2>&1` in
-*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
-*traditional*) ;;
-*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
-esac
+# case `$M4 --help < /dev/null 2>&1` in
+# *reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
+# *traditional*) ;;
+# *) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
+# esac
-$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
+# $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
+$M4 -g -D__GNU__ -I$AC_MACRODIR $use_localdir autoconf.m4 $infile -> $tmpout ||
{ rm -f $tmpin $tmpout; exit 2; }
# You could add your own prefixes to pattern if you wanted to check for

View file

@ -0,0 +1,11 @@
--- autoconf-2.13/autoheader.sh
+++ old/autoheader.sh
@@ -122,7 +122,7 @@
# Extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
# modified autoconf processing of the input file. The sed hair is
# necessary to win for multi-line macro invocations.
-eval "`$M4 -I$AC_MACRODIR $use_localdir $r autoheader.m4$f $infile |
+eval "`$M4 -g -D__gnu__ -I$AC_MACRODIR $use_localdir autoheader.m4 $infile |
sed -n -e '
: again
/^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p

31
bad/autoconf/build.sh Normal file
View file

@ -0,0 +1,31 @@
pkgname=autoconf
pkgver=2.13
fetch() {
curl "https://ftp.gnu.org/gnu/autoconf/autoconf-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz
tar -xf $pkgname-$pkgver.tar.gz
cd $pkgname-$pkgver
patch -p1 < ../../makefile-m4f.patch
patch -p1 < ../../autoconf.sh.patch
patch -p1 < ../../autoheader.sh.patch
}
build() {
cd $pkgname-$pkgver
./configure \
--prefix=/usr \
--build=$TRIPLE \
--host=$TRIPLE
make
}
package() {
cd $pkgname-$pkgver
make install DESTDIR=$pkgdir
}
license() {
cd $pkgname-$pkgver
cat COPYING
}

View file

@ -0,0 +1,70 @@
--- src/autoconf-2.13/Makefile.in
+++ Makefile.in
@@ -33,8 +33,8 @@
# Programs that are ALWAYS installed (and are created in the build dir).
ASCRIPTS = autoconf autoheader autoreconf autoupdate ifnames
-# M4 input that is frozen.
-M4FROZEN = autoconf.m4f autoheader.m4f
+# Don't freeze anything with OpenBSD m4
+M4FROZEN =
# All programs, including those only installed if you have perl.
SCRIPTS = $(ASCRIPTS) @SCRIPTS@
--- a/Makefile.in
+++ b/Makefile.in
@@ -137,23 +137,23 @@
cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
installdirs:
- $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(acdatadir)
install: all $(M4FILES) acconfig.h installdirs install-info
for p in $(ASCRIPTS); do \
- $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \
done
for i in $(M4FROZEN); do \
- $(INSTALL_DATA) $$i $(acdatadir)/$$i; \
+ $(INSTALL_DATA) $$i $(DESTDIR)/$(acdatadir)/$$i; \
done
for i in $(M4FILES) acconfig.h; do \
- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
done
-if test -f autoscan; then \
- $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
+ $(INSTALL_PROGRAM) autoscan $(DESTDIR)/$(bindir)/`echo autoscan|sed '$(transform)'`; \
for i in acfunctions acheaders acidentifiers acprograms \
acmakevars; do \
- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
done; \
else :; fi
@@ -161,11 +161,11 @@
install-info: info installdirs
if test -f autoconf.info; then \
for i in *.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i; \
+ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/$$i; \
done; \
else \
for i in $(srcdir)/*.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
+ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
done; \
fi
--- a/Makefile.in
+++ b/Makefile.in
@@ -139,7 +139,7 @@
installdirs:
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(infodir) $(DESTDIR)/$(acdatadir)
-install: all $(M4FILES) acconfig.h installdirs install-info
+install: all $(M4FILES) acconfig.h installdirs
for p in $(ASCRIPTS); do \
$(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \
done