summaryrefslogtreecommitdiff
path: root/pkgtools/xpkgwedge/files
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/xpkgwedge/files
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/xpkgwedge/files')
-rw-r--r--pkgtools/xpkgwedge/files/xpkgwedge.def63
1 files changed, 62 insertions, 1 deletions
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