… | |
… | |
29 | esac |
29 | esac |
30 | |
30 | |
31 | # -Wl,--gc-sections makes it impossible to check for undefined references |
31 | # -Wl,--gc-sections makes it impossible to check for undefined references |
32 | # for some reason so we need to patch away the "-no" after Configure and before make :/ |
32 | # for some reason so we need to patch away the "-no" after Configure and before make :/ |
33 | # --allow-multiple-definition exists to work around uclibc's pthread static linking bug |
33 | # --allow-multiple-definition exists to work around uclibc's pthread static linking bug |
34 | PERL_LDFLAGS="-Wl,--no-gc-sections -Wl,--allow-multiple-definition" |
34 | #PERL_LDFLAGS="-Wl,--no-gc-sections -Wl,--allow-multiple-definition" |
|
|
35 | PERL_LDFLAGS= |
35 | PERL_LIBS="-lm -lcrypt" # perl loves to add lotsa crap itself |
36 | PERL_LIBS="-lm -lcrypt" # perl loves to add lotsa crap itself |
36 | |
37 | |
37 | # some configuration options for modules |
38 | # some configuration options for modules |
38 | PERL_MM_USE_DEFAULT=1 |
39 | PERL_MM_USE_DEFAULT=1 |
39 | #CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow |
40 | #CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow |
… | |
… | |
47 | # which extra modules you might want to install |
48 | # which extra modules you might want to install |
48 | EXTRA_MODULES="" |
49 | EXTRA_MODULES="" |
49 | |
50 | |
50 | # overridable functions |
51 | # overridable functions |
51 | preconfigure() { : ; } |
52 | preconfigure() { : ; } |
|
|
53 | patchconfig() { : ; } |
52 | postconfigure() { : ; } |
54 | postconfigure() { : ; } |
53 | postbuild() { : ; } |
55 | postbuild() { : ; } |
54 | postinstall() { : ; } |
56 | postinstall() { : ; } |
55 | |
57 | |
56 | # now source user config, if any |
58 | # now source user config, if any |
… | |
… | |
71 | unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG |
73 | unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG |
72 | LC_ALL=C; export LC_ALL # just to be on the safe side |
74 | LC_ALL=C; export LC_ALL # just to be on the safe side |
73 | |
75 | |
74 | # set version in a way that Makefile.PL can extract |
76 | # set version in a way that Makefile.PL can extract |
75 | VERSION=VERSION; eval \ |
77 | VERSION=VERSION; eval \ |
76 | $VERSION="1.2" |
78 | $VERSION="1.21" |
77 | |
79 | |
78 | BZ2=bz2 |
80 | BZ2=bz2 |
79 | BZIP2=bzip2 |
81 | BZIP2=bzip2 |
80 | |
82 | |
81 | fatal() { |
83 | fatal() { |
… | |
… | |
165 | unpacking perl |
167 | unpacking perl |
166 | EOF |
168 | EOF |
167 | |
169 | |
168 | mkdir -p unpack |
170 | mkdir -p unpack |
169 | rm -rf unpack/perl-$PERL_VERSION |
171 | rm -rf unpack/perl-$PERL_VERSION |
170 | $BZIP2 -d <perl-$PERL_VERSION.tar.$BZ2 | ( cd unpack && tar x ) \ |
172 | $BZIP2 -d <perl-$PERL_VERSION.tar.$BZ2 | ( cd unpack && tar xf - ) \ |
171 | || fatal "perl-$PERL_VERSION.tar.$BZ2: error during unpacking" |
173 | || fatal "perl-$PERL_VERSION.tar.$BZ2: error during unpacking" |
172 | chmod -R u+w unpack/perl-$PERL_VERSION |
174 | chmod -R u+w unpack/perl-$PERL_VERSION |
173 | mv unpack/perl-$PERL_VERSION perl-$PERL_VERSION |
175 | mv unpack/perl-$PERL_VERSION perl-$PERL_VERSION |
174 | rmdir -p unpack |
176 | rmdir -p unpack |
175 | fi |
177 | fi |
… | |
… | |
227 | |
229 | |
228 | # I hate them for this |
230 | # I hate them for this |
229 | grep -q -- -fstack-protector Configure && \ |
231 | grep -q -- -fstack-protector Configure && \ |
230 | sedreplace 's/-fstack-protector/-fno-stack-protector/g' Configure |
232 | sedreplace 's/-fstack-protector/-fno-stack-protector/g' Configure |
231 | |
233 | |
232 | preconfigure |
234 | # what did that bloke think |
|
|
235 | grep -q -- usedl=.define hints/darwin.sh && \ |
|
|
236 | sedreplace '/^usedl=.define.;$/d' hints/darwin.sh |
|
|
237 | |
|
|
238 | preconfigure || fatal "preconfigure hook failed" |
233 | |
239 | |
234 | # trace configure \ |
240 | # trace configure \ |
235 | sh Configure -Duselargefiles \ |
241 | sh Configure -Duselargefiles \ |
236 | -Uuse64bitint \ |
242 | -Uuse64bitint \ |
237 | -Dusemymalloc=n \ |
243 | -Dusemymalloc=n \ |
… | |
… | |
269 | sedreplace ' |
275 | sedreplace ' |
270 | s/-Wl,--no-gc-sections/-Wl,--gc-sections/g |
276 | s/-Wl,--no-gc-sections/-Wl,--gc-sections/g |
271 | s/ *-fno-stack-protector */ /g |
277 | s/ *-fno-stack-protector */ /g |
272 | ' config.sh |
278 | ' config.sh |
273 | |
279 | |
|
|
280 | patchconfig || fatal "patchconfig hook failed" |
|
|
281 | |
274 | sh Configure -S || fatal "Configure -S failed" |
282 | sh Configure -S || fatal "Configure -S failed" |
275 | |
283 | |
276 | postconfigure || fatal "postconfigure hook failed" |
284 | postconfigure || fatal "postconfigure hook failed" |
277 | |
285 | |
278 | touch staticstamp.configure |
286 | touch staticstamp.configure |