pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/rep-gtk Apparently, librep is a gross abuser of li...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3fcad0479de1
branches:  trunk
changeset: 481970:3fcad0479de1
user:      tv <tv%pkgsrc.org@localhost>
date:      Fri Oct 15 21:02:29 2004 +0000

description:
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:

 x11/rep-gtk/Makefile     |  31 +++++++++++++++++++++----------
 x11/rep-gtk/PLIST        |   4 +++-
 x11/rep-gtk/files/fix-la |  15 +++++++++++++++
 3 files changed, 39 insertions(+), 11 deletions(-)

diffs (92 lines):

diff -r 7efe0ab017b0 -r 3fcad0479de1 x11/rep-gtk/Makefile
--- a/x11/rep-gtk/Makefile      Fri Oct 15 20:54:02 2004 +0000
+++ b/x11/rep-gtk/Makefile      Fri Oct 15 21:02:29 2004 +0000
@@ -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 @@
 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 @@
 .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 -r 7efe0ab017b0 -r 3fcad0479de1 x11/rep-gtk/PLIST
--- a/x11/rep-gtk/PLIST Fri Oct 15 20:54:02 2004 +0000
+++ b/x11/rep-gtk/PLIST Fri Oct 15 21:02:29 2004 +0000
@@ -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 -r 7efe0ab017b0 -r 3fcad0479de1 x11/rep-gtk/files/fix-la
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/rep-gtk/files/fix-la  Fri Oct 15 21:02:29 2004 +0000
@@ -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



Home | Main Index | Thread Index | Old Index