According to the bug #61868, "zlib-1.2.1-fPIC.patch" is needed. But this patch causes the configure script to fail with sh. On NetBDS, sh is not a link to /bin/bash. * Applying zlib-1.2.1-fPIC.patch ... [ ok ] * Applying zlib-1.2.3-bsd-soname.patch ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/zlib-1.2.3/work/zlib-1.2.3 ... ./configure: 85: Syntax error: ";;" unexpected (expecting "fi") Do we still need this patch?
Okay seems like we ended up using (probably for my soname patch rather than for the -fPIC patch) bash syntax. A sed -i -e 's:/bin/sh:/bin/bash:' ${S}/configure is probably the quickest way to fix that, as we already know the configure file won't be fixed easily by upstream.
no, i'm not about to change it to /bin/bash figure out which patch is the problem so we can fix it as for the fPIC patch, of course we still need it
Okay the problem seems to be with bsd-soname patch as I thought. THe problem is that the sh shell provided by NetBSD (and probably OpenBSD too) doesn't seem to understand correctly the globbed case, that instead is handled fine by FreeBSD's sh. Why can't we just use bash as we do everywhere else? That way we're safe that it's bash running the script.
if your sh cant handle this: case foo in Linux | linux | GNU | GNU/* | *BSD | DragonFly) ;; esac but it can handle this: case foo in Linux | linux | GNU | GNU/*) ;; esac then it sucks, plain and simple post a tweaked version of your patch if you like, but i dont see any merit in changing it to /bin/bash
There's a big misunderstanding here. The problem is the patch "zlib-1.2.1-fPIC.patch". Because it includes the line: SFLAGS="${CFLAGS-"-O3"} -fPIC" Which has a syntax error for NetBSD sh (cuz of ""). This line works fine: SFLAGS="${CFLAGS--O3} -fPIC" This is the things I tested: root@phanty ~ # sh # CFLAGS="-mtune=i686 -O2 -pipe" # SFLAGS="${CFLAGS-"-O3"} -fPIC" > ^C # SFLAGS="${CFLAGS--O3} -fPIC" # echo $SFLAGS -mtune=i686 -O2 -pipe -fPIC # unset CFLAGS # SFLAGS="${CFLAGS--O3} -fPIC" # echo $SFLAGS -O3 -fPIC I've been reading some manuals, and I could not find this "-" alone. It seems to miss the colon, so: SFLAGS="${CFLAGS:--O3} -fPIC" would be more appropriate, wouldn't it? Could any of you change this, please?
fixed in cvs