This patch fixes some paths which are wrong for BSD systems.
--
Ulrich Wilkens
Email: m...@uwilkens.de
>From 957de1fd41ff2ca5bd8c79f50e3d3919ea614487 Mon Sep 17 00:00:00 2001
From: Ulrich Wilkens <m...@uwilkens.de>
Date: Thu, 30 Aug 2012 02:12:16 +0200
Subject: [PATCH] Correction of paths for BSDs
---
cde/.gitignore | 4 +
cde/osf/xmbind/0040.xmbind | 2 +-
cde/programs/dtcm/server/log.h | 4 +
cde/programs/dtimsstart/0020.dtims | 91 --------------------------
cde/programs/dtimsstart/0020.dtims.src | 92 +++++++++++++++++++++++++++
cde/programs/dtimsstart/Imakefile | 9 +++
cde/programs/dtlogin/config/Xservers.src | 4 +
cde/programs/dtlogin/config/Xsession.src | 16 +++++
cde/programs/dtlogin/config/Xsetup.src | 6 ++-
cde/programs/dtlogin/config/Xstartup.src | 8 +++
cde/programs/dtsearchpath/0010.dtpaths.src | 2 +-
cde/programs/dtsearchpath/0030.dttmpdir.src | 2 +-
cde/programs/dtsearchpath/Imakefile | 3 +-
13 files changed, 147 insertions(+), 96 deletions(-)
delete mode 100755 cde/programs/dtimsstart/0020.dtims
create mode 100755 cde/programs/dtimsstart/0020.dtims.src
diff --git a/cde/.gitignore b/cde/.gitignore
index b7b872c..3d34ffa 100644
--- a/cde/.gitignore
+++ b/cde/.gitignore
@@ -91,6 +91,7 @@ programs/dthelp/dthelpgen/dthelpgen
programs/dthelp/dthelpprint/dthelpprint
programs/dthelp/dthelpview/dthelpview
programs/dticon/dticon
+programs/dtimsstart/0020.dtims
programs/dtimsstart/dtimsstart
programs/dtlogin/dtchooser
programs/dtlogin/dtgreet
@@ -528,6 +529,7 @@ programs/dthelp/parser/pass2/util/fclndir
programs/dtinfo/clients/dtinfo_start/dtinfo_start
programs/dtinfo/clients/dtinfo_start/dtinfo_start.opnums
programs/dtinfo/dtinfo/install/lib/fonts/dtinfo.bdf
+programs/dtinfo/dtinfo/install/lib/fonts/dtinfo.pcf.gz
programs/dtinfo/dtinfo/install/lib/fonts/dtinfo.pcf.Z
programs/dtinfo/dtinfo/src/Agents/Agents.d
programs/dtinfo/dtinfo/src/Agents/Agents.h
@@ -1073,6 +1075,8 @@ programs/dtwm/sys.dtwmrc
# programs/fontaliases
programs/fontaliases/freebsd/C/dtinfo.bdf
programs/fontaliases/freebsd/C/dtinfo.pcf
+programs/fontaliases/freebsd/C/dtinfo.pcf.gz
+programs/fontaliases/freebsd/C/dtinfo.pcf.Z
programs/fontaliases/freebsd/C/fonts.dir
# programs/ksh93
diff --git a/cde/osf/xmbind/0040.xmbind b/cde/osf/xmbind/0040.xmbind
index 1fbcd57..6aec74f 100755
--- a/cde/osf/xmbind/0040.xmbind
+++ b/cde/osf/xmbind/0040.xmbind
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/sh
#####################################################################
### File: 0040.xmbind
###
diff --git a/cde/programs/dtcm/server/log.h b/cde/programs/dtcm/server/log.h
index 4510507..c93d5f1 100644
--- a/cde/programs/dtcm/server/log.h
+++ b/cde/programs/dtcm/server/log.h
@@ -41,7 +41,11 @@
#define _DtCMS_DEFAULT_BAK ".calbak"
#define _DtCMS_DEFAULT_TMP ".caltmp"
#define _DtCMS_DEFAULT_DEL ".caldel"
+#if defined(CSRG_BASED)
+#define _DtCMS_DEFAULT_DIR "/var/spool/calendar"
+#else
#define _DtCMS_DEFAULT_DIR "/usr/spool/calendar"
+#endif
#define _DtCMS_DEFAULT_MODE (S_IRUSR|S_IRGRP|S_IWGRP)
typedef enum {
diff --git a/cde/programs/dtimsstart/0020.dtims
b/cde/programs/dtimsstart/0020.dtims
deleted file mode 100755
index 0cdc0f3..0000000
--- a/cde/programs/dtimsstart/0020.dtims
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/ksh
-#####################################################################
-### File: 0020.dtims
-###
-### Default Location: /usr/dt/config/Xsession.d/
-###
-### Purpose: Start desktop input method server if required
-###
-### Description:
-### This script is invoked by means of the Xsession file
-### at user login. It starts an input method server as
-### required for selected locales.
-###
-### Invoked by: /usr/dt/bin/Xsession
-###
-### Product: @(#)Common Desktop Environment 1.0
-###
-### Note:
-###
-### The /usr/dt/config/Xsession.d/0020.dtims file is a
-### factory-default file and will be unconditionally overwritten upon
-### subsequent installation. To customize input method server startup
-### behavior, copy this file to the configuration directory,
-### /etc/dt/config/Xsession.d and customize that version
-### of the file.
-###
-### The value of DTSTARTIMS determines whether this file,
-### /usr/dt/config/Xsession.d/0020.dtims, will start
-### the specified input method server. Should an input method server
-### be started from /etc/dt/config/Xsession.d/0020.dtims
-### or should an input method server not be desired, unset DTSTARTIMS
-### to prevent this file from starting one.
-###
-### The general logic of this file is:
-###
-### if [ "$DTSTARTIMS" = "True" ]
-### then
-### <start input method server>
-### unset DTSTARTIMS
-### fi
-###
-### Revision: $XConsortium: 0020.dtims /main/2 1996/07/18 14:23:41
drk $
-###
-### (c) Copyright 1993, 1994 Hewlett-Packard Company
-### (c) Copyright 1993, 1994 International Business Machines Corp.
-### (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-### (c) Copyright 1993, 1994 Novell, Inc.
-###
-#####################################################################
-
-if [ "$DTSTARTIMS" = "True" ]
-then
-
-#
-# Start HP platform IM (Input Method) server for Asian locales.
-#
-
- if [[ -z "${CDE_IMS_PID:-}" ]]
- then
-
- case "$LANG" in
- ja_JP* | japanese* | \
- ko_KR* | korean* | \
- zh_TW* | chinese-t* | \
- zh_CN* | chinese-s* )
-
- DTIMS_SCRIPT=0020.dtims
- DTIMS_CMD="/usr/dt/bin/dtimsstart -env -shell ksh"
-
- if [[ -x "${DTIMS_CMD%% *}" ]]; then
-
- # execute DTIMS_CMD and 'eval' its output
- Log "$DTIMS_SCRIPT: \"${DTIMS_CMD%% *}\" started."
- eval ` $DTIMS_CMD `
-
- # set CDE_IMS_PID to 0 (IMS started, but its pid is unknown.)
- CDE_IMS_PID=0
- else
- Log "$DTIMS_SCRIPT: \"${DTIMS_CMD%% *}\" not found."
- fi
-
- unset DTIMS_CMD DTIMS_SCRIPT
- ;;
- esac
- unset DTSTARTIMS
-
- fi
-
-fi
-
-########################## eof #####################
diff --git a/cde/programs/dtimsstart/0020.dtims.src
b/cde/programs/dtimsstart/0020.dtims.src
new file mode 100755
index 0000000..9ddddad
--- /dev/null
+++ b/cde/programs/dtimsstart/0020.dtims.src
@@ -0,0 +1,92 @@
+XCOMM !KORNSHELL
+XCOMM ####################################################################
+XCOMM ## File: 0020.dtims
+XCOMM ##
+XCOMM ## Default Location: /usr/dt/config/Xsession.d/
+XCOMM ##
+XCOMM ## Purpose: Start desktop input method server if required
+XCOMM ##
+XCOMM ## Description:
+XCOMM ## This script is invoked by means of the Xsession
file
+XCOMM ## at user login. It starts an input method server as
+XCOMM ## required for selected locales.
+XCOMM ##
+XCOMM ## Invoked by: /usr/dt/bin/Xsession
+XCOMM ##
+XCOMM ## Product: @(#)Common Desktop Environment 1.0
+XCOMM ##
+XCOMM ## Note:
+XCOMM ##
+XCOMM ## The /usr/dt/config/Xsession.d/0020.dtims file is a
+XCOMM ## factory-default file and will be unconditionally overwritten upon
+XCOMM ## subsequent installation. To customize input method server startup
+XCOMM ## behavior, copy this file to the configuration directory,
+XCOMM ## /etc/dt/config/Xsession.d and customize that version
+XCOMM ## of the file.
+XCOMM ##
+XCOMM ## The value of DTSTARTIMS determines whether this file,
+XCOMM ## /usr/dt/config/Xsession.d/0020.dtims, will start
+XCOMM ## the specified input method server. Should an input method server
+XCOMM ## be started from /etc/dt/config/Xsession.d/0020.dtims
+XCOMM ## or should an input method server not be desired, unset DTSTARTIMS
+XCOMM ## to prevent this file from starting one.
+XCOMM ##
+XCOMM ## The general logic of this file is:
+XCOMM ##
+XCOMM ## if [ "$DTSTARTIMS" = "True" ]
+XCOMM ## then
+XCOMM ## <start input method server>
+XCOMM ## unset DTSTARTIMS
+XCOMM ## fi
+XCOMM ##
+XCOMM ## Revision: $XConsortium: 0020.dtims /main/2 1996/07/18
14:23:41 drk $
+XCOMM ##
+XCOMM ## (c) Copyright 1993, 1994 Hewlett-Packard Company
+XCOMM ## (c) Copyright 1993, 1994 International Business Machines Corp.
+XCOMM ## (c) Copyright 1993, 1994 Sun Microsystems, Inc.
+XCOMM ## (c) Copyright 1993, 1994 Novell, Inc.
+XCOMM ##
+XCOMM ####################################################################
+#define HASH #
+
+if [ "$DTSTARTIMS" = "True" ]
+then
+
+XCOMM
+XCOMM Start HP platform IM (Input Method) server for Asian locales.
+XCOMM
+
+ if [[ -z "${CDE_IMS_PID:-}" ]]
+ then
+
+ case "$LANG" in
+ ja_JP* | japanese* | \
+ ko_KR* | korean* | \
+ zh_TW* | chinese-t* | \
+ zh_CN* | chinese-s* )
+
+ DTIMS_SCRIPT=0020.dtims
+ DTIMS_CMD="/usr/dt/bin/dtimsstart -env -shell ksh"
+
+ if [[ -x "${DTIMS_CMD%% *}" ]]; then
+
+ HASH execute DTIMS_CMD and 'eval' its output
+ Log "$DTIMS_SCRIPT: \"${DTIMS_CMD%% *}\" started."
+ eval ` $DTIMS_CMD `
+
+ HASH set CDE_IMS_PID to 0 (IMS started, but its pid is unknown.)
+ CDE_IMS_PID=0
+ else
+ Log "$DTIMS_SCRIPT: \"${DTIMS_CMD%% *}\" not found."
+ fi
+
+ unset DTIMS_CMD DTIMS_SCRIPT
+ ;;
+ esac
+ unset DTSTARTIMS
+
+ fi
+
+fi
+
+XCOMM ######################### eof #####################
diff --git a/cde/programs/dtimsstart/Imakefile
b/cde/programs/dtimsstart/Imakefile
index 5b571c0..a299def 100644
--- a/cde/programs/dtimsstart/Imakefile
+++ b/cde/programs/dtimsstart/Imakefile
@@ -25,6 +25,13 @@ EXTRA_CCOPTIONS = -xF
EXTRA_DEFINES = -DANSICPP
#endif /* RsArchitecture */
+CPP_TARGETS = 0020.dtims
+AllTarget($(CPP_TARGETS))
+
+LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
+ -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
+ -DKORNSHELL=$(KORNSHELL)
+
PROGRAMS=dtimsstart
SRCS = action.c env.c file.c \
@@ -36,3 +43,5 @@ OBJS = action.o env.o file.o \
start.o util.o win.o
ComplexProgramTarget($(PROGRAMS))
+
+CppSourceFile(0020.dtims,0020.dtims.src,$(LOCAL_CPP_DEFINES),)
diff --git a/cde/programs/dtlogin/config/Xservers.src
b/cde/programs/dtlogin/config/Xservers.src
index f87fefd..7aa7aea 100644
--- a/cde/programs/dtlogin/config/Xservers.src
+++ b/cde/programs/dtlogin/config/Xservers.src
@@ -113,6 +113,10 @@ XCOMM * Local local@console /usr/bin/X11/X :0
:0 Local local@console /usr/bin/X11/X :0
#elif defined (linux)
:0 Local local_uid@tty1 root /usr/bin/X :0
+#elif defined (__OpenBSD__)
+ :0 Local local@console /usr/X11R6/bin/X :0
+#elif defined (__FreeBSD__)
+ :0 Local local@console /usr/local/bin/X :0
#else
* Local local@console /usr/bin/X11/X :0
#endif
diff --git a/cde/programs/dtlogin/config/Xsession.src
b/cde/programs/dtlogin/config/Xsession.src
index fc62821..6504d83 100644
--- a/cde/programs/dtlogin/config/Xsession.src
+++ b/cde/programs/dtlogin/config/Xsession.src
@@ -79,6 +79,22 @@ XCOMM
##########################################################################
# define cpp_HELLO "$DT_BINPATH/dthello -file /usr/dt/copyright &"
#endif
+#ifdef __FreeBSD__
+# define cpp_MAIL "/var/mail/$USER"
+# define cpp_XINITUSER "$HOME/.xinitrc"
+# define cpp_XDMSYS "/usr/local/lib/X11/xdm/Xsession"
+# undef cpp_HELLO
+# define cpp_HELLO "$DT_BINPATH/dthello -file /usr/dt/copyright &"
+#endif
+
+#ifdef __OpenBSD__
+# define cpp_MAIL "/var/mail/$USER"
+# define cpp_XINITUSER "$HOME/.xinitrc"
+# define cpp_XDMSYS "/etc/X11/xdm/Xsession"
+# undef cpp_HELLO
+# define cpp_HELLO "$DT_BINPATH/dthello -file /usr/dt/copyright &"
+#endif
+
#if 0
/*
diff --git a/cde/programs/dtlogin/config/Xsetup.src
b/cde/programs/dtlogin/config/Xsetup.src
index 953dd96..3060ad8 100644
--- a/cde/programs/dtlogin/config/Xsetup.src
+++ b/cde/programs/dtlogin/config/Xsetup.src
@@ -56,8 +56,12 @@ fi
#ifdef sun
XDIR=/usr/openwin/bin
-#elif defined(CSRG_BASED) || defined(linux)
+#elif defined(linux)
XDIR=/usr/bin
+#elif defined(__OpenBSD__)
+ XDIR=/usr/X11R6/bin
+#elif defined(__FreeBSD__)
+ XDIR=/usr/local/bin
#else
XDIR=/usr/bin/X11
#endif
diff --git a/cde/programs/dtlogin/config/Xstartup.src
b/cde/programs/dtlogin/config/Xstartup.src
index f3766d3..15af0ba 100644
--- a/cde/programs/dtlogin/config/Xstartup.src
+++ b/cde/programs/dtlogin/config/Xstartup.src
@@ -57,8 +57,16 @@ if [ "$DTXSERVERLOCATION" = "local" ]
then
if [[ ! -z "$ITE" && "$ITE" != "??" && -a "/dev/$ITE" ]]
then
+#if defined (__OpenBSD__)
+ /sbin/chown $USER /dev/$ITE
+ /bin/chgrp $USER_GID /dev/$ITE
+#elif defined (__FreeBSD__)
+ /usr/sbin/chown $USER /dev/$ITE
+ /usr/bin/chgrp $USER_GID /dev/$ITE
+#else
/bin/chown $USER /dev/$ITE
/bin/chgrp $USER_GID /dev/$ITE
+#endif
fi
fi
diff --git a/cde/programs/dtsearchpath/0010.dtpaths.src
b/cde/programs/dtsearchpath/0010.dtpaths.src
index afcd362..f29685a 100644
--- a/cde/programs/dtsearchpath/0010.dtpaths.src
+++ b/cde/programs/dtsearchpath/0010.dtpaths.src
@@ -1,4 +1,4 @@
-XCOMM!/bin/ksh
+XCOMM !KORNSHELL
XCOMM ####################################################################
XCOMM ## File: 0010.dtpaths
XCOMM ##
diff --git a/cde/programs/dtsearchpath/0030.dttmpdir.src
b/cde/programs/dtsearchpath/0030.dttmpdir.src
index 509966c..a2472e3 100644
--- a/cde/programs/dtsearchpath/0030.dttmpdir.src
+++ b/cde/programs/dtsearchpath/0030.dttmpdir.src
@@ -1,4 +1,4 @@
-XCOMM!/bin/ksh
+XCOMM !KORNSHELL
XCOMM ####################################################################
XCOMM ## File: 0030.dttmpdir
XCOMM ##
diff --git a/cde/programs/dtsearchpath/Imakefile
b/cde/programs/dtsearchpath/Imakefile
index e116f4d..331e309 100644
--- a/cde/programs/dtsearchpath/Imakefile
+++ b/cde/programs/dtsearchpath/Imakefile
@@ -12,7 +12,8 @@ CPP_TARGETS = 0010.dtpaths 0030.dttmpdir
AllTarget($(CPP_TARGETS))
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
- -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP)
+ -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
+ -DKORNSHELL=$(KORNSHELL)
CppSourceFile(0010.dtpaths,0010.dtpaths.src,$(LOCAL_CPP_DEFINES),)
CppSourceFile(0030.dttmpdir,0030.dttmpdir.src,$(LOCAL_CPP_DEFINES),)
--
1.7.8
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel