pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/xpkgwedge 1.10: Add a chunk of shlib override...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/29154e8d66ec
branches:  trunk
changeset: 474483:29154e8d66ec
user:      tv <tv%pkgsrc.org@localhost>
date:      Fri Apr 30 19:44:21 2004 +0000

description:
1.10: Add a chunk of shlib override make-code to make this work on Interix,
and patch site.def (but differently from how it is patched on OpenWindows).

diffstat:

 pkgtools/xpkgwedge/DEINSTALL           |   9 +++-
 pkgtools/xpkgwedge/INSTALL             |  13 +++++-
 pkgtools/xpkgwedge/Makefile            |   4 +-
 pkgtools/xpkgwedge/files/xpkgwedge.def |  63 +++++++++++++++++++++++++++++++++-
 4 files changed, 80 insertions(+), 9 deletions(-)

diffs (139 lines):

diff -r ff6e04c7672c -r 29154e8d66ec pkgtools/xpkgwedge/DEINSTALL
--- a/pkgtools/xpkgwedge/DEINSTALL      Fri Apr 30 17:26:23 2004 +0000
+++ b/pkgtools/xpkgwedge/DEINSTALL      Fri Apr 30 19:44:21 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: DEINSTALL,v 1.8 2004/04/27 18:33:52 tv Exp $
+# $NetBSD: DEINSTALL,v 1.9 2004/04/30 19:44:21 tv Exp $
 
 FONT_PROGS="@FONT_PROGS@"
 X11BASE=@X11BASE@
@@ -27,10 +27,13 @@
           ${CMP} -s ${X11_HOSTDEF} ${HOSTDEF}; then
                ${RM} -f ${HOSTDEF}
        fi
-       case ${X11BASE} in
-       *openwin)
+       case `uname`:${X11BASE} in
+       *:*openwin)
                ${RM} -f ${SITEDEF} ${SV4LIB}
                ;;
+       Interix:/usr/X11R6)
+               ${RM} -f ${SITEDEF}
+               ;;
        esac
        ${ECHO} "done."
        ;;
diff -r ff6e04c7672c -r 29154e8d66ec pkgtools/xpkgwedge/INSTALL
--- a/pkgtools/xpkgwedge/INSTALL        Fri Apr 30 17:26:23 2004 +0000
+++ b/pkgtools/xpkgwedge/INSTALL        Fri Apr 30 19:44:21 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.10 2004/04/27 18:33:52 tv Exp $
+# $NetBSD: INSTALL,v 1.11 2004/04/30 19:44:21 tv Exp $
 
 FONT_PROGS="@FONT_PROGS@"
 X11BASE=@X11BASE@
@@ -44,13 +44,20 @@
        ) > ${HOSTDEF}
        ${RM} -f ${HOSTDEF}.bak
        ${ECHO} "done."
-       case ${X11BASE} in
-       *openwin)
+       case `uname`:${X11BASE} in
+       *:*openwin)
                ${ECHO_N} "Patching OpenWindows templates..."
                ${SED} "${SITEDEF_SUBST_SED}" ${X11_SITEDEF} > ${SITEDEF}
                ${SED} "${SV4LIB_SUBST_SED}" ${X11_SV4LIB} > ${SV4LIB}
                ${ECHO} "done."
                ;;
+       Interix:/usr/X11R6)
+               ${ECHO_N} "Patching Interix templates..."
+               ${SED} -e "1i\\
+#include <host.def>
+" -e "/CcCmd/d;/ProjectRoot/d" ${X11_SITEDEF} > ${SITEDEF}
+               ${ECHO} "done."
+               ;;
        esac
        ;;
 esac
diff -r ff6e04c7672c -r 29154e8d66ec pkgtools/xpkgwedge/Makefile
--- a/pkgtools/xpkgwedge/Makefile       Fri Apr 30 17:26:23 2004 +0000
+++ b/pkgtools/xpkgwedge/Makefile       Fri Apr 30 19:44:21 2004 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.49 2004/02/02 10:08:43 jlam Exp $
+# $NetBSD: Makefile,v 1.50 2004/04/30 19:44:21 tv Exp $
 
-DISTNAME=      xpkgwedge-1.9
+DISTNAME=      xpkgwedge-1.10
 CATEGORIES=    pkgtools devel x11
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r ff6e04c7672c -r 29154e8d66ec pkgtools/xpkgwedge/files/xpkgwedge.def
--- a/pkgtools/xpkgwedge/files/xpkgwedge.def    Fri Apr 30 17:26:23 2004 +0000
+++ b/pkgtools/xpkgwedge/files/xpkgwedge.def    Fri Apr 30 19:44:21 2004 +0000
@@ -1,4 +1,65 @@
-/*     $NetBSD: xpkgwedge.def,v 1.10 2004/01/03 23:34:21 jlam Exp $    */
+/*     $NetBSD: xpkgwedge.def,v 1.11 2004/04/30 19:44:21 tv Exp $      */
+
+#ifdef BeforeVendorCF
+
+/*
+ * OS-specific overrides for Interix to make it behave similarly to NetBSD
+ * when creating binaries for pkgsrc.
+ */
+#ifdef __INTERIX
+#undef  ForceNormalLib /* this is always YES on Interix */
+#define NullMakeCommand @ true
+#define SharedLibraryLoadFlags -shared -Wl,-rpath,$(USRLIBDIRPATH)
+
+#ifdef UseInstalled  
+#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
+#define LinkBuildSonameLibrary(lib) true
+#else
+#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) -Wl,-rpath-link,$(BUILDLIBDIR)
+#define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); \
+       cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
+#endif
+
+/*
+ * Oy, what a hack: see pkgsrc/devel/libtool for an explanation of the
+ * bizarre --image-base option used below.
+ */
+#define SharedLibraryTarget(libname,rev,solist,down,up)                        @@\
+AllTarget(Concat(lib,libname.so.rev))                                  @@\
+                                                                       @@\
+Concat(lib,libname.so.rev):  solist                                    @@\
+       $(RM) $@~                                                       @@\
+       @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \             @@\
+               (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) \             @@\
+                       -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280)) \ @@\
+                       -Wl,-h,$$SONAME solist $(REQUIREDLIBS)); \      @@\
+               $(RM) $$SONAME; $(LN) $@ $$SONAME; \                    @@\
+               LinkBuildSonameLibrary($$SONAME)                        @@\
+       $(RM) $@                                                        @@\
+       $(MV) $@~ $@                                                    @@\
+       LinkBuildLibrary($@)                                            @@\
+       $(RM) Concat(lib,libname.so)                                    @@\
+       $(LN) $@ Concat(lib,libname.so)                                 @@\
+       LinkBuildLibrary(Concat(lib,libname.so))                        @@\
+                                                                       @@\
+clean::                                                                        @@\
+       @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\
+       set -x; $(RM) $$SONAME                                          @@\
+       $(RM) Concat(lib,libname.so)                                    @@\
+       $(RM) Concat(lib,libname.so.rev)
+
+#define InstallSharedLibrary(libname,rev,dest)                         @@\
+install:: Concat(lib,libname.so.rev)                                   @@\
+       MakeDir($(DESTDIR)dest)                                         @@\
+       $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+       @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\ @@\
+         set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T     @@\
+       $(RM) Concat($(DESTDIR)dest/lib,libname.so)                     @@\
+       $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
+
+#endif /* __INTERIX && BeforeVendorCF */
+
+#endif /* BeforeVendorCF */
 
 #ifdef AfterVendorCF
 



Home | Main Index | Thread Index | Old Index