summaryrefslogtreecommitdiff
path: root/emulators/suse100_linux
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-07-29 05:18:36 +0000
committerjlam <jlam@pkgsrc.org>2007-07-29 05:18:36 +0000
commit33f30156fb37245b360bbc293320402ecf1aba41 (patch)
tree45cad36d8470a568b9136017b2dd79c9efcc65bc /emulators/suse100_linux
parentffe106498e5f63e2e945d5b6b2ac8807a10ae78f (diff)
downloadpkgsrc-33f30156fb37245b360bbc293320402ecf1aba41.tar.gz
* Add new emulator framework in pkgsrc/mk/emulator that handles all
binary-only packages that require binary "emulation" on the native operating system. Please see pkgsrc/mk/emulator/README for more details. * Teach the plist framework to automatically use any existing PLIST.${EMUL_PLATFORM} as part of the default PLIST_SRC definition. * Convert all of the binary-only packages in pkgsrc to use the emulator framework. Most of them have been tested to install and deinstall correctly. This involves the following cleanup actions: * Remove use of custom PLIST code and use PLIST.${EMUL_PLATFORM} more consistently. * Simplify packages by using default INSTALL and DEINSTALL scripts instead of custom INSTALL/DEINSTALL code. * Remove "SUSE_COMPAT32" and "PKG_OPTIONS.suse" from pkgsrc. Packages only need to state exactly which emulations they support, and the framework handles any i386-on-x86_64 or sparc-on-sparc64 uses. * Remove "USE_NATIVE_LINUX" from pkgsrc. The framework will automatically detect when the package is installing on Linux. Specific changes to packages include: * Bump the PKGREVISIONs for all of the suse100* and suse91* packages due to changes in the +INSTALL/+DEINSTALL scripts used in all of the packages. * Remove pkgsrc/emulators/suse_linux, which is unused by any packages. * cad/lc -- remove custom code to create the distinfo file for all supported platforms; just use "emul-fetch" and "emul-distinfo" instead. * lang/Cg-compiler -- install the shared libraries under ${EMULDIR} instead of ${PREFIX}/lib so that compiled programs will find the shared libraries. * mail/thunderbird-bin-nightly -- update to latest binary distributions for supported platforms. * multimedia/ns-flash -- update Linux version to 9.0.48 as the older version is no longer available for interactive fetch. * security/uvscan -- set LD_LIBRARY_PATH explicitly so that it's not necessary to install library symlinks into ${EMULDIR}/usr/local/lib. * www/firefox-bin-flash -- update Linux version to 9.0.48 as the older version is no longer available for interactive fetch.
Diffstat (limited to 'emulators/suse100_linux')
-rw-r--r--emulators/suse100_linux/Makefile.common149
-rw-r--r--emulators/suse100_linux/arch.mk19
-rw-r--r--emulators/suse100_linux/compat32.mk81
-rw-r--r--emulators/suse100_linux/emulator.mk50
-rw-r--r--emulators/suse100_linux/vars.mk9
5 files changed, 96 insertions, 212 deletions
diff --git a/emulators/suse100_linux/Makefile.common b/emulators/suse100_linux/Makefile.common
index bde7eaeb487..e2ebfb575dc 100644
--- a/emulators/suse100_linux/Makefile.common
+++ b/emulators/suse100_linux/Makefile.common
@@ -1,18 +1,32 @@
-# $NetBSD: Makefile.common,v 1.15 2007/05/04 23:46:56 xtraeme Exp $
+# $NetBSD: Makefile.common,v 1.16 2007/07/29 05:18:54 jlam Exp $
-.include "../../emulators/suse100_linux/vars.mk"
-.include "../../emulators/suse100_linux/compat32.mk"
-.include "../../emulators/suse100_linux/arch.mk"
+SUSE_PKG= yes
+SUSE_VERSION= 10.0
+SUSE_VERSION_REQD= ${SUSE_VERSION}
-ONLY_FOR_PLATFORM+= NetBSD-[2-9]*-i386 NetBSD-3.99*-x86_64 \
- NetBSD-[2-9]*-powerpc \
- NetBSD-[4-9]*-x86_64 FreeBSD-*-i386 \
- DragonFly-*-i386
+EMUL_PLATFORMS?= linux-i386 linux-powerpc linux-x86_64
+
+.include "../../mk/bsd.prefs.mk"
+
+# The SuSE 10.x Linux packages are only usable on the following platforms.
+ONLY_FOR_PLATFORM+= DragonFly-*-i386
+ONLY_FOR_PLATFORM+= FreeBSD-*-i386
+ONLY_FOR_PLATFORM+= NetBSD-[2-9]*-i386
+ONLY_FOR_PLATFORM+= NetBSD-[2-9]*-powerpc
+ONLY_FOR_PLATFORM+= NetBSD-3.99*-x86_64
+ONLY_FOR_PLATFORM+= NetBSD-[4-9]*-x86_64
+
+# _SUSE_ARCH.* is a table of ${EMUL_ARCH} to SuSE architectures.
+_SUSE_ARCH.${EMUL_ARCH}= ${EMUL_ARCH}
+_SUSE_ARCH.i386= i586
+_SUSE_ARCH.powerpc= ppc
+_SUSE_ARCH= ${_SUSE_ARCH.${EMUL_ARCH}}
+SUSE_ARCH= ${_SUSE_ARCH}
_SUSE_FTP_SUBDIR= distribution/SL-${SUSE_VERSION}-OSS/inst-source/suse/${SUSE_ARCH}/
-_SUSE_FTP_SUBDIR_UPD= suse/${SUSE_ARCH_DIR}/update/${SUSE_VERSION}/rpm/${SUSE_ARCH}/
+_SUSE_FTP_SUBDIR_UPD= suse/update/${SUSE_VERSION}/rpm/${SUSE_ARCH}/
-MASTER_SITE_SUSE100?= \
+MASTER_SITE_SUSE_${SUSE_VERSION}= \
ftp://suse.inode.at/opensuse/${_SUSE_FTP_SUBDIR} \
http://suse.inode.at/opensuse/${_SUSE_FTP_SUBDIR} \
ftp://suse.inode.at/pub/update/${SUSE_VERSION}/rpm/${SUSE_ARCH}/ \
@@ -25,106 +39,35 @@ MASTER_SITE_SUSE100?= \
ftp://mirror.karneval.cz/pub/opensuse/${_SUSE_FTP_SUBDIR:S,distribution/,,} \
ftp://ftp.suse.com/pub/${_SUSE_FTP_SUBDIR_UPD}
-.ifndef SUSE_COMPAT32
+MASTER_SITES?= ${MASTER_SITE_SUSE_${SUSE_VERSION}}
DIST_SUBDIR?= suse${SUSE_VERSION:S/.//}/${SUSE_ARCH}
-.endif
+
+HOMEPAGE?= http://www.suse.com/
WRKSRC?= ${WRKDIR}
+BUILD_DIRS?= # empty
MANCOMPRESSED?= yes
-# Don't check any script interpreter, as long as nobody complains.
-CHECK_INTERPRETER_SKIP= *
+EMUL_PKG_FMT?= rpm
+RPM2PKG_PREFIX?= ${PREFIX}
+RPM2PKG_SUBPREFIX?= ${EMULSUBDIR}
+RPM2PKG_STAGE?= do-install
-OPSYS_EMULSUBDIR= linux${SUSE_COMPAT32_SUFFIX}
-EMULSUBDIR= emul/linux${SUSE_COMPAT32_SUFFIX}
-EMULDIR= ${PREFIX}/${EMULSUBDIR}
-
-# Set location of OPSYS-specific emulation directory
-.if ${OPSYS} == "NetBSD"
-. ifndef SUSE_COMPAT32
-OPSYS_EMULDIR= /${EMULSUBDIR}
-. else
-OPSYS_EMULDIR= ${EMULSUBDIR}
-. endif
-.elif (${OPSYS} == "FreeBSD") || (${OPSYS} == "DragonFly")
-OPSYS_EMULDIR= /compat/${EMULSUBDIR:T}
+.if (${EMUL_ARCH} == "i386") && (${MACHINE_ARCH} == "x86_64")
+PKGNAME:= ${DISTNAME:S/^suse_/suse32_/}
+COMMENT:= ${COMMENT:S/Linux/Linux 32-bit/}
+LINUX_BASE= linux32
.else
-OPSYS_EMULDIR= /${EMULSUBDIR}
-.endif
-FILES_SUBST+= OPSYS_EMULDIR=${OPSYS_EMULDIR:Q} \
- OPSYS_EMULSUBDIR=${OPSYS_EMULSUBDIR:Q}
-
-.ifdef SUSE_COMPAT32
-PLIST_SUBST+= ${FILES_SUBST}
-.endif
-
-RPM2PKG= ${PREFIX}/sbin/rpm2pkg
-BUILD_DEPENDS+= rpm2pkg>=2.1:../../pkgtools/rpm2pkg
-
-BUILD_DEFS+= RPMFILES
-.if defined(RPMIGNOREPATH)
-BUILD_DEFS+= RPMIGNOREPATH
-.endif
-
-# The SuSE Linux packages have circular dependencies.
-LDD?= ${TRUE}
-
-.ifndef SUSE_COMPAT32
-RPM2PKGSTRIP?= 1
-RPM2PKGARGS?= -d ${PREFIX} -f ${PLIST_SRC} -p ${EMULSUBDIR}
-. if empty(RPM2PKGSTRIP:M0)
-RPM2PKGARGS+= -s ${RPM2PKGSTRIP}
-. endif
-. for TEMP in ${RPMIGNOREPATH}
-RPM2PKGARGS+= -i ${TEMP}
-. endfor
-. for TEMP in ${RPMFILES}
-RPM2PKGARGS+= ${DISTDIR}/${DIST_SUBDIR}/${TEMP}
-. endfor
+LINUX_BASE= linux
.endif
+PLIST_SUBST+= LINUX_BASE=${LINUX_BASE:Q}
+FILES_SUBST+= LINUX_BASE=${LINUX_BASE:Q}
-# regenerate distinfo for all platforms supported by the suse100_* packages
-suse100-distinfo:
- ( ${ECHO} '$$'NetBSD'$$'; \
- ${ECHO} ''; \
- MACHINE_ARCH=i386 ${MAKE} distinfo 1>&2; \
- ${GREP} rpm distinfo; \
- MACHINE_ARCH=powerpc ${MAKE} distinfo 1>&2; \
- ${GREP} rpm distinfo; \
- MACHINE_ARCH=x86_64 ${MAKE} distinfo 1>&2; \
- ${GREP} rpm distinfo; \
- ) > distinfo.new
- ${MV} -f distinfo.new distinfo
+LINUX_LIBSUBDIR?= lib
+PLIST_SUBST+= LINUX_LIBSUBDIR=${LINUX_LIBSUBDIR:Q}
+FILES_SUBST+= LINUX_LIBSUBDIR=${LINUX_LIBSUBDIR:Q}
-.ifdef SUSE_COMPAT32_SUFFIX
-LOCAL_ARCH= i386
-.else
-LOCAL_ARCH= ${MACHINE_ARCH}
-.endif
-
-.if empty(${.CURDIR:Msuse100_base}) && !defined(SUSE_COMPAT32)
-. if !target(do-install)
-do-install:
- @if [ -f ${PKGDIR}/PLIST ]; then \
- ${CP} ${PKGDIR}/PLIST ${PLIST_SRC}; \
- else \
- ${RM} -f ${PLIST_SRC}; \
- ${CP} ${PKGSRCDIR}/emulators/suse_linux/PLIST_dynamic ${PLIST_SRC} ; \
- fi
- @if [ -f ${PKGDIR}/PLIST_rpmfix.${LOCAL_ARCH} ]; then \
- ${SED} -e 's,^/,${EMULSUBDIR}/,' \
- ${PKGDIR}/PLIST_rpmfix.${LOCAL_ARCH} >> ${PLIST_SRC}; \
- fi
- ${RPM2PKG} ${RPM2PKGARGS}
- @if ${GREP} -q 'lib.*\.so' ${PLIST_SRC}; then \
- ${ECHO_MSG} "===> [Automatic Linux shared object handling]"; \
- ${EMULDIR}/sbin/ldconfig -r ${EMULDIR}; \
- ${MV} -f ${PLIST_SRC} ${PLIST_SRC}.old; \
- ${GREP} -v '^@dirrm' ${PLIST_SRC}.old >${PLIST_SRC} || ${TRUE}; \
- ${ECHO} "@exec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR}" >>${PLIST_SRC}; \
- ${ECHO} "@unexec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR} 2>/dev/null" >>${PLIST_SRC}; \
- ${GREP} '^@dirrm' ${PLIST_SRC}.old >>${PLIST_SRC} || ${TRUE}; \
- ${RM} -f ${PLIST_SRC}.old; \
- fi
-. endif
-.endif
+# Include an "override" SuSE-specific and architecture-specific
+# Makefile fragment if it exists.
+#
+.sinclude "suse.${EMUL_ARCH}.mk"
diff --git a/emulators/suse100_linux/arch.mk b/emulators/suse100_linux/arch.mk
deleted file mode 100644
index a81df844cef..00000000000
--- a/emulators/suse100_linux/arch.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# $NetBSD: arch.mk,v 1.1.1.1 2006/03/09 20:33:46 tonio Exp $
-
-.ifndef SUSE_ARCH_MK
-SUSE_ARCH_MK=1
-
-.include "../../mk/bsd.prefs.mk"
-
-.if ${MACHINE_ARCH} == "i386"
-SUSE_ARCH?= i586
-SUSE_ARCH_DIR?= ${MACHINE_ARCH}
-.elif ${MACHINE_ARCH} == "powerpc"
-SUSE_ARCH?= ppc
-.else
-SUSE_ARCH?= ${MACHINE_ARCH}
-.endif
-
-SUSE_ARCH_DIR?= ${SUSE_ARCH}
-
-.endif # SUSE_ARCH_MK
diff --git a/emulators/suse100_linux/compat32.mk b/emulators/suse100_linux/compat32.mk
deleted file mode 100644
index 4349b0ef361..00000000000
--- a/emulators/suse100_linux/compat32.mk
+++ /dev/null
@@ -1,81 +0,0 @@
-# $NetBSD: compat32.mk,v 1.4 2007/04/20 21:35:00 xtraeme Exp $
-#
-
-.ifndef SUSE_LINUX_COMPAT32_MK
-SUSE_LINUX_COMPAT32_MK= # defined
-
-.include "../../mk/bsd.prefs.mk"
-
-. if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "x86_64"
-
-#
-# We must protect this part with packages that are using
-# the options framework, otherwise we'll end executing two
-# targets for the options.
-#
-. ifndef SUSE_COMPAT32_OPT
-PKG_OPTIONS_VAR= PKG_OPTIONS.suse
-PKG_SUPPORTED_OPTIONS= compat32
-
-. include "../../mk/bsd.options.mk"
-. else
-ONLY_FOR_PLATFORM:= ${ONLY_FOR_PLATFORM} NetBSD-*-x86_64
-#MACHINE_ARCH:= i386
-DEPENDS:= ${DEPENDS:S/suse/suse32/}
-EMULSUBDIR:= emul/linux32
-. endif
-
-STRING_ERROR1= \
- "This package is not compatible with x86_64 without using "
-STRING_ERROR2= \
- "PKG_OPTIONS.suse=compat32."
-MYSTRING= ${STRING_ERROR1}${STRING_ERROR2}
-
-. if !empty(PKG_OPTIONS:Mcompat32)
-#
-# We don't need to override the following vars in packages using
-# SUSE_COMPAT32, because this is only required for the suse
-# packages.
-#
-. ifndef SUSE_COMPAT32
-#
-# Override required vars
-#
-PKGNAME:= ${DISTNAME:S/suse/suse32/}
-COMMENT:= ${COMMENT:S/Linux/Linux 32/}
-SUSE_ARCH:= i586
-. endif
-#
-# This is common for all linux packages.
-#
-MACHINE_ARCH:= i386
-ARCH:= ${MACHINE_ARCH}
-DEPENDS:= ${DEPENDS:S/suse/suse32/}
-LINUX_LIB:= lib
-BINSUFFIX:= # empty
-#
-# Use the correct directories.
-#
-OPSYS_EMULSUBDIR= linux32
-SUSE_COMPAT32_SUFFIX= 32
-EMULSUBDIR:= emul/linux32
-. else
-OPSYS_EMULSUBDIR= linux
-SUSE_COMPAT32_SUFFIX= # empty
-. if defined(ONLY_FOR_PLATFORM) && \
- empty(ONLY_FOR_PLATFORM:MNetBSD-*-x86_64)
-PKG_FAIL_REASON+= ${MYSTRING}
-. endif
-. endif # end of PKG_OPTIONS.suse=compat32
-. endif # end of NetBSD && x86_64
-#
-# This is to avoid to use the same code on every package
-# many times.
-#
-. ifdef SUSE_INCLUDE_MAKEFILE_ARCH
-. if exists(Makefile.${MACHINE_ARCH})
-. include "Makefile.${MACHINE_ARCH}"
-. endif
-. endif
-
-.endif # end of SUSE_LINUX_COMPAT32_MK
diff --git a/emulators/suse100_linux/emulator.mk b/emulators/suse100_linux/emulator.mk
new file mode 100644
index 00000000000..3b022e062ce
--- /dev/null
+++ b/emulators/suse100_linux/emulator.mk
@@ -0,0 +1,50 @@
+# $NetBSD: emulator.mk,v 1.1 2007/07/29 05:18:55 jlam Exp $
+#
+# This file is included by linux-suse.mk in the emulator framework.
+#
+# Variables set by this file:
+#
+# EMUL_DISTRO
+# The SuSE Linux distribution.
+#
+# DEPENDS_${EMUL_DISTRO}.*
+# A table that maps "modules" to SuSE package dependencies.
+#
+
+EMUL_DISTRO= suse-10.0
+
+.if defined(SUSE_PKG)
+_SUSE_VERSION_REQD= -${SUSE_VERSION_REQD}{,nb*}
+.else
+_SUSE_VERSION_REQD= >=${SUSE_VERSION_REQD}
+.endif
+
+# DEPENDS_suse-10.0.* maps Linux "modules" to SuSE package dependencies.
+DEPENDS_suse-10.0.aspell?= suse_aspell${_SUSE_VERSION_REQD}:../../emulators/suse100_aspell
+DEPENDS_suse-10.0.base?= suse_base${_SUSE_VERSION_REQD}:../../emulators/suse100_base
+DEPENDS_suse-10.0.compat?= suse_compat${_SUSE_VERSION_REQD}:../../emulators/suse100_compat
+DEPENDS_suse-10.0.cups?= suse_libcups${_SUSE_VERSION_REQD}:../../emulators/suse100_libcups
+DEPENDS_suse-10.0.expat?= suse_expat${_SUSE_VERSION_REQD}:../../emulators/suse100_expat
+DEPENDS_suse-10.0.fontconfig?= suse_fontconfig${_SUSE_VERSION_REQD}:../../emulators/suse100_fontconfig
+DEPENDS_suse-10.0.freetype2?= suse_freetype2${_SUSE_VERSION_REQD}:../../emulators/suse100_freetype2
+DEPENDS_suse-10.0.gdk-pixbuf?= suse_gdk-pixbuf${_SUSE_VERSION_REQD}:../../emulators/suse100_gdk-pixbuf
+DEPENDS_suse-10.0.glx?= suse_glx${_SUSE_VERSION_REQD}:../../emulators/suse100_glx
+DEPENDS_suse-10.0.gtk?= suse_gtk${_SUSE_VERSION_REQD}:../../emulators/suse100_gtk
+DEPENDS_suse-10.0.gtk2?= suse_gtk2${_SUSE_VERSION_REQD}:../../emulators/suse100_gtk2
+DEPENDS_suse-10.0.jpeg?= suse_libjpeg${_SUSE_VERSION_REQD}:../../emulators/suse100_libjpeg
+DEPENDS_suse-10.0.locale?= suse_locale${_SUSE_VERSION_REQD}:../../emulators/suse100_locale
+DEPENDS_suse-10.0.motif?= suse_openmotif${_SUSE_VERSION_REQD}:../../emulators/suse100_openmotif
+DEPENDS_suse-10.0.openssl?= suse_openssl${_SUSE_VERSION_REQD}:../../emulators/suse100_openssl
+DEPENDS_suse-10.0.png?= suse_libpng${_SUSE_VERSION_REQD}:../../emulators/suse100_libpng
+DEPENDS_suse-10.0.slang?= suse_slang${_SUSE_VERSION_REQD}:../../emulators/suse100_slang
+DEPENDS_suse-10.0.tiff?= suse_libtiff${_SUSE_VERSION_REQD}:../../emulators/suse100_libtiff
+DEPENDS_suse-10.0.vmware?= suse_vmware${_SUSE_VERSION_REQD}:../../emulators/suse100_vmware
+DEPENDS_suse-10.0.x11?= suse_x11${_SUSE_VERSION_REQD}:../../emulators/suse100_x11
+DEPENDS_suse-10.0.xml2?= suse_libxml2${_SUSE_VERSION_REQD}:../../emulators/suse100_libxml2
+
+.if (${EMUL_ARCH} == "i386") && (${MACHINE_ARCH} == "x86_64")
+. for _mod_ in ${_LINUX_MODULES}
+DEPENDS_suse-10.0.${_mod_}:= \
+ ${DEPENDS_suse-10.0.${_mod_}:S/^suse_/suse32_/}
+. endfor
+.endif
diff --git a/emulators/suse100_linux/vars.mk b/emulators/suse100_linux/vars.mk
deleted file mode 100644
index 7f78258bdaf..00000000000
--- a/emulators/suse100_linux/vars.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-# $NetBSD: vars.mk,v 1.1.1.1 2006/03/09 20:33:46 tonio Exp $
-
-.ifndef SUSE_VARS_MK
-SUSE_VARS_MK=1
-
-SUSE_DIR_PREFIX= suse100
-SUSE_VERSION= 10.0
-
-.endif # SUSE_VARS_MK