Subject: libtools patch for Linux/dash
To: None <tech-pkg@netbsd.org>
From: Aleksey Cheusov <cheusov@tut.by>
List: tech-pkg
Date: 09/01/2006 11:21:17
--=-=-=

I'm using pkgsrc-2006Q2 on Linux,
Debian/Sarge, /bin/sh=dash, if it does matter.

Building some packages failes the same way because of incorrect
sed invocation, as you can something eats \1.

How about patching /usr/pkg/bin/libtool?
I just change sed 's/\(.*\)/\1;/' with simplier sed 's/.*/&;/'


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=libtool.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: libtool patch

--- libtool.orig	2006-08-31 19:52:23.000000000 +0300
+++ libtool	2006-09-01 10:23:08.000000000 +0300
@@ -213,7 +213,7 @@
 # Commands used to build and install a shared archive.
 archive_cmds=3D"\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-s=
oname \$wl\$soname -o \$lib"
 archive_expsym_cmds=3D"\$echo \\\"{ global:\\\" > \$output_objdir/\$libnam=
e.ver~
-  cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/=01;/\\\" >> \$output_o=
bjdir/\$libname.ver~
+  cat \$export_symbols | sed -e 's/.*/=01;/' >> \$output_objdir/\$libname.=
ver~
   \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
 	  \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$s=
oname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
 postinstall_cmds=3D""
@@ -7784,7 +7784,7 @@
 # Commands used to build and install a shared archive.
 archive_cmds=3D"\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-s=
oname \$wl\$soname -o \$lib"
 archive_expsym_cmds=3D"\$echo \\\"{ global:\\\" > \$output_objdir/\$libnam=
e.ver~
-  cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/=01;/\\\" >> \$output_o=
bjdir/\$libname.ver~
+  cat \$export_symbols | sed -e 's/.*/=01;/' >> \$output_objdir/\$libname.=
ver~
   \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
 	  \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$s=
oname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
 postinstall_cmds=3D""

--=-=-=


##################### xmms ####################
 cat .libs/libOSS.exp | sed -e "s/\(.*\)/;/" >> .libs/libOSS.ver
 echo "local: *; };" >> .libs/libOSS.ver
 gcc -shared  .libs/OSS.o .libs/mixer.o .libs/about.o .libs/configure.o .libs/audio.o .libs/init.o .libs/convert.o  -Wl,--rpath -Wl,/home/cheusov/tmp/pkgsrc/audio/xmms/work.cheusov/.buildlink/lib -Wl,--rpath -Wl,/home/cheusov/tmp/pkgsrc/audio/xmms/work.cheusov/.buildlink/lib -L/home/cheusov/tmp/pkgsrc/audio/xmms/work.cheusov/.buildlink/lib -L/home/cheusov/tmp/pkgsrc/audio/xmms/work.cheusov/.x11-buildlink/lib /home/cheusov/tmp/pkgsrc/audio/xmms/work.cheusov/.buildlink/lib/libgtk.so /home/cheusov/tmp/pkgsrc/audio/xmms/work.cheusov/.buildlink/lib/libgdk.so /home/cheusov/tmp/pkgsrc/audio/xmms/work.cheusov/.buildlink/lib/libgmodule.so /home/cheusov/tmp/pkgsrc/audio/xmms/work.cheusov/.buildlink/lib/libgthread.so /home/cheusov/tmp/pkgsrc/audio/xmms/work.cheusov/.buildlink/lib/libglib.so -ldl -lXi -lXext -lX11 -lm -lpthread  -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R6/lib -Wl,-soname -Wl,libOSS.so -Wl,-version-script -Wl,.libs/libOSS.ver -o .libs/libOSS.so
/usr/bin/ld:.libs/libOSS.ver:2: parse error in VERSION script
collect2: ld returned 1 exit status
make[3]: *** [libOSS.la] Error 1

##################### libexif ####################

echo "{ global:" > .libs/libexif.ver
 cat ./libexif.sym | sed -e "s/\(.*\)/;/" >> .libs/libexif.ver
 echo "local: *; };" >> .libs/libexif.ver
 gcc -shared  .libs/exif-byte-order.o .libs/exif-content.o .libs/exif-data.o .libs/exif-entry.o .libs/exif-format.o .libs/exif-ifd.o .libs/exif-loader.o .libs/exif-log.o .libs/exif-mem.o .libs/exif-mnote-data.o .libs/exif-tag.o .libs/exif-utils.o -Wl,--whole-archive canon/.libs/libmnote-canon.a olympus/.libs/libmnote-olympus.a pentax/.libs/libmnote-pentax.a -Wl,--no-whole-archive  -lm -L/home/cheusov/tmp/pkgsrc/graphics/libexif/work.cheusov/.buildlink/lib  -Wl,-R/usr/pkg/lib -Wl,-soname -Wl,libexif.so.12 -Wl,-version-script -Wl,.libs/libexif.ver -o .libs/libexif.so.12.0.1
/usr/bin/ld:.libs/libexif.ver:2: ignoring invalid character `\001' in script
/usr/bin/ld:.libs/libexif.ver:2: parse error in VERSION script
collect2: ld returned 1 exit status

-- 
Best regards, Aleksey Cheusov.

--=-=-=--