diff options
author | lioux <lioux@FreeBSD.org> | 2009-11-14 10:11:48 +0800 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2009-11-14 10:11:48 +0800 |
commit | 8dd7cc317db8f26346d51a7d6f1a7ede2c1fb80f (patch) | |
tree | 6622e8acebd19ae78d8f81a6f70cc293871dfbfa /emulators | |
parent | 1b1449f86fb2b55e558fb119d94464f720070f23 (diff) | |
download | freebsd-ports-gnome-8dd7cc317db8f26346d51a7d6f1a7ede2c1fb80f.tar.gz freebsd-ports-gnome-8dd7cc317db8f26346d51a7d6f1a7ede2c1fb80f.tar.zst freebsd-ports-gnome-8dd7cc317db8f26346d51a7d6f1a7ede2c1fb80f.zip |
- Depend on emulators/kqemu-kmod instead of installing its own
version
- Bump PORTREVISION
Diffstat (limited to 'emulators')
6 files changed, 160 insertions, 7 deletions
diff --git a/emulators/win4bsd/Makefile b/emulators/win4bsd/Makefile index a2ed185f43a3..1624a5c23ead 100644 --- a/emulators/win4bsd/Makefile +++ b/emulators/win4bsd/Makefile @@ -7,7 +7,7 @@ PORTNAME= win4bsd PORTVERSION= 1.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= emulators MASTER_SITES= ftp://ftp.win4bsd.com/pub/releases/${PORTVERSION}/ DISTNAME= Win4BSD-1.1_63918_i386-freebsd @@ -17,7 +17,8 @@ MAINTAINER= lioux@FreeBSD.org COMMENT= Win4BSD Virtual Machine for Windows under BSD LIB_DEPENDS= c.5:${PORTSDIR}/misc/compat5x -RUN_DEPENDS= xwininfo:${PORTSDIR}/x11/xwininfo +RUN_DEPENDS= kqemu-kmod>1.3.0.p11:${PORTSDIR}/emulators/kqemu-kmod \ + xwininfo:${PORTSDIR}/x11/xwininfo CONFLICTS= Win4BSD-[0-9]* @@ -36,10 +37,6 @@ SUB_FILES= pkg-message .include <bsd.port.pre.mk> -.if !exists(/usr/src/sys/kern) -IGNORE= requires system source for installing kqemu, the accelerator that provides native CPU speed in Win4BSD. Please install the system sources in /usr/src (e.g. using sysinstall), and run make again -.endif - .if ${OSVERSION} < 800000 SCHED_NAME!= ${SYSCTL} -n kern.sched.name .if ${SCHED_NAME} != "4BSD" @@ -47,6 +44,11 @@ IGNORE= requires the traditional 4BSD scheduler. Please rebuild your kernel wit .endif .endif +POST_PATCH_REMOVE_FILES= \ + usr/local/lib/win4bsd/bin/postinstall.sh.orig \ + usr/local/lib/win4bsd/etc/mergepro_rc.orig \ + usr/local/lib/win4bsd/etc/rc.Win4BSD.orig + post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/+POST-* \ ${WRKSRC}/usr/local/lib/win4bsd/bin/postinstall.sh \ @@ -54,6 +56,9 @@ post-patch: ${WRKSRC}/usr/local/lib/win4bsd/etc/rc.Win4BSD @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \ ${WRKSRC}/usr/local/lib/win4bsd/etc/mrgprossv.sh +.for file in ${POST_PATCH_REMOVE_FILES} + @${RM} ${WRKSRC}/${file} +.endfor do-install: ${CP} -R ${WRKSRC}/usr/local/* ${PREFIX} diff --git a/emulators/win4bsd/files/patch-usr__local__lib__win4bsd__bin__postinstall.sh b/emulators/win4bsd/files/patch-usr__local__lib__win4bsd__bin__postinstall.sh new file mode 100644 index 000000000000..7306dc9a38f1 --- /dev/null +++ b/emulators/win4bsd/files/patch-usr__local__lib__win4bsd__bin__postinstall.sh @@ -0,0 +1,28 @@ +--- ./usr/local/lib/win4bsd/bin/postinstall.sh.orig 2009-11-13 23:12:52.000000000 -0200 ++++ ./usr/local/lib/win4bsd/bin/postinstall.sh 2009-11-13 23:14:36.000000000 -0200 +@@ -259,25 +259,6 @@ + "%u additional user%U for MergePro" + fi + +-# build the KQEMU accelerator module if possible +-MERGEPRO_RC_BACK="no" +-case "$SYSTEMTYPE" in +- uw7) +- echo "Installing $MERGENAME device driver (kqemu)..." +- echo "NOTE: you may be prompted to reboot your system!" +- echo "If a system reboot is not required, $MERGENAME" +- echo "services will start automatically..." +- set +e +- modadmin -U kqemu >/dev/null 2>&1 +- set -e +- "$STATICMERGE"/etc/Driver.SETUP +- MRGPRO_RC_BACK="yes" # background start in case of init 6 +- ;; +- *) +- KQEMU_NO_FAIL=yes; export KQEMU_NO_FAIL +- "$STATICMERGE"/bin/build_kqemu.sh +- ;; +-esac + + # start the Merge Pro service + set -e diff --git a/emulators/win4bsd/files/patch-usr__local__lib__win4bsd__etc__mergepro_rc b/emulators/win4bsd/files/patch-usr__local__lib__win4bsd__etc__mergepro_rc new file mode 100644 index 000000000000..3eb93b4d9744 --- /dev/null +++ b/emulators/win4bsd/files/patch-usr__local__lib__win4bsd__etc__mergepro_rc @@ -0,0 +1,49 @@ +--- ./usr/local/lib/win4bsd/etc/mergepro_rc.orig 2009-11-13 23:32:08.000000000 -0200 ++++ ./usr/local/lib/win4bsd/etc/mergepro_rc 2009-11-13 23:32:28.000000000 -0200 +@@ -131,46 +131,6 @@ + "$STATICMERGE"/bin/mergepro-cdahubd + fi + +- # load platform-specific drivers/daemons +- sleep 1 +- case "$SYSTEMTYPE" in +- linux) +- # load the KQEMU module quietly +- "$STATICMERGE/bin/reload_kqemu.sh" +- +- # create the device node for /dev/kqemu +- KQMAJOR=`cat /proc/devices|grep kqemu|cut -d ' ' -f 1` +- if [ "$KQMAJOR" != "" ]; then +- rm -f /dev/kqemu >/dev/null 2>&1 +- mknod -m 0666 /dev/kqemu c $KQMAJOR 0 \ +- >/dev/null 2>&1 +- else +- +- # attempt to build the KQEMU module +- # if it did not load properly +- KQEMU_NO_FAIL="yes" +- KQEMU_NO_REBOOT="yes" +- export KQEMU_NO_FAIL KQEMU_NO_REBOOT +- "$STATICMERGE"/bin/build_kqemu.sh +- fi +- ;; +- bsd) +- # load the KQEMU module quietly +- kldload kqemu >/dev/null 2>&1 +- kldstat -n kqemu >/dev/null 2>&1 +- if [ $? -ne 0 ]; then +- +- # attempt to build the KQEMU module +- # if it did not load properly +- KQEMU_NO_FAIL="yes" +- KQEMU_NO_REBOOT="yes" +- export KQEMU_NO_FAIL KQEMU_NO_REBOOT +- "$STATICMERGE"/bin/build_kqemu.sh +- fi +- ;; +- *) +- ;; +- esac + + exit 0 + ;; diff --git a/emulators/win4bsd/files/patch-usr__local__lib__win4bsd__etc__rc.Win4BSD b/emulators/win4bsd/files/patch-usr__local__lib__win4bsd__etc__rc.Win4BSD new file mode 100644 index 000000000000..23b4c578f0ad --- /dev/null +++ b/emulators/win4bsd/files/patch-usr__local__lib__win4bsd__etc__rc.Win4BSD @@ -0,0 +1,68 @@ +--- ./usr/local/lib/win4bsd/etc/rc.Win4BSD.orig 2006-11-15 18:02:59.000000000 -0200 ++++ ./usr/local/lib/win4bsd/etc/rc.Win4BSD 2009-11-14 00:02:03.000000000 -0200 +@@ -4,19 +4,46 @@ + # + + # PROVIDE: Win4BSD +-# REQUIRE: DAEMON ++# REQUIRE: DAEMON kqemu + + . /etc/rc.subr + + name="Win4BSD" + command="/usr/local/lib/win4bsd/etc/mergepro_rc" ++start_precmd="win4bsd_precmd" + start_cmd="win4bsd_start" + stop_cmd="win4bsd_stop" + restart_cmd="win4bsd_restart" + status_cmd="win4bsd_status" + ++local_force_depend() ++{ ++ _depend="$1" ++ if [ -f /usr/local/etc/rc.d/${_depend}.sh ]; then ++ _depend="${_depend}.sh" ++ fi ++ ++ if ! /usr/local/etc/rc.d/${_depend} forcestart; then ++ return 1 ++ fi ++ ++ return 0 ++} ++ ++win4bsd_precmd() ++{ ++ if ! checkyesno kqemu_enable ++ then ++ local_force_depend kqemu || return 1 ++ fi ++} ++ + win4bsd_start() + { ++ if ! checkyesno kqemu_enable ; then ++ return 0 ++ fi ++ + [ -x $command ] && $command start + } + +@@ -27,6 +54,10 @@ + + win4bsd_restart() + { ++ if ! checkyesno kqemu_enable ; then ++ return 0 ++ fi ++ + [ -x $command ] && $command restart + } + +@@ -35,5 +66,6 @@ + [ -x $command ] && $command status + } + ++load_rc_config ${name} + run_rc_command "$1" + diff --git a/emulators/win4bsd/files/pkg-message.in b/emulators/win4bsd/files/pkg-message.in index 45562badbe33..c9e69be13aab 100644 --- a/emulators/win4bsd/files/pkg-message.in +++ b/emulators/win4bsd/files/pkg-message.in @@ -13,4 +13,7 @@ and run the following command for the initial setup: $ %%PREFIX%%/lib/win4bsd/bin/postinstall.sh +Do not forget to enable kqemu on rc.conf before starting +Win4BSD. + ======================================================================= diff --git a/emulators/win4bsd/pkg-plist b/emulators/win4bsd/pkg-plist index 3a76dd4691ca..62e874d41923 100644 --- a/emulators/win4bsd/pkg-plist +++ b/emulators/win4bsd/pkg-plist @@ -283,4 +283,4 @@ share/pixmaps/mergepro-64x64.xpm @dirrmtry lib/win4bsd @dirrmtry share/applications/kde @dirrmtry share/applications -@unexec echo "If you are permanently removing this port check the following files/dirs that could be left over (if the setup was executed): \"/boot/kernel/kqemu.ko\", \"%D/win4bsd\", \"%D/lib/win4bsd/docs\", \"/etc/default/mergepro\"." | fmt +@unexec echo "If you are permanently removing this port check the following files/dirs that could be left over (if the setup was executed): \"%D/win4bsd\", \"%D/lib/win4bsd/docs\", \"/etc/default/mergepro\"." | fmt |