cdesktopenv: 2.3.2 -> 2.5.1

+43 -524
+2 -2
nixos/modules/services/x11/desktop-managers/cde.nix
··· 36 36 name = "cmsd"; 37 37 protocol = "udp"; 38 38 user = "root"; 39 - server = "${pkgs.cdesktopenv}/opt/dt/bin/rpc.cmsd"; 39 + server = "${pkgs.cdesktopenv}/bin/rpc.cmsd"; 40 40 extraConfig = '' 41 41 type = RPC UNLISTED 42 42 rpc_number = 100068 ··· 64 64 services.xserver.desktopManager.session = [ 65 65 { name = "CDE"; 66 66 start = '' 67 - exec ${pkgs.cdesktopenv}/opt/dt/bin/Xsession 67 + exec ${pkgs.cdesktopenv}/bin/Xsession 68 68 ''; 69 69 }]; 70 70 };
-336
pkgs/desktops/cdesktopenv/0001-all-remove-deprecated-sys_errlist-and-replace-with-A.patch
··· 1 - From 67f62e5a8acd70d30f7067f1f44ac7b15c67011a Mon Sep 17 00:00:00 2001 2 - From: Peter Howkins <flibble@users.sf.net> 3 - Date: Mon, 2 Nov 2020 05:30:08 +0000 4 - Subject: [PATCH] all: remove deprecated sys_errlist[] and replace with ANSI C 5 - strerror() 6 - 7 - --- 8 - cde/config/imake/imake.c | 13 ------------- 9 - cde/lib/tt/bin/dbck/spec.C | 8 -------- 10 - cde/lib/tt/lib/tt_options.h | 12 ------------ 11 - cde/programs/dtcm/dtcm/dnd.c | 4 ---- 12 - cde/programs/dtcm/libDtCmP/util.c | 5 +---- 13 - .../dthelp/parser.ccdf/volumegen/Volumegen.c | 1 - 14 - cde/programs/dtimsstart/remote.c | 4 ---- 15 - cde/programs/dtimsstart/start.c | 12 +++--------- 16 - cde/programs/dtinfo/dtinfo/src/external-api/comm.c | 5 +---- 17 - .../dtksh/ksh93/src/lib/libast/string/fmterror.c | 9 +-------- 18 - .../dtksh/ksh93/src/lib/libast/string/strerror.c | 8 +------- 19 - cde/programs/dtlogin/dm.h | 7 +------ 20 - 12 files changed, 8 insertions(+), 80 deletions(-) 21 - 22 - diff --git a/cde/config/imake/imake.c b/cde/config/imake/imake.c 23 - index 574af7c7..83834aa7 100644 24 - --- a/cde/config/imake/imake.c 25 - +++ b/config/imake/imake.c 26 - @@ -242,19 +242,6 @@ extern int errno; 27 - #include <stdarg.h> 28 - #include "imakemdep.h" 29 - 30 - -/* 31 - - * This define of strerror is copied from (and should be identical to) 32 - - * Xos.h, which we don't want to include here for bootstrapping reasons. 33 - - */ 34 - -#if defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4)) 35 - -# ifndef strerror 36 - -extern char *sys_errlist[]; 37 - -extern int sys_nerr; 38 - -# define strerror(n) \ 39 - - (((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error") 40 - -# endif 41 - -#endif 42 - - 43 - #define TRUE 1 44 - #define FALSE 0 45 - 46 - diff --git a/cde/lib/tt/bin/dbck/spec.C b/cde/lib/tt/bin/dbck/spec.C 47 - index 18bba3fb..eaf2d6b7 100644 48 - --- a/cde/lib/tt/bin/dbck/spec.C 49 - +++ b/lib/tt/bin/dbck/spec.C 50 - @@ -44,14 +44,6 @@ 51 - #include "ttdbck.h" 52 - #include "tt_db_server_consts.h" 53 - 54 - -#if !defined(OPT_STRERROR) 55 - -// No strerror(), fake it 56 - -char * 57 - -strerror(int e) 58 - -{ 59 - - return ((e<sys_nerr) ? sys_errlist[e] : "unknown"); 60 - -} 61 - -#endif 62 - 63 - Spec:: 64 - Spec() 65 - diff --git a/cde/lib/tt/lib/tt_options.h b/cde/lib/tt/lib/tt_options.h 66 - index e23bb9e5..de3a30e2 100644 67 - --- a/cde/lib/tt/lib/tt_options.h 68 - +++ b/lib/tt/lib/tt_options.h 69 - @@ -107,10 +107,6 @@ 70 - * OPT_CPP_OPTIONS - string, options to pass to cpp. For example, on 71 - * some platforms -B is used so C++ comments are processed by cpp. 72 - * 73 - - * 74 - - * OPT_STRERROR - set if strerror() is available, otherwise we assume 75 - - * global symbol sys_errlist is defined in errno.h. 76 - - * 77 - * OPT_SVR4_GETMNTENT - set to use new SVR4 flavor of getmntent. 78 - * 79 - * OPT_LOCKF_MNTTAB - set to hold a lockf lock on MNTTAB while doing 80 - @@ -242,7 +238,6 @@ 81 - # undef OPT_SYSINFO 82 - # define OPT_CPP_PATH "/usr/ccs/lib/cpp" 83 - # define OPT_CPP_OPTIONS "" 84 - -# define OPT_STRERROR 85 - # undef OPT_SVR4_GETMNTENT 86 - # undef OPT_LOCKF_MNTENT 87 - # define OPT_DEFINE_SIG_PF 88 - @@ -273,7 +268,6 @@ 89 - # undef OPT_SYSINFO 90 - # define OPT_CPP_PATH "/usr/lib/cpp" 91 - # define OPT_CPP_OPTIONS "-B" 92 - -# undef OPT_STRERROR 93 - # undef OPT_SVR4_GETMNTENT 94 - # undef OPT_LOCKF_MNTENT 95 - # define OPT_LOCAL_MOUNT_TYPE MNTTYPE_42 96 - @@ -302,7 +296,6 @@ 97 - # define OPT_CATGETS 98 - # undef OPT_GETDTABLESIZE 99 - # define OPT_SYSINFO 100 - -# define OPT_STRERROR 101 - # define OPT_CPP_PATH "/usr/ccs/lib/cpp" 102 - # define OPT_CPP_OPTIONS "-B" 103 - # define OPT_SVR4_GETMNTENT 104 - @@ -389,7 +382,6 @@ 105 - # define OPT_CPP_PATH "/opt/langtools/lbin/cpp" 106 - # endif 107 - # define OPT_CPP_OPTIONS "" 108 - -# define OPT_STRERROR 109 - # undef OPT_SVR4_GETMNTENT 110 - # undef OPT_LOCKF_MNTENT 111 - # define OPT_LOCAL_MOUNT_TYPE MNTTYPE_HFS 112 - @@ -415,7 +407,6 @@ 113 - # undef OPT_SYSINFO 114 - # define OPT_CPP_PATH "/usr/bin/cpp" 115 - # define OPT_CPP_OPTIONS "" 116 - -# define OPT_STRERROR 117 - # undef OPT_SVR4_GETMNTENT 118 - # undef OPT_LOCKF_MNTENT 119 - # define OPT_LOCAL_MOUNT_TYPE "ext2fs" 120 - @@ -446,7 +437,6 @@ 121 - # undef OPT_SYSINFO 122 - # define OPT_CPP_PATH "/usr/libexec/cpp" 123 - # define OPT_CPP_OPTIONS "" 124 - -# define OPT_STRERROR 125 - # undef OPT_SVR4_GETMNTENT 126 - # undef OPT_LOCKF_MNTENT 127 - # define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS 128 - @@ -479,7 +469,6 @@ 129 - # define OPT_CPP_PATH "/usr/libexec/cpp" 130 - # endif 131 - # define OPT_CPP_OPTIONS "" 132 - -# define OPT_STRERROR 133 - # undef OPT_SVR4_GETMNTENT 134 - # undef OPT_LOCKF_MNTENT 135 - # define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS 136 - @@ -509,7 +498,6 @@ 137 - # undef OPT_SYSINFO 138 - # define OPT_CPP_PATH "/usr/bin/cpp" 139 - # define OPT_CPP_OPTIONS "" 140 - -# define OPT_STRERROR 141 - # undef OPT_SVR4_GETMNTENT 142 - # undef OPT_LOCKF_MNTENT 143 - # define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS 144 - diff --git a/cde/programs/dtcm/dtcm/dnd.c b/cde/programs/dtcm/dtcm/dnd.c 145 - index abc58c12..f37f19a6 100644 146 - --- a/cde/programs/dtcm/dtcm/dnd.c 147 - +++ b/programs/dtcm/dtcm/dnd.c 148 - @@ -72,10 +72,6 @@ 149 - 150 - static Bool lookForButton(Display *, XEvent *, XPointer); 151 - 152 - -#if !defined(__linux__) && !defined(CSRG_BASED) 153 - -extern char *sys_errlist[]; 154 - -#endif 155 - - 156 - extern int drag_load_proc(char*, Calendar *); 157 - static char dnd_filename[20]; 158 - 159 - diff --git a/cde/programs/dtcm/libDtCmP/util.c b/cde/programs/dtcm/libDtCmP/util.c 160 - index d33b8ba1..6de4739d 100644 161 - --- a/cde/programs/dtcm/libDtCmP/util.c 162 - +++ b/programs/dtcm/libDtCmP/util.c 163 - @@ -306,10 +306,7 @@ syserr(char *msg, int a1, int a2, int a3) 164 - #if 0 165 - /* print the error, if any */ 166 - if (saveerr != 0) { 167 - - if (saveerr < 0 || saveerr > sys_nerr) 168 - - (void) fprintf(stderr, ":Unknown error %d", saveerr); 169 - - else 170 - - (void) fprintf(stderr, ":%s", sys_errlist[saveerr]); 171 - + (void) fprintf(stderr, ":%s", strerror(saveerr)); 172 - } 173 - #endif 174 - 175 - diff --git a/cde/programs/dthelp/parser.ccdf/volumegen/Volumegen.c b/cde/programs/dthelp/parser.ccdf/volumegen/Volumegen.c 176 - index d9a42943..08de4809 100644 177 - --- a/cde/programs/dthelp/parser.ccdf/volumegen/Volumegen.c 178 - +++ b/programs/dthelp/parser.ccdf/volumegen/Volumegen.c 179 - @@ -56,7 +56,6 @@ 180 - typedef int Boolean; 181 - 182 - /* extern int errno; */ 183 - -/* extern char *sys_errlist[]; */ 184 - /* extern int sys_nerr; */ 185 - 186 - static void GenTopicList ( 187 - diff --git a/cde/programs/dtimsstart/remote.c b/cde/programs/dtimsstart/remote.c 188 - index 68773673..71d32977 100644 189 - --- a/cde/programs/dtimsstart/remote.c 190 - +++ b/programs/dtimsstart/remote.c 191 - @@ -37,10 +37,6 @@ 192 - #include <X11/Xproto.h> /* for X_ChangeHosts */ 193 - #include <X11/Xatom.h> /* for XA_STRING */ 194 - 195 - -#if !defined(__linux__) && !defined(CSRG_BASED) 196 - -extern char *sys_errlist[]; 197 - -#endif 198 - - 199 - static char *conf_msg_id = STR_CONFDATA; 200 - 201 - #define CONF_MSG_ID_LEN strlen(conf_msg_id) 202 - diff --git a/cde/programs/dtimsstart/start.c b/cde/programs/dtimsstart/start.c 203 - index 78fc2a38..1dafa189 100644 204 - --- a/cde/programs/dtimsstart/start.c 205 - +++ b/programs/dtimsstart/start.c 206 - @@ -27,14 +27,10 @@ 207 - #include <sys/wait.h> 208 - #include <setjmp.h> 209 - #include <unistd.h> 210 - +#include <errno.h> 211 - 212 - #if (defined(__linux__) || defined(CSRG_BASED)) && !defined(_NFILE) 213 - #define _NFILE FOPEN_MAX 214 - -#endif 215 - - 216 - -#if !defined(__linux__) && !defined(CSRG_BASED) 217 - -extern char *sys_errlist[]; 218 - -extern int sys_nerr; 219 - #endif 220 - 221 - /* local functions */ 222 - @@ -599,8 +595,7 @@ static int invoke_ims(UserSelection *sel) 223 - 224 - pid = fork(); 225 - if (pid == (pid_t) -1) { 226 - - put_xims_log("fork failed [%s]", 227 - - (errno <= sys_nerr) ? sys_errlist[errno] : NULL, 0, 0); 228 - + put_xims_log("fork failed [%s]", strerror(errno), 0, 0); 229 - #ifdef DEBUG 230 - perror("fork"); 231 - #endif 232 - @@ -617,8 +612,7 @@ static int invoke_ims(UserSelection *sel) 233 - #endif 234 - execl(SH_PATH, "sh", "-c", renv->cmdbuf, NULL); 235 - 236 - - put_xims_log("%s: exec failed [%s]", SH_PATH, 237 - - (errno <= sys_nerr) ? sys_errlist[errno] : NULL, 0, 0); 238 - + put_xims_log("%s: exec failed [%s]", SH_PATH, strerror(errno) , 0, 0); 239 - /* perror(SH_PATH); */ 240 - sleep(1); 241 - _exit(1); 242 - diff --git a/cde/programs/dtinfo/dtinfo/src/external-api/comm.c b/cde/programs/dtinfo/dtinfo/src/external-api/comm.c 243 - index d61ccb7a..6aa2fc91 100644 244 - --- a/cde/programs/dtinfo/dtinfo/src/external-api/comm.c 245 - +++ b/programs/dtinfo/dtinfo/src/external-api/comm.c 246 - @@ -53,9 +53,6 @@ 247 - #include <sys/select.h> 248 - #endif 249 - 250 - -extern char *sys_errlist[]; 251 - - 252 - - 253 - static OliasEvent *current_event; 254 - static int reply_status; 255 - #define NO_REPLY 0 256 - @@ -332,7 +329,7 @@ wait_for_reply (Widget toplevel) 257 - XtAppWarningMsg (XtWidgetToApplicationContext (toplevel), 258 - "communicationsError", "select", 259 - "Olias API", "Select failed: %s", 260 - - &sys_errlist[errno], &num_params); 261 - + strerror(errno), &num_params); 262 - continue; 263 - } 264 - continue; 265 - diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmterror.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmterror.c 266 - index 313b67bc..8dd87ab8 100644 267 - --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmterror.c 268 - +++ b/programs/dtksh/ksh93/src/lib/libast/string/fmterror.c 269 - @@ -92,14 +92,7 @@ 270 - #endif 271 - #include <ast.h> 272 - 273 - -extern __MANGLE__ int sys_nerr; 274 - -extern __MANGLE__ char* sys_errlist[]; 275 - - 276 - char* 277 - fmterror __PARAM__((int err), (err)) __OTORP__(int err;){ 278 - - static char msg[28]; 279 - - 280 - - if (err > 0 && err <= sys_nerr) return(sys_errlist[err]); 281 - - sfsprintf(msg, sizeof(msg), "Error %d", err); 282 - - return(msg); 283 - + return strerror(err); 284 - } 285 - diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strerror.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strerror.c 286 - index 7686a54d..a6aa7ce8 100644 287 - --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strerror.c 288 - +++ b/programs/dtksh/ksh93/src/lib/libast/string/strerror.c 289 - @@ -108,18 +108,12 @@ NoN(strerror) 290 - 291 - #include <ast.h> 292 - 293 - -extern __MANGLE__ int sys_nerr; 294 - -extern __MANGLE__ char* sys_errlist[]; 295 - 296 - char* 297 - strerror __PARAM__((int err), (err)) __OTORP__(int err;) 298 - #line 25 299 - { 300 - - static char msg[28]; 301 - - 302 - - if (err > 0 && err <= sys_nerr) return(sys_errlist[err]); 303 - - sfsprintf(msg, sizeof(msg), "Error %d", err); 304 - - return(msg); 305 - + return strerror(err); 306 - } 307 - 308 - #endif 309 - diff --git a/cde/programs/dtlogin/dm.h b/cde/programs/dtlogin/dm.h 310 - index 3e0f2499..e67edc3c 100644 311 - --- a/cde/programs/dtlogin/dm.h 312 - +++ b/programs/dtlogin/dm.h 313 - @@ -68,8 +68,7 @@ 314 - # include <pwd.h> /* for passwd structure */ 315 - # include <stdio.h> 316 - # include <stdlib.h> /* for exit(), malloc(), abort() */ 317 - -# include <string.h> /* for string functions, bcopy(), 318 - - sys_errlist */ 319 - +# include <string.h> /* for string functions, bcopy() */ 320 - # include <sys/param.h> /* for NGROUPS */ 321 - # include <sys/types.h> /* for fd_set */ 322 - # include <netinet/in.h> /* for Internet socket stuff */ 323 - @@ -475,10 +474,6 @@ struct verify_info { 324 - * 325 - ***************************************************************************/ 326 - 327 - -#if !defined(__linux__) && !defined(CSRG_BASED) 328 - -extern char *sys_errlist[]; /* system error msgs */ 329 - -extern int sys_nerr; /* system error msgs */ 330 - -#endif 331 - extern XrmDatabase XresourceDB; 332 - 333 - 334 - -- 335 - 2.28.0 336 -
-106
pkgs/desktops/cdesktopenv/2.3.2.patch
··· 1 - From 8db8a2290683acf94f02e855af668a864d6001c2 Mon Sep 17 00:00:00 2001 2 - Subject: [PATCH 1/2] installCDE: don't hardcode path to whoami 3 - --- 4 - cde/admin/IntegTools/dbTools/installCDE.src | 11 ++--------- 5 - cde/admin/IntegTools/dbTools/mkProd | 9 +-------- 6 - 2 files changed, 3 insertions(+), 17 deletions(-) 7 - 8 - diff --git a/cde/admin/IntegTools/dbTools/installCDE.src b/cde/admin/IntegTools/dbTools/installCDE.src 9 - index a00fefd1..233b4a96 100755 10 - --- a/cde/admin/IntegTools/dbTools/installCDE.src 11 - +++ b/admin/IntegTools/dbTools/installCDE.src 12 - @@ -52,7 +52,7 @@ LOGFILE="installCDE.$$.log" 13 - 14 - Log() 15 - { 16 - - /bin/echo "$1" | tee -a $LOGFILE 17 - + echo "$1" | tee -a $LOGFILE 18 - } 19 - 20 - MakeTarball() 21 - @@ -537,14 +537,7 @@ XCOMM 22 - PLATFORM_SCRIPT_DIR=hp 23 - fi 24 - 25 - - if [ "$PLATFORM" = "aix" ]; 26 - - then 27 - - USER=$(/bin/whoami) 28 - - else 29 - - USER=$(/usr/bin/whoami) 30 - - fi 31 - - 32 - - if [ "$USER" != "root" ]; 33 - + if [ $(whoami) != "root" ]; 34 - then 35 - echo "" 36 - echo "You should be root to run this script. Continuing anyway." 37 - diff --git a/cde/admin/IntegTools/dbTools/mkProd b/cde/admin/IntegTools/dbTools/mkProd 38 - index 44591fab..413a77e8 100755 39 - --- a/cde/admin/IntegTools/dbTools/mkProd 40 - +++ b/admin/IntegTools/dbTools/mkProd 41 - @@ -96,13 +96,6 @@ else # Build system = HP 42 - PLATFORM=hp-ux 43 - fi 44 - 45 - -if [ $PLATFORM = "aix" ]; 46 - -then 47 - - USER=`/bin/whoami` 48 - -else 49 - - USER=`/usr/bin/whoami` 50 - -fi 51 - - 52 - awkit() { 53 - awk ' 54 - BEGIN { 55 - @@ -504,7 +497,7 @@ doit() 56 - } 57 - # set permissions for non-links 58 - if [ "${TYPE%link}" = "$TYPE" ]; then 59 - - if [ "$USER" = "root" ]; then 60 - + if [ $(whoami) = "root" ]; then 61 - chgrp $GROUP $DEST || 62 - echo "ERROR: \"chgrp $GROUP $DEST\" failed" >&2 63 - chown $OWNER $DEST || 64 - -- 65 - 2.25.0 66 - 67 - 68 - From 9221c55a5f811986eaf0e01301827c294ac2e29b Mon Sep 17 00:00:00 2001 69 - Subject: [PATCH 2/2] tt_type_comp: use CppCmd definition 70 - --- 71 - cde/lib/tt/bin/tt_type_comp/Imakefile | 4 +++- 72 - cde/lib/tt/lib/tt_options.h | 5 +++++ 73 - 2 files changed, 8 insertions(+), 1 deletion(-) 74 - 75 - diff --git a/cde/lib/tt/bin/tt_type_comp/Imakefile b/cde/lib/tt/bin/tt_type_comp/Imakefile 76 - index 92179208..62434929 100644 77 - --- a/cde/lib/tt/bin/tt_type_comp/Imakefile 78 - +++ b/lib/tt/bin/tt_type_comp/Imakefile 79 - @@ -8,7 +8,9 @@ EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB) 80 - 81 - #include "../../tooltalk.tmpl" 82 - 83 - -DEFINES = 84 - +CPP_PROGRAM = CppCmd 85 - +CPP_DEFINES = -DCPP_PROGRAM="\"$(CPP_PROGRAM)\"" 86 - +DEFINES = $(CPP_DEFINES) 87 - INCLUDES = $(TIRPCINC) -I../../lib -I../../slib 88 - 89 - DEPLIBS = ../../slib/libstt.a TtClientDepLibs 90 - diff --git a/cde/lib/tt/lib/tt_options.h b/cde/lib/tt/lib/tt_options.h 91 - index 4315daa8..e23bb9e5 100644 92 - --- a/cde/lib/tt/lib/tt_options.h 93 - +++ b/lib/tt/lib/tt_options.h 94 - @@ -529,4 +529,9 @@ 95 - 96 - #endif 97 - 98 - +#ifdef CPP_PROGRAM 99 - +# undef OPT_CPP_PATH 100 - +# define OPT_CPP_PATH CPP_PROGRAM 101 - +#endif 102 - + 103 - #endif /* _TT_OPTIONS_H */ 104 - -- 105 - 2.25.0 106 -
+41 -80
pkgs/desktops/cdesktopenv/default.nix
··· 1 1 { lib, stdenv, fetchurl 2 - , fetchpatch 3 - , xorgproto, libX11, bison, ksh, perl, gnum4 2 + , libX11, bison, ksh, perl 4 3 , libXinerama, libXt, libXext, libtirpc, motif, libXft, xbitmaps 5 - , libjpeg, libXmu, libXdmcp, libXScrnSaver, symlinkJoin, bdftopcf 6 - , ncompress, mkfontdir, tcl-8_5, libXaw, libxcrypt, gcc, glibcLocales 7 - , autoPatchelfHook, libredirect, makeWrapper, xset, xrdb, fakeroot 4 + , libjpeg, libXmu, libXdmcp, libXScrnSaver, bdftopcf 5 + , ncompress, mkfontdir, tcl, libXaw, libxcrypt, glibcLocales 6 + , autoPatchelfHook, makeWrapper, xset, xrdb 7 + , autoreconfHook, opensp, flex, libXpm 8 8 , rpcsvc-proto }: 9 9 10 - let 11 - x11ProjectRoot = symlinkJoin { 12 - name = "x11ProjectRoot"; 13 - paths = [ 14 - bdftopcf mkfontdir 15 - xset # fonts 16 - xrdb # session load 17 - ]; 18 - }; 19 - in stdenv.mkDerivation rec { 20 - version = "2.3.2"; 10 + stdenv.mkDerivation rec { 21 11 pname = "cde"; 12 + version = "2.5.1"; 22 13 23 14 src = fetchurl { 24 15 url = "mirror://sourceforge/cdesktopenv/cde-${version}.tar.gz"; 25 - sha256 = "029rljhi5r483x8rzdpl8625z0wx8r7k2m0364nbw66h5pig9lbx"; 16 + hash = "sha256-caslezz2kbljwApv5igDPH345PK2YqQUTi1YZgvM1Dw="; 26 17 }; 27 18 28 - # remove with next release 29 - patches = [ 30 - ./2.3.2.patch 31 - ./0001-all-remove-deprecated-sys_errlist-and-replace-with-A.patch 19 + postPatch = '' 20 + for f in $(find . -type f ! -path doc/common); do 21 + sed -i \ 22 + -e "s|/usr/dt|$out|g" \ 23 + -e "s|/etc/dt|$out/etc|g" \ 24 + -e "s|\$(DESTDIR)/var|$out/var|g" \ 25 + "$f" 26 + done 32 27 33 - (fetchpatch { 34 - name = "binutils-2.36.patch"; 35 - url = "https://github.com/cdesktopenv/cde/commit/0b7849e210a99a413ddeb52a0eb5aef9a08504a0.patch"; 36 - sha256 = "0wlhs617hws3rwln9v74y1nw27n3pp7jkpnxlala7k5y64506ipj"; 37 - stripLen = 1; 38 - }) 39 - ]; 28 + for f in $(find . -type f -name "Makefile.am"); do 29 + sed -i \ 30 + -e "/chown /d" \ 31 + -e "/chgrp /d" \ 32 + -e "s/chmod 4755/chmod 755/g" \ 33 + "$f" 34 + done 35 + 36 + substituteInPlace configure.ac \ 37 + --replace "-I/usr/include/tirpc" "-I${libtirpc.dev}/include/tirpc" 38 + 39 + patchShebangs autogen.sh config.rpath contrib programs 40 + ''; 40 41 41 42 buildInputs = [ 42 43 libX11 libXinerama libXt libXext libtirpc motif libXft xbitmaps 43 - libjpeg libXmu libXdmcp libXScrnSaver tcl-8_5 libXaw ksh libxcrypt 44 + libjpeg libXmu libXdmcp libXScrnSaver tcl libXaw ksh libxcrypt 45 + libXpm 44 46 ]; 45 47 nativeBuildInputs = [ 46 - bison ncompress autoPatchelfHook makeWrapper fakeroot 48 + bison ncompress autoPatchelfHook makeWrapper 49 + autoreconfHook bdftopcf mkfontdir xset xrdb opensp perl flex 47 50 rpcsvc-proto 48 51 ]; 49 - # build fails otherwise 50 - enableParallelBuilding = false; 51 52 52 - # Workaround build failure on -fno-common toolchains: 53 - # ld: raima/startup.o:/build/cde-2.3.2/lib/DtSearch/raima/dbtype.h:408: multiple definition of 54 - # `__SK__'; raima/alloc.o:/build/cde-2.3.2/lib/DtSearch/raima/dbtype.h:408: first defined here 55 - env.NIX_CFLAGS_COMPILE = "-fcommon"; 56 - 57 - makeFlags = [ 58 - "World" 59 - "BOOTSTRAPCFLAGS=-I${xorgproto}/include/X11" 60 - "IMAKECPP=cpp" 61 - "LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive" 62 - # Workaround for dtdocbook issue with tcl 8.6.13. 63 - # TODO: this might be possible to remove when updating CDE 64 - "TCLLIB=-ltcl8.5" 65 - ]; 53 + enableParallelBuilding = true; 66 54 67 55 preConfigure = '' 68 - # binutils 2.37 fix 69 - fixupList=( 70 - "config/cf/Imake.tmpl" 71 - "config/util/crayar.sh" 72 - "config/util/crayar.sh" 73 - "programs/dtwm/Makefile.tmpl" 74 - ) 75 - for toFix in "''${fixupList[@]}"; do 76 - substituteInPlace "$toFix" --replace "clq" "cq" 77 - done 78 - ''; 79 - 80 - preBuild = '' 81 - while IFS= read -r -d ''$'\0' i; do 82 - substituteInPlace "$i" --replace /usr/dt $out/opt/dt 83 - done < <(find "." -type f -exec grep -Iq /usr/dt {} \; -and -print0) 84 - 85 - cat >> config/cf/site.def << EOF 86 - #define MakeFlagsToShellFlags(makeflags,shellcmd) set -e 87 - #define KornShell ${ksh}/bin/ksh 88 - #define PerlCmd ${perl}/bin/perl 89 - #define M4Cmd ${gnum4}/bin/m4 90 - #define X11ProjectRoot ${x11ProjectRoot} 91 - #define CppCmd ${gcc}/bin/cpp 92 - TIRPCINC = -I${libtirpc.dev}/include/tirpc 93 - EOF 94 - 95 - patchShebangs . 96 - unset AR 56 + export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive" 97 57 ''; 98 58 99 - installPhase = '' 100 - fakeroot admin/IntegTools/dbTools/installCDE -s . -DontRunScripts 59 + configureFlags = [ 60 + "--with-tcl=${tcl}/lib" 61 + ]; 101 62 102 - mkdir -p $out/bin 103 - mv $out/opt/dt/bin/dtmail $out/bin 63 + preInstall = '' 64 + mkdir -p $out/opt/dt/bin 104 65 ''; 105 66 106 67 meta = with lib; { ··· 108 69 homepage = "https://sourceforge.net/projects/cdesktopenv/"; 109 70 license = licenses.lgpl2; 110 71 maintainers = [ ]; 111 - platforms = [ "i686-linux" "x86_64-linux" ]; 72 + platforms = platforms.linux; 112 73 }; 113 74 }