pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Back out previous and solve this in another way that d...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f59bbb3fae93
branches:  trunk
changeset: 532573:f59bbb3fae93
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Aug 23 17:31:46 2007 +0000

description:
Back out previous and solve this in another way that doesn't involve
a hokey new emulator-opsys.mk file.

diffstat:

 emulators/compat_netbsd/Makefile.common |  17 ++++++++++--
 mk/emulator/emulator-opsys.mk           |  46 ---------------------------------
 mk/emulator/emulator.mk                 |  37 +++++++++++++++++++++++++-
 3 files changed, 49 insertions(+), 51 deletions(-)

diffs (146 lines):

diff -r faa19bdd978a -r f59bbb3fae93 emulators/compat_netbsd/Makefile.common
--- a/emulators/compat_netbsd/Makefile.common   Thu Aug 23 17:10:39 2007 +0000
+++ b/emulators/compat_netbsd/Makefile.common   Thu Aug 23 17:31:46 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.2 2007/08/23 15:59:33 jlam Exp $
+# $NetBSD: Makefile.common,v 1.3 2007/08/23 17:31:46 jlam Exp $
 #
 # Common infrastructure for NetBSD compat* packages.
 #
@@ -43,8 +43,6 @@
 MAKE_DIRS+=            ${EMULDIR}
 ELF_SYMLINKS_DATA=     ${WRKDIR}/.symlinks-data
 
-.include "../../mk/emulator/emulator-opsys.mk"
-
 #
 # PLISTs are composed from the following bits, in order:
 #
@@ -62,6 +60,19 @@
 PLIST_SRC+=            ${PKGDIR}/PLIST
 .endif
 
+# Set NATIVE_EXEC_FMT and EMUL_EXEC_FMT appropriately.  Normally, these
+# are set by mk/emulator.mk, included in bsd.pkg.mk, but this happens
+# too late for us here.
+#
+# Directly set NATIVE_EXEC_FMT and include the correct emulator.mk file
+# to define EMUL_EXEC_FMT.
+#
+NATIVE_EXEC_FMT=       ${_NATIVE_EXEC_FMT_cmd:sh}
+_NATIVE_EXEC_FMT_cmd=  sh ${.CURDIR}/../../mk/scripts/shlib-type       \
+                               ${_OPSYS_SHLIB_TYPE:Q} ${MAKE:Q}
+
+.include "${PKGSRCDIR}/emulators/${DISTNAME:S/-*//}/emulator.mk"
+
 #
 # Different combinations of the native executable format and the emulated
 # executable format require different ways of making the installed shared
diff -r faa19bdd978a -r f59bbb3fae93 mk/emulator/emulator-opsys.mk
--- a/mk/emulator/emulator-opsys.mk     Thu Aug 23 17:10:39 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-# $NetBSD: emulator-opsys.mk,v 1.1 2007/08/23 15:59:33 jlam Exp $
-#
-# This file is included by emulator.mk.
-#
-# Variables defined by this file:
-#
-# EMUL_DISTRO
-#      The distribution of the emulated operating system being used,
-#      e.g. native-linux, suse-10.0, etc.  If the package isn't
-#      supported on this machine, then its value is "none".
-#
-# EMULDIR
-#      Convenience variable that expands to ${PREFIX}/${EMULSUBDIR}
-#
-# EMULSUBDIR
-#      Path relative to ${PREFIX} where the files and directories
-#      are located, e.g. emul/linux.
-#
-# OPSYS_EMULDIR
-#      Path through which the platform expects to find a "chroot"
-#      installation of the files and directories, e.g. /emul/linux.
-#
-
-.if !defined(_EMULATOR_EMULATOR_OPSYS_MK)
-_EMULATOR_EMULATOR_OPSYS_MK=   defined
-
-.if empty(EMUL_PLATFORMS:M${EMUL_PLATFORM})
-PKG_FAIL_REASON+=      "${PKGNAME} is not available for ${MACHINE_PLATFORM}"
-.endif
-
-.if ${EMUL_PLATFORM} == "none"
-EMUL_DISTRO?=          none
-EMULSUBDIR?=           # empty
-EMULDIR?=              ${PREFIX}
-OPSYS_EMULDIR?=                # empty
-.else
-#
-# The ${EMUL_OPSYS}.mk file included here should define the following
-# variables either directly or indirectly:
-#
-#      EMUL_DISTRO, EMULSUBDIR, EMULDIR, OPSYS_EMULDIR
-#
-.  include "${.PARSEDIR}/${EMUL_OPSYS}.mk"
-.endif
-
-.endif # _EMULATOR_EMULATOR_OPSYS_MK
diff -r faa19bdd978a -r f59bbb3fae93 mk/emulator/emulator.mk
--- a/mk/emulator/emulator.mk   Thu Aug 23 17:10:39 2007 +0000
+++ b/mk/emulator/emulator.mk   Thu Aug 23 17:31:46 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: emulator.mk,v 1.5 2007/08/23 15:59:34 jlam Exp $
+# $NetBSD: emulator.mk,v 1.6 2007/08/23 17:31:46 jlam Exp $
 #
 # This file is included by bsd.pkg.mk.
 #
@@ -17,6 +17,22 @@
 #
 # Variables defined by this file:
 #
+# EMUL_DISTRO
+#      The distribution of the emulated operating system being used,
+#      e.g. native-linux, suse-10.0, etc.  If the package isn't
+#      supported on this machine, then its value is "none".
+#
+# EMULDIR
+#      Convenience variable that expands to ${PREFIX}/${EMULSUBDIR}
+#
+# EMULSUBDIR
+#      Path relative to ${PREFIX} where the files and directories
+#      are located, e.g. emul/linux.
+#
+# OPSYS_EMULDIR
+#      Path through which the platform expects to find a "chroot"
+#      installation of the files and directories, e.g. /emul/linux.
+#
 # EMULSUBDIRSLASH
 #      Expands to either ${EMULSUBDIR}/lib or just lib depending on
 #      whether EMULSUBDIR is empty or not.  It is meant to be used
@@ -36,7 +52,24 @@
 #      of the ``emul-fetch'' target.
 #
 
-.include "${.PARSEDIR}/emulator-opsys.mk"
+.if empty(EMUL_PLATFORMS:M${EMUL_PLATFORM})
+PKG_FAIL_REASON+=      "${PKGNAME} is not available for ${MACHINE_PLATFORM}"
+.endif
+
+.if ${EMUL_PLATFORM} == "none"
+EMUL_DISTRO?=          none
+EMULSUBDIR?=           # empty
+EMULDIR?=              ${PREFIX}
+OPSYS_EMULDIR?=                # empty
+.else
+#
+# The ${EMUL_OPSYS}.mk file included here should define the following
+# variables either directly or indirectly:
+#
+#      EMUL_DISTRO, EMULSUBDIR, EMULDIR, OPSYS_EMULDIR
+#
+.  include "${.PARSEDIR}/${EMUL_OPSYS}.mk"
+.endif
 
 # If we're doing true binary emulation, then file paths found in the
 # package's binaries, libraries and scripts won't necessarily match the



Home | Main Index | Thread Index | Old Index