diff options
author | jlam <jlam@pkgsrc.org> | 2007-08-23 17:31:46 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2007-08-23 17:31:46 +0000 |
commit | 711d838dc01ff8af1c1845624c68511ffa08dcb9 (patch) | |
tree | de70b5716d33e7038dd6deb7d548c85917f74a69 | |
parent | a10d678f1f5dcdbb14063a1ca56fbdb23ef08797 (diff) | |
download | pkgsrc-711d838dc01ff8af1c1845624c68511ffa08dcb9.tar.gz |
Back out previous and solve this in another way that doesn't involve
a hokey new emulator-opsys.mk file.
-rw-r--r-- | emulators/compat_netbsd/Makefile.common | 17 | ||||
-rw-r--r-- | mk/emulator/emulator-opsys.mk | 46 | ||||
-rw-r--r-- | mk/emulator/emulator.mk | 37 |
3 files changed, 49 insertions, 51 deletions
diff --git a/emulators/compat_netbsd/Makefile.common b/emulators/compat_netbsd/Makefile.common index b9e690a9b6f..762c8a2cd57 100644 --- a/emulators/compat_netbsd/Makefile.common +++ b/emulators/compat_netbsd/Makefile.common @@ -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 @@ BUILD_DIRS= # empty 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.${EMUL_EXEC_FMT} 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 --git a/mk/emulator/emulator-opsys.mk b/mk/emulator/emulator-opsys.mk deleted file mode 100644 index f931d0ac7fb..00000000000 --- a/mk/emulator/emulator-opsys.mk +++ /dev/null @@ -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 --git a/mk/emulator/emulator.mk b/mk/emulator/emulator.mk index 46ae5e1a9e7..257c487a5ba 100644 --- a/mk/emulator/emulator.mk +++ b/mk/emulator/emulator.mk @@ -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 |