summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2004-04-30 19:44:21 +0000
committertv <tv@pkgsrc.org>2004-04-30 19:44:21 +0000
commit36e9aa6dbf3dfdd83dc72f94525673d80b757edc (patch)
tree39aa0475b0b82d4885540fb1d49c74e79a211b08 /pkgtools
parent02cfaf79b933c5bf79cafcfdbdba1ab144d0e2dc (diff)
downloadpkgsrc-36e9aa6dbf3dfdd83dc72f94525673d80b757edc.tar.gz
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 (limited to 'pkgtools')
-rwxr-xr-xpkgtools/xpkgwedge/DEINSTALL9
-rw-r--r--pkgtools/xpkgwedge/INSTALL13
-rw-r--r--pkgtools/xpkgwedge/Makefile4
-rw-r--r--pkgtools/xpkgwedge/files/xpkgwedge.def63
4 files changed, 80 insertions, 9 deletions
diff --git a/pkgtools/xpkgwedge/DEINSTALL b/pkgtools/xpkgwedge/DEINSTALL
index f8514bdaec6..0e90f9cf628 100755
--- a/pkgtools/xpkgwedge/DEINSTALL
+++ b/pkgtools/xpkgwedge/DEINSTALL
@@ -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 @@ VIEW-DEINSTALL)
${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 --git a/pkgtools/xpkgwedge/INSTALL b/pkgtools/xpkgwedge/INSTALL
index ac52b2f87ee..c164f231e53 100644
--- a/pkgtools/xpkgwedge/INSTALL
+++ b/pkgtools/xpkgwedge/INSTALL
@@ -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 @@ VIEW-INSTALL)
) > ${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 --git a/pkgtools/xpkgwedge/Makefile b/pkgtools/xpkgwedge/Makefile
index c82920ee406..ff692189592 100644
--- a/pkgtools/xpkgwedge/Makefile
+++ b/pkgtools/xpkgwedge/Makefile
@@ -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 --git a/pkgtools/xpkgwedge/files/xpkgwedge.def b/pkgtools/xpkgwedge/files/xpkgwedge.def
index 1dcb47b5b82..450cef12826 100644
--- a/pkgtools/xpkgwedge/files/xpkgwedge.def
+++ b/pkgtools/xpkgwedge/files/xpkgwedge.def
@@ -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