diff options
author | tv <tv@pkgsrc.org> | 2004-10-15 21:02:29 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2004-10-15 21:02:29 +0000 |
commit | 5bb3539a3ce65bd2ab8c2e23cc837648a34bde88 (patch) | |
tree | 17f4c5158e5850899f0493d6051703f918c1cf16 /x11 | |
parent | a8c92cb2940ed0f9138760eda74a248639f99747 (diff) | |
download | pkgsrc-5bb3539a3ce65bd2ab8c2e23cc837648a34bde88.tar.gz |
Apparently, librep is a gross abuser of libtool, and breaks most of
libtool's rules about linking and installing. Worse yet, it encourages
users of the library to reuse its libtool abuse. So we have to whack the
installed .la files to make them correct as if libtool were *correctly*
invoked in the first place.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/rep-gtk/Makefile | 31 | ||||
-rw-r--r-- | x11/rep-gtk/PLIST | 4 | ||||
-rw-r--r-- | x11/rep-gtk/files/fix-la | 15 |
3 files changed, 39 insertions, 11 deletions
diff --git a/x11/rep-gtk/Makefile b/x11/rep-gtk/Makefile index bbf7e52866e..64da2d0005c 100644 --- a/x11/rep-gtk/Makefile +++ b/x11/rep-gtk/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.26 2004/10/03 00:18:38 tv Exp $ +# $NetBSD: Makefile,v 1.27 2004/10/15 21:02:29 tv Exp $ DISTNAME= rep-gtk-0.15 -PKGREVISION= 6 +PKGREVISION= 7 CATEGORIES= x11 lang MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=rep-gtk/} @@ -14,7 +14,6 @@ USE_LIBTOOL= yes GNU_CONFIGURE= yes USE_GNU_TOOLS+= make -PLIST_SRC= ${WRKDIR}/.PLIST_SRC REPEXECDIR= libexec/rep/${MACHINE_GNU_PLATFORM} INSTALL_ALIASES= ${PREFIX}/${REPEXECDIR}/install-aliases @@ -23,13 +22,25 @@ INSTALL_ALIASES= ${PREFIX}/${REPEXECDIR}/install-aliases .include "../../lang/librep/buildlink3.mk" .include "../../x11/gnome-libs/buildlink3.mk" -post-install: +post-install: fix-libs ${INSTALL_ALIASES} -c ${FILESDIR} ${PREFIX}/${REPEXECDIR} - ${RM} -f ${PLIST_SRC} - cd ${PREFIX} && ${FIND} ${REPEXECDIR} \ - -name "gnomelib.*" -print > ${PLIST_SRC} - cd ${PREFIX} && ${FIND} ${REPEXECDIR}/gui/gnome \ - -name "lib.*" -print >> ${PLIST_SRC} - ${CAT} ${PKGDIR}/PLIST >> ${PLIST_SRC} + +# Apparently, librep is a gross abuser of libtool, and breaks most of +# libtool's rules about linking and installing. Worse yet, it encourages +# users of the library to reuse its libtool abuse. So we have to whack the +# installed .la files to make them correct as if libtool were *correctly* +# invoked in the first place. +fix-libs: +.for lib in gdk-pixbuf.la gnome-canvas-pixbuf.la gnome-canvas.la \ + gnomelib.la gnomeui.la gtk.la gui/gnome.la \ + gui/gnome/canvas-pixbuf.la gui/gnome/canvas.la \ + gui/gnome/libglade.la gui/gnome/lib.la gui/gnome/ui.la \ + gui/gtk.la gui/gtk/gdk-pixbuf.la gui/gtk/gtk.la \ + gui/gtk/libglade.la gui/gtk/types.la libglade-gnome.la \ + libglade.la sgtk-types.la + ${SETENV} WRKDIR=${WRKDIR:Q} INSTALL_DATA=${INSTALL_DATA:Q} \ + ${SH} ${FILESDIR}/fix-la \ + ${PREFIX}/libexec/rep/${MACHINE_GNU_PLATFORM}/${lib} +.endfor .include "../../mk/bsd.pkg.mk" diff --git a/x11/rep-gtk/PLIST b/x11/rep-gtk/PLIST index 7284a4ecfe4..c8fdda5f201 100644 --- a/x11/rep-gtk/PLIST +++ b/x11/rep-gtk/PLIST @@ -1,12 +1,14 @@ -@comment $NetBSD: PLIST,v 1.2 2004/09/22 08:10:07 jlam Exp $ +@comment $NetBSD: PLIST,v 1.3 2004/10/15 21:02:29 tv Exp $ libexec/rep/${MACHINE_GNU_PLATFORM}/gdk-pixbuf.la libexec/rep/${MACHINE_GNU_PLATFORM}/gnome-canvas-pixbuf.la libexec/rep/${MACHINE_GNU_PLATFORM}/gnome-canvas.la +libexec/rep/${MACHINE_GNU_PLATFORM}/gnomelib.la libexec/rep/${MACHINE_GNU_PLATFORM}/gnomeui.la libexec/rep/${MACHINE_GNU_PLATFORM}/gtk.la libexec/rep/${MACHINE_GNU_PLATFORM}/gui/gnome.la libexec/rep/${MACHINE_GNU_PLATFORM}/gui/gnome/canvas-pixbuf.la libexec/rep/${MACHINE_GNU_PLATFORM}/gui/gnome/canvas.la +libexec/rep/${MACHINE_GNU_PLATFORM}/gui/gnome/lib.la libexec/rep/${MACHINE_GNU_PLATFORM}/gui/gnome/libglade.la libexec/rep/${MACHINE_GNU_PLATFORM}/gui/gnome/ui.la libexec/rep/${MACHINE_GNU_PLATFORM}/gui/gtk.la diff --git a/x11/rep-gtk/files/fix-la b/x11/rep-gtk/files/fix-la new file mode 100644 index 00000000000..60905f22c12 --- /dev/null +++ b/x11/rep-gtk/files/fix-la @@ -0,0 +1,15 @@ +#!/bin/sh +# $NetBSD: fix-la,v 1.1 2004/10/15 21:02:30 tv Exp $ + +libdir=$(dirname $1) +libfile=$(basename $1) +libname=${libfile%.la} +linkedname=$(head -1 $1 | sed 's,^.* \([^ \.]*\)\.la.*$,\1,') + +(sed -e ' + /^library_names=/s:'"$linkedname"'\.:'"$libname"'\.:g + /^old_library=/s:'"$linkedname"'\.:'"$libname"'\.:g + /^libdir=/s:=.*$:='"'$libdir'"': +' $1 >$WRKDIR/fix-la.tmp && +rm -f $1 && +${INSTALL_DATA} -c $WRKDIR/fix-la.tmp $1) || exit 1 |