summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-09-09 10:28:05 +0000
committerMike Frysinger <vapier@gentoo.org>2006-09-09 10:28:05 +0000
commit88fad6afef6e5c4af57b34b30444ab2ec1e18d0a (patch)
tree079166506b190d0059afefdf7c87b1662a8f16f1 /sys-libs/ss/files
parentpunt old files and update manifest for #146921 (diff)
downloadhistorical-88fad6afef6e5c4af57b34b30444ab2ec1e18d0a.tar.gz
historical-88fad6afef6e5c4af57b34b30444ab2ec1e18d0a.tar.bz2
historical-88fad6afef6e5c4af57b34b30444ab2ec1e18d0a.zip
Cleanup ugly build code #146903 by throw_away_2002.
Package-Manager: portage-2.1.1_rc1-r6
Diffstat (limited to 'sys-libs/ss/files')
-rw-r--r--sys-libs/ss/files/ss-1.39-parse-types.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/sys-libs/ss/files/ss-1.39-parse-types.patch b/sys-libs/ss/files/ss-1.39-parse-types.patch
new file mode 100644
index 000000000000..8af9128d6591
--- /dev/null
+++ b/sys-libs/ss/files/ss-1.39-parse-types.patch
@@ -0,0 +1,53 @@
+make this script suck less:
+ - dont use known files in /tmp
+ - dont use absolute paths to headers
+ - dont hardcode gcc/cc
+ - dont spit out warnings about incompat func types
+
+http://bugs.gentoo.org/146903
+
+--- config/parse-types.sh
++++ config/parse-types.sh
+@@ -1,27 +1,20 @@
+ #!/bin/sh
+
+-ASM_TYPES=/usr/include/asm/types.h
+-
+-if test ! -f $ASM_TYPES
+-then
+- echo "" > asm_types.h
+- echo "No asm_types file found"
+- exit 1
+-fi
+-
+-cat > /tmp/sed.script << "EOF"
++echo '#include <asm/types.h>' | ${CPP-${CC-gcc} -E} - | sed \
++"
+ /^#/d
+ /^$/d
+ s/__extension__ //
+ s/typedef \(.*\) __u\([1-9]*\);/#define __U\2_TYPEDEF \1/
+ s/typedef \(.*\) __s\([1-9]*\);/#define __S\2_TYPEDEF \1/
+-EOF
+-
+-gcc -E $ASM_TYPES | sed -f /tmp/sed.script | grep ^# > asm_types.h
++" \
++| grep ^# > asm_types.h
+
+ cp asm_types.h asm_types.c
+
+ cat >> asm_types.c <<EOF
++#include <stdio.h>
++#include <stdlib.h>
+ main(int argc, char **argv)
+ {
+ #ifdef __U8_TYPEDEF
+@@ -102,7 +95,7 @@
+ }
+ EOF
+
+-cc -o asm_types asm_types.c
++${BUILD_CC-gcc} -o asm_types asm_types.c
+ if ! ./asm_types
+ then
+ echo "Problem detected with asm_types.h"