summaryrefslogtreecommitdiff
path: root/packages-i486-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'packages-i486-stage1')
-rw-r--r--packages-i486-stage1/acl6
-rw-r--r--packages-i486-stage1/attr8
-rw-r--r--packages-i486-stage1/bash2
-rw-r--r--packages-i486-stage1/db5
-rw-r--r--packages-i486-stage1/gdbm5
-rw-r--r--packages-i486-stage1/gmp8
-rw-r--r--packages-i486-stage1/joe2
-rw-r--r--packages-i486-stage1/ncurses1
-rw-r--r--packages-i486-stage1/perl22
-rw-r--r--packages-i486-stage1/readline3
10 files changed, 60 insertions, 2 deletions
diff --git a/packages-i486-stage1/acl b/packages-i486-stage1/acl
new file mode 100644
index 0000000..f34036f
--- /dev/null
+++ b/packages-i486-stage1/acl
@@ -0,0 +1,6 @@
+# acl is needed by almost all packages dealing with the filesystem, most
+# prominently 'coreutils'
+SYSROOT_INSTALL=1
+
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
diff --git a/packages-i486-stage1/attr b/packages-i486-stage1/attr
new file mode 100644
index 0000000..dfe2f65
--- /dev/null
+++ b/packages-i486-stage1/attr
@@ -0,0 +1,8 @@
+# attr is needed by acl
+SYSROOT_INSTALL=1
+
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
+
+# no gettext
+sed -i 's@^makedepends\(.*\)@#makedepends\1@g' PKGBUILD
diff --git a/packages-i486-stage1/bash b/packages-i486-stage1/bash
new file mode 100644
index 0000000..8ed7de8
--- /dev/null
+++ b/packages-i486-stage1/bash
@@ -0,0 +1,2 @@
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
diff --git a/packages-i486-stage1/db b/packages-i486-stage1/db
new file mode 100644
index 0000000..fe5a83a
--- /dev/null
+++ b/packages-i486-stage1/db
@@ -0,0 +1,5 @@
+# db is needed by perl
+SYSROOT_INSTALL=1
+
+# prepare configure for cross-compilation
+sed -i "s@\.\./dist/configure@../dist/configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
diff --git a/packages-i486-stage1/gdbm b/packages-i486-stage1/gdbm
new file mode 100644
index 0000000..73ce19a
--- /dev/null
+++ b/packages-i486-stage1/gdbm
@@ -0,0 +1,5 @@
+# gdbm is needed by perl
+SYSROOT_INSTALL=1
+
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
diff --git a/packages-i486-stage1/gmp b/packages-i486-stage1/gmp
new file mode 100644
index 0000000..73a6530
--- /dev/null
+++ b/packages-i486-stage1/gmp
@@ -0,0 +1,8 @@
+# gmp is needed by coreutils (later for gawk, gcc)
+SYSROOT_INSTALL=1
+
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
+
+# remove explicit CHOST for build host
+sed -i 's@--build=${CHOST}@@g' PKGBUILD
diff --git a/packages-i486-stage1/joe b/packages-i486-stage1/joe
new file mode 100644
index 0000000..8ed7de8
--- /dev/null
+++ b/packages-i486-stage1/joe
@@ -0,0 +1,2 @@
+# prepare configure for cross-compilation
+sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
diff --git a/packages-i486-stage1/ncurses b/packages-i486-stage1/ncurses
index e0508d6..f74cd4e 100644
--- a/packages-i486-stage1/ncurses
+++ b/packages-i486-stage1/ncurses
@@ -1,4 +1,5 @@
# ncurses is needed by bash
SYSROOT_INSTALL=1
+# prepare configure for cross-compilation
sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD
diff --git a/packages-i486-stage1/perl b/packages-i486-stage1/perl
index 1225990..6626e6b 100644
--- a/packages-i486-stage1/perl
+++ b/packages-i486-stage1/perl
@@ -1,2 +1,24 @@
# cross-compiling perl doesn't work in parallel
NOPARALLEL_BUILD=1
+
+# the official cross-compilation support in Perl is weird and needs a
+# running remote SSH access to the real machine:
+# https://stackoverflow.com/questions/5464538/cross-compile-perl-for-arm
+#
+# we go with https://arsv.github.io/perl-cross/
+sed -i '/source=/ a\ https://github.com/arsv/perl-cross/releases/download/1.1.8/perl-cross-1.1.8.tar.gz' PKGBUILD
+sed -i "/md5sums=/ a\ 'SKIP'" PKGBUILD
+sed -i '1!N; /prepare() *{\n *cd/ a \ tar --strip-components=1 -zxf ${srcdir}/perl-cross-1.1.8.tar.gz' PKGBUILD
+sed -i "s@./Configure -des@./configure --target=$TARGET_ARCH@" PKGBUILD
+
+# rm: cannot remove '/home/cross/build/perl/pkg/perl/usr/bin/perl5.26.1': No such file or directory
+sed -i 's@\(rm "$pkgdir/usr/bin/perl$pkgver\)@#\1@g' PKGBUILD
+
+# the hook fails as we lack some findtools and sed
+# pacman does not have a --no-execute-hooks mode
+#Can't open /dev/null: No such file or directory
+#/usr/share/libalpm/scripts/detect-old-perl-modules.sh: line 8: find: command not found
+#/usr/share/libalpm/scripts/detect-old-perl-modules.sh: line 19: pacman: command not found
+#/usr/share/libalpm/scripts/detect-old-perl-modules.sh: line 19: wc: command not found
+#/usr/share/libalpm/scripts/detect-old-perl-modules.sh: line 25: wc: command not found
+#/usr/share/libalpm/scripts/detect-old-perl-modules.sh: line 13: sed: command not found
diff --git a/packages-i486-stage1/readline b/packages-i486-stage1/readline
index 0edad31..205f8d5 100644
--- a/packages-i486-stage1/readline
+++ b/packages-i486-stage1/readline
@@ -1,6 +1,5 @@
# libreadline is needed by bash
SYSROOT_INSTALL=1
-NOPARALLEL_BUILD=1
-
+# prepare configure for cross-compilation
sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD