summaryrefslogtreecommitdiffstats
path: root/archive/p7zip/PRE_BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'archive/p7zip/PRE_BUILD')
-rwxr-xr-xarchive/p7zip/PRE_BUILD24
1 files changed, 24 insertions, 0 deletions
diff --git a/archive/p7zip/PRE_BUILD b/archive/p7zip/PRE_BUILD
new file mode 100755
index 0000000000..e04e282398
--- /dev/null
+++ b/archive/p7zip/PRE_BUILD
@@ -0,0 +1,24 @@
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+
+sedit "s|/usr/local|$INSTALL_ROOT/usr|g" makefile &&
+
+# make sure make is using our CFLAGS, see also the sedit below
+sedit "s|CFLAGS=|CFLAGS=$CFLAGS |g" makefile.glb &&
+
+case "${HOST%%-*}" in
+i*86 | ppc | alpha)
+ cp makefile.linux_x86_ppc_alpha makefile.machine
+ ;;
+x86_64)
+ cp makefile.linux_amd64 makefile.machine
+ ;;
+#sparc*)
+# ;;
+*)
+ message "${ERROR_COLOR}Unsupported architecture${DEFAULT_COLOR}" &&
+ false
+ ;;
+esac &&
+# we need double backslash for sed, so we have to give quadruple one here
+sedit "s|ALLFLAGS=.*\\\\|ALLFLAGS=$CFLAGS \\\\|g" makefile.machine