aboutsummaryrefslogtreecommitdiffstats
path: root/tools/automake
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-10-05 10:12:53 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-10-05 10:12:53 +0000
commit5c105d9f3fd086aff195d3849dcf847d6b0bd927 (patch)
tree1229a11f725bfa58aa7c57a76898553bb5f6654a /tools/automake
downloadopenwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.tar.gz
openwrt-5c105d9f3fd086aff195d3849dcf847d6b0bd927.zip
branch Attitude Adjustment
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/automake')
-rw-r--r--tools/automake/Makefile36
-rwxr-xr-xtools/automake/files/aclocal2
-rw-r--r--tools/automake/patches/000-relocatable.patch46
-rw-r--r--tools/automake/patches/100-aclocal-skip-not-existing-directories.patch15
-rw-r--r--tools/automake/patches/200-fix_missing_py_compile.patch14
5 files changed, 113 insertions, 0 deletions
diff --git a/tools/automake/Makefile b/tools/automake/Makefile
new file mode 100644
index 000000000..63d28bd48
--- /dev/null
+++ b/tools/automake/Makefile
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2006-2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=automake
+PKG_VERSION:=1.11.3
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@GNU/automake
+PKG_MD5SUM:=3d72b2076eb4397ad5e9a2aace6357fd
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_CONFIGURE_ARGS += --datarootdir=$(STAGING_DIR_HOST)/share
+HOST_CONFIGURE_VARS += am_cv_prog_PERL_ithreads=no
+
+define Host/Install
+ $(MAKE) -C $(HOST_BUILD_DIR) install
+ mv $(STAGING_DIR_HOST)/bin/aclocal $(STAGING_DIR_HOST)/bin/aclocal.real
+ $(INSTALL_BIN) ./files/aclocal $(STAGING_DIR_HOST)/bin
+ ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.9
+ ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.10
+ ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.11
+ ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.11.1
+endef
+
+define Host/Clean
+ -$(MAKE) -C $(HOST_BUILD_DIR) uninstall
+ $(call Host/Clean/Default)
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/automake/files/aclocal b/tools/automake/files/aclocal
new file mode 100755
index 000000000..a60df10c4
--- /dev/null
+++ b/tools/automake/files/aclocal
@@ -0,0 +1,2 @@
+#!/usr/bin/env sh
+aclocal.real $ACLOCAL_INCLUDE $@
diff --git a/tools/automake/patches/000-relocatable.patch b/tools/automake/patches/000-relocatable.patch
new file mode 100644
index 000000000..827797c73
--- /dev/null
+++ b/tools/automake/patches/000-relocatable.patch
@@ -0,0 +1,46 @@
+--- a/aclocal.in
++++ b/aclocal.in
+@@ -29,7 +29,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
+
+ BEGIN
+ {
+- my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
++ my $perllibdir = $ENV{'perllibdir'} ||
++ ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@');
+ unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
+ }
+
+@@ -61,8 +62,8 @@ $perl_threads = 0;
+ # ACLOCAL_PATH environment variable, and reset with the `--system-acdir'
+ # option.
+ my @user_includes = ();
+-my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
+-my @system_includes = ('@datadir@/aclocal');
++my @automake_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . "/../host/share/aclocal-$APIVERSION" : "@datadir@/aclocal-$APIVERSION");
++my @system_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/aclocal' : '@datadir@/aclocal');
+
+ # Whether we should copy M4 file in $user_includes[0].
+ my $install = 0;
+--- a/automake.in
++++ b/automake.in
+@@ -31,7 +31,8 @@ package Language;
+
+ BEGIN
+ {
+- my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
++ my $perllibdir = $ENV{'perllibdir'} ||
++ ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@');
+ unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
+
+ # Override SHELL. This is required on DJGPP so that system() uses
+--- a/lib/Automake/Config.in
++++ b/lib/Automake/Config.in
+@@ -31,7 +31,7 @@ our $APIVERSION = '@APIVERSION@';
+ our $PACKAGE = '@PACKAGE@';
+ our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
+ our $VERSION = '@VERSION@';
+-our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
++our $libdir = $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@';
+ our $perl_threads = @PERL_THREADS@;
+
+ 1;
diff --git a/tools/automake/patches/100-aclocal-skip-not-existing-directories.patch b/tools/automake/patches/100-aclocal-skip-not-existing-directories.patch
new file mode 100644
index 000000000..7829d0ecd
--- /dev/null
+++ b/tools/automake/patches/100-aclocal-skip-not-existing-directories.patch
@@ -0,0 +1,15 @@
+--- a/aclocal.in
++++ b/aclocal.in
+@@ -314,6 +314,12 @@ sub scan_m4_dirs ($@)
+
+ foreach my $m4dir (@dirlist)
+ {
++ if (! -d $m4dir)
++ {
++ msg ('override', "warning: skipping not existing directory `$m4dir'");
++ next;
++ }
++
+ if (! opendir (DIR, $m4dir))
+ {
+ fatal "couldn't open directory `$m4dir': $!";
diff --git a/tools/automake/patches/200-fix_missing_py_compile.patch b/tools/automake/patches/200-fix_missing_py_compile.patch
new file mode 100644
index 000000000..b03bdff00
--- /dev/null
+++ b/tools/automake/patches/200-fix_missing_py_compile.patch
@@ -0,0 +1,14 @@
+Index: automake-1.11.3/lib/am/python.am
+===================================================================
+--- automake-1.11.3.orig/lib/am/python.am 2012-01-31 12:41:18.000000000 +0100
++++ automake-1.11.3/lib/am/python.am 2012-06-07 16:42:53.488515898 +0200
+@@ -23,8 +23,8 @@
+ ## Installing. ##
+ ## ------------ ##
+
+-if %?INSTALL%
+ ?FIRST?am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
++if %?INSTALL%
+ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
+ .PHONY install-%EXEC?exec:data%-am: install-%DIR%PYTHON
+ install-%DIR%PYTHON: $(%DIR%_PYTHON)