diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2025-11-08 20:51:53 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2025-11-08 20:54:54 +0900 |
| commit | 102d0a86fb7e440b2f6c26d8953d6ef75ead8e51 (patch) | |
| tree | 32d2bb243b41898889a234cc9a5534e9604fabf7 | |
| parent | dc78389a201123a37b1d083493bff28af4c705ea (diff) | |
Reapply "gnu: squeak-vm: Fix build and modernize definition."
This reverts commit 9ab50a57ac414f6476295fa75563e215d4115ae2. Now with the
missing patch added.
* gnu/packages/patches/squeak-vm-gcc-14-fix.patch: New file.
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/patches/squeak-vm-gcc-14-fix.patch | 675 | ||||
| -rw-r--r-- | gnu/packages/smalltalk.scm | 55 |
3 files changed, 701 insertions, 30 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index bf605632252..abc28926efe 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -2077,6 +2077,7 @@ dist_patch_DATA = \ | |||
| 2077 | %D%/packages/patches/smalltalk-multiplication-overflow.patch \ | 2077 | %D%/packages/patches/smalltalk-multiplication-overflow.patch \ |
| 2078 | %D%/packages/patches/soci-mysql-ddl-types.patch \ | 2078 | %D%/packages/patches/soci-mysql-ddl-types.patch \ |
| 2079 | %D%/packages/patches/sqlite-hurd.patch \ | 2079 | %D%/packages/patches/sqlite-hurd.patch \ |
| 2080 | %D%/packages/patches/squeak-vm-gcc-14-fix.patch \ | ||
| 2080 | %D%/packages/patches/stepmania-ffmpeg-compat.patch \ | 2081 | %D%/packages/patches/stepmania-ffmpeg-compat.patch \ |
| 2081 | %D%/packages/patches/stk-5.0.1-fix-typo.patch \ | 2082 | %D%/packages/patches/stk-5.0.1-fix-typo.patch \ |
| 2082 | %D%/packages/patches/strace-readlink-tests.patch \ | 2083 | %D%/packages/patches/strace-readlink-tests.patch \ |
diff --git a/gnu/packages/patches/squeak-vm-gcc-14-fix.patch b/gnu/packages/patches/squeak-vm-gcc-14-fix.patch new file mode 100644 index 00000000000..8fcdb72330e --- /dev/null +++ b/gnu/packages/patches/squeak-vm-gcc-14-fix.patch | |||
| @@ -0,0 +1,675 @@ | |||
| 1 | Retrieved from: https://src.fedoraproject.org/rpms/squeak-vm/raw/rawhide/f/squeak-vm-4.10.2-gcc-14-fix.patch | ||
| 2 | |||
| 3 | diff --git a/Cross/vm/sqVirtualMachine.c b/Cross/vm/sqVirtualMachine.c | ||
| 4 | index 59b6a6e..d367251 100644 | ||
| 5 | --- a/Cross/vm/sqVirtualMachine.c | ||
| 6 | +++ b/Cross/vm/sqVirtualMachine.c | ||
| 7 | @@ -4,6 +4,7 @@ | ||
| 8 | #include <string.h> | ||
| 9 | #include <time.h> | ||
| 10 | #include <setjmp.h> | ||
| 11 | +#include <unistd.h> | ||
| 12 | |||
| 13 | #include "sqVirtualMachine.h" | ||
| 14 | |||
| 15 | diff --git a/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c b/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c | ||
| 16 | index 788287f..b916c86 100644 | ||
| 17 | --- a/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c | ||
| 18 | +++ b/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c | ||
| 19 | @@ -142,7 +142,7 @@ INLINE static FilePtr newFileRec(int fd, int sema) | ||
| 20 | return fp; | ||
| 21 | } | ||
| 22 | |||
| 23 | -INLINE static allocateBuffer(struct FileBuf *buf, int size) | ||
| 24 | +INLINE static int allocateBuffer(struct FileBuf *buf, int size) | ||
| 25 | { | ||
| 26 | if (buf->capacity >= size) | ||
| 27 | return 1; | ||
| 28 | diff --git a/unix/plugins/CameraPlugin/sqCamera-linux.c b/unix/plugins/CameraPlugin/sqCamera-linux.c | ||
| 29 | index 218322f..c5a6815 100644 | ||
| 30 | --- a/unix/plugins/CameraPlugin/sqCamera-linux.c | ||
| 31 | +++ b/unix/plugins/CameraPlugin/sqCamera-linux.c | ||
| 32 | @@ -181,7 +181,7 @@ libCon(void) | ||
| 33 | vd_dup = dup; | ||
| 34 | vd_ioctl = ioctl; | ||
| 35 | vd_read = read; | ||
| 36 | - vd_mmap = mmap; | ||
| 37 | + vd_mmap = (void * (*)(void *, size_t, int, int, int, int64_t))mmap; | ||
| 38 | vd_munmap = munmap; | ||
| 39 | |||
| 40 | /* Use libv4l2: use if available... */ | ||
| 41 | diff --git a/unix/plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c b/unix/plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c | ||
| 42 | index c963f53..4788120 100644 | ||
| 43 | --- a/unix/plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c | ||
| 44 | +++ b/unix/plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c | ||
| 45 | @@ -78,7 +78,7 @@ sqInt ioShowDisplayOnWindow( | ||
| 46 | return 0; | ||
| 47 | else | ||
| 48 | return dpy->hostWindowShowDisplay( | ||
| 49 | - dispBitsIndex, width, height, depth, affectedL, affectedR, affectedT, affectedB, windowIndex); | ||
| 50 | + (unsigned int *)dispBitsIndex, width, height, depth, affectedL, affectedR, affectedT, affectedB, windowIndex); | ||
| 51 | } | ||
| 52 | |||
| 53 | |||
| 54 | diff --git a/unix/plugins/MIDIPlugin/sqUnixMIDIALSA.inc b/unix/plugins/MIDIPlugin/sqUnixMIDIALSA.inc | ||
| 55 | index cc4bbad..1d451da 100644 | ||
| 56 | --- a/unix/plugins/MIDIPlugin/sqUnixMIDIALSA.inc | ||
| 57 | +++ b/unix/plugins/MIDIPlugin/sqUnixMIDIALSA.inc | ||
| 58 | @@ -333,7 +333,7 @@ int sqMIDIParameter(int whichParameter, int modify, int newValue) | ||
| 59 | { | ||
| 60 | snd_seq_queue_tempo_t *tempo= 0; | ||
| 61 | snd_seq_queue_tempo_alloca(&tempo); | ||
| 62 | - snd_seq_get_queue_tempo(seq, queue, &tempo); | ||
| 63 | + snd_seq_get_queue_tempo(seq, queue, (snd_seq_queue_tempo_t *)&tempo); | ||
| 64 | return snd_seq_queue_tempo_get_tempo(tempo) / 1000.0; | ||
| 65 | } | ||
| 66 | break; | ||
| 67 | diff --git a/unix/plugins/SerialPlugin/sqUnixSerial.c b/unix/plugins/SerialPlugin/sqUnixSerial.c | ||
| 68 | index 2e61099..f3bc6b1 100644 | ||
| 69 | --- a/unix/plugins/SerialPlugin/sqUnixSerial.c | ||
| 70 | +++ b/unix/plugins/SerialPlugin/sqUnixSerial.c | ||
| 71 | @@ -157,21 +157,6 @@ void make_portname_from_portnum(char *serialPortName, const int portNum) | ||
| 72 | /*** Public Functions ***/ | ||
| 73 | |||
| 74 | /* return value ignored */ | ||
| 75 | -int serialPortClose(int portNum) | ||
| 76 | -{ | ||
| 77 | - char serialPortName[PORT_NAME_SIZE]; | ||
| 78 | - | ||
| 79 | - if (portNum < 0 || portNum >= MAX_SERIAL_PORTS) | ||
| 80 | - { | ||
| 81 | - success(false); | ||
| 82 | - return 0; | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - make_portname_from_portnum(serialPortName, portNum); | ||
| 86 | - | ||
| 87 | - return serialPortCloseByName(serialPortName); | ||
| 88 | -} | ||
| 89 | - | ||
| 90 | int serialPortCloseByName(const char *portName) | ||
| 91 | { | ||
| 92 | serial_port_type * sp= find_stored_serialport(portName); | ||
| 93 | @@ -205,16 +190,19 @@ int serialPortCloseByName(const char *portName) | ||
| 94 | return 0; | ||
| 95 | } | ||
| 96 | |||
| 97 | -/* Open the given serial port using the given port number. | ||
| 98 | - * "/dev/ttySxx" port name are assumed. */ | ||
| 99 | -int serialPortOpen(int portNum, int dataRate, int stopBitsType, int parityType, int dataBits, | ||
| 100 | - int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar) | ||
| 101 | -{ | ||
| 102 | +int serialPortClose(int portNum) | ||
| 103 | +{ | ||
| 104 | char serialPortName[PORT_NAME_SIZE]; | ||
| 105 | + | ||
| 106 | + if (portNum < 0 || portNum >= MAX_SERIAL_PORTS) | ||
| 107 | + { | ||
| 108 | + success(false); | ||
| 109 | + return 0; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | make_portname_from_portnum(serialPortName, portNum); | ||
| 113 | - | ||
| 114 | - return serialPortOpenByName(serialPortName, dataRate, stopBitsType, parityType, dataBits, | ||
| 115 | - inFlowCtrl, outFlowCtrl, xOnChar, xOffChar); | ||
| 116 | + | ||
| 117 | + return serialPortCloseByName(serialPortName); | ||
| 118 | } | ||
| 119 | |||
| 120 | /* If anything goes wrong during opening make sure the file descriptor | ||
| 121 | @@ -356,6 +344,18 @@ int serialPortOpenByName(char *portName, int dataRate, int stopBitsType, int par | ||
| 122 | return 0; | ||
| 123 | } | ||
| 124 | |||
| 125 | +/* Open the given serial port using the given port number. | ||
| 126 | + * "/dev/ttySxx" port name are assumed. */ | ||
| 127 | +int serialPortOpen(int portNum, int dataRate, int stopBitsType, int parityType, int dataBits, | ||
| 128 | + int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar) | ||
| 129 | +{ | ||
| 130 | + char serialPortName[PORT_NAME_SIZE]; | ||
| 131 | + make_portname_from_portnum(serialPortName, portNum); | ||
| 132 | + | ||
| 133 | + return serialPortOpenByName(serialPortName, dataRate, stopBitsType, parityType, dataBits, | ||
| 134 | + inFlowCtrl, outFlowCtrl, xOnChar, xOffChar); | ||
| 135 | +} | ||
| 136 | + | ||
| 137 | /* Read up to count bytes from the given serial port into the given | ||
| 138 | byte array. Read only up to the number of bytes in the port's | ||
| 139 | input buffer; if fewer bytes than count have been received, do not | ||
| 140 | diff --git a/unix/plugins/WeDoPlugin/WeDoLinux.c b/unix/plugins/WeDoPlugin/WeDoLinux.c | ||
| 141 | index 973c2d3..1dc4de1 100644 | ||
| 142 | --- a/unix/plugins/WeDoPlugin/WeDoLinux.c | ||
| 143 | +++ b/unix/plugins/WeDoPlugin/WeDoLinux.c | ||
| 144 | @@ -38,6 +38,7 @@ | ||
| 145 | #include <sys/stat.h> | ||
| 146 | #include <fcntl.h> | ||
| 147 | #include <linux/hiddev.h> | ||
| 148 | +#include <unistd.h> | ||
| 149 | |||
| 150 | |||
| 151 | #define true 1 | ||
| 152 | diff --git a/unix/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c b/unix/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c | ||
| 153 | index 4c71420..7f54955 100644 | ||
| 154 | --- a/unix/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c | ||
| 155 | +++ b/unix/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c | ||
| 156 | @@ -75,6 +75,8 @@ static sqInt halt(void) { | ||
| 157 | ; | ||
| 158 | } | ||
| 159 | |||
| 160 | +extern void sqPasteboardPutItemFlavordatalengthformatTypeformatLength(sqInt, char*, int, char*, int); | ||
| 161 | + | ||
| 162 | EXPORT(sqInt) ioAddClipboardData(void) { | ||
| 163 | sqInt clipboardAddress; | ||
| 164 | sqInt formatLength; | ||
| 165 | @@ -102,6 +104,8 @@ EXPORT(sqInt) ioAddClipboardData(void) { | ||
| 166 | return null; | ||
| 167 | } | ||
| 168 | |||
| 169 | +extern void sqPasteboardClear(sqInt); | ||
| 170 | + | ||
| 171 | EXPORT(sqInt) ioClearClipboard(void) { | ||
| 172 | sqInt clipboardAddress; | ||
| 173 | sqInt clipboard; | ||
| 174 | @@ -119,6 +123,8 @@ EXPORT(sqInt) ioClearClipboard(void) { | ||
| 175 | return null; | ||
| 176 | } | ||
| 177 | |||
| 178 | +sqInt sqCreateClipboard(void); | ||
| 179 | + | ||
| 180 | EXPORT(sqInt) ioCreateClipboard(void) { | ||
| 181 | sqInt clipboardAddress; | ||
| 182 | |||
| 183 | @@ -130,6 +136,10 @@ EXPORT(sqInt) ioCreateClipboard(void) { | ||
| 184 | return null; | ||
| 185 | } | ||
| 186 | |||
| 187 | +extern int sqPasteboardGetItemCount(sqInt); | ||
| 188 | +extern int sqPasteboardCopyItemFlavorsitemNumber (sqInt, int); | ||
| 189 | +extern int sqPasteboardCopyItemFlavorDataformatformatLength (sqInt, char*, int); | ||
| 190 | + | ||
| 191 | EXPORT(sqInt) ioGetClipboardFormat(void) { | ||
| 192 | sqInt clipboardAddress; | ||
| 193 | sqInt itemCount; | ||
| 194 | diff --git a/unix/src/plugins/DBusPlugin/DBusPlugin.c b/unix/src/plugins/DBusPlugin/DBusPlugin.c | ||
| 195 | index b3b8027..11bc22e 100644 | ||
| 196 | --- a/unix/src/plugins/DBusPlugin/DBusPlugin.c | ||
| 197 | +++ b/unix/src/plugins/DBusPlugin/DBusPlugin.c | ||
| 198 | @@ -474,7 +474,7 @@ static sqInt halt(void) { | ||
| 199 | } | ||
| 200 | |||
| 201 | static sqInt handleflag(int fd, int flag) { | ||
| 202 | - aioHandle(fd, handleReadForFDwithDataandFlag , flag); | ||
| 203 | + aioHandle(fd, (void (*)(int, void *, int)) handleReadForFDwithDataandFlag , flag); | ||
| 204 | } | ||
| 205 | |||
| 206 | |||
| 207 | @@ -1796,8 +1796,8 @@ static dbus_bool_t sqDBusPluginAddWatchwithData(DBusWatch*watch, void*data) { | ||
| 208 | fd = dbus_watch_get_fd(watch); | ||
| 209 | ((sqDBusData*)data)->watch = watch; | ||
| 210 | if (flag & DBUS_WATCH_READABLE) { | ||
| 211 | - aioEnable(fd, data, NULL); | ||
| 212 | - aioHandle(fd, handleReadForFDwithDataandFlag , 1<<0 | 1<<1 | 1<<3); | ||
| 213 | + aioEnable(fd, data, 0); | ||
| 214 | + aioHandle(fd, (void (*)(int, void *, int)) handleReadForFDwithDataandFlag , 1<<0 | 1<<1 | 1<<3); | ||
| 215 | } | ||
| 216 | return 1; | ||
| 217 | } | ||
| 218 | @@ -1830,7 +1830,7 @@ static void sqDBusPluginToggleWatchwithData(DBusWatch*watch, void*data) { | ||
| 219 | fd = dbus_watch_get_fd(watch); | ||
| 220 | if (enable) { | ||
| 221 | ((sqDBusData*)data)->watch = watch; | ||
| 222 | - aioEnable(fd, data, NULL); | ||
| 223 | + aioEnable(fd, data, 0); | ||
| 224 | } else { | ||
| 225 | aioDisable(fd); | ||
| 226 | } | ||
| 227 | diff --git a/unix/src/plugins/FileCopyPlugin/FileCopyPlugin.c b/unix/src/plugins/FileCopyPlugin/FileCopyPlugin.c | ||
| 228 | index e2f1b5a..16a3066 100644 | ||
| 229 | --- a/unix/src/plugins/FileCopyPlugin/FileCopyPlugin.c | ||
| 230 | +++ b/unix/src/plugins/FileCopyPlugin/FileCopyPlugin.c | ||
| 231 | @@ -18,6 +18,7 @@ | ||
| 232 | #include "sqConfig.h" | ||
| 233 | /* Platform specific definitions */ | ||
| 234 | #include "sqPlatformSpecific.h" | ||
| 235 | +#include "FileCopyPlugin.h" | ||
| 236 | |||
| 237 | #define true 1 | ||
| 238 | #define false 0 | ||
| 239 | diff --git a/unix/src/plugins/HostWindowPlugin/HostWindowPlugin.c b/unix/src/plugins/HostWindowPlugin/HostWindowPlugin.c | ||
| 240 | index ea5c0d7..54bb88b 100644 | ||
| 241 | --- a/unix/src/plugins/HostWindowPlugin/HostWindowPlugin.c | ||
| 242 | +++ b/unix/src/plugins/HostWindowPlugin/HostWindowPlugin.c | ||
| 243 | @@ -312,7 +312,7 @@ EXPORT(sqInt) primitiveShowHostWindowRect(void) { | ||
| 244 | if (interpreterProxy->failed()) { | ||
| 245 | return null; | ||
| 246 | } | ||
| 247 | - ok = ioShowDisplayOnWindow(dispBits, w, h, d, left, right, top, | ||
| 248 | + ok = ioShowDisplayOnWindow((unsigned char *)dispBits, w, h, d, left, right, top, | ||
| 249 | bottom, windowIndex); | ||
| 250 | if (!(ok)) { | ||
| 251 | interpreterProxy->primitiveFail(); | ||
| 252 | diff --git a/unix/src/plugins/MIDIPlugin/MIDIPlugin.c b/unix/src/plugins/MIDIPlugin/MIDIPlugin.c | ||
| 253 | index a3fae58..8ec2eaa 100644 | ||
| 254 | --- a/unix/src/plugins/MIDIPlugin/MIDIPlugin.c | ||
| 255 | +++ b/unix/src/plugins/MIDIPlugin/MIDIPlugin.c | ||
| 256 | @@ -161,7 +161,7 @@ EXPORT(sqInt) primitiveMIDIGetPortName(void) { | ||
| 257 | if (interpreterProxy->failed()) { | ||
| 258 | return null; | ||
| 259 | } | ||
| 260 | - sz = sqMIDIGetPortName(portNum, &portName, 255); | ||
| 261 | + sz = sqMIDIGetPortName(portNum, (int)&portName, 255); | ||
| 262 | nameObj = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), sz); | ||
| 263 | if (interpreterProxy->failed()) { | ||
| 264 | return null; | ||
| 265 | diff --git a/unix/src/plugins/RomePlugin/RomePlugin.c b/unix/src/plugins/RomePlugin/RomePlugin.c | ||
| 266 | index aed0e19..f9ff990 100644 | ||
| 267 | --- a/unix/src/plugins/RomePlugin/RomePlugin.c | ||
| 268 | +++ b/unix/src/plugins/RomePlugin/RomePlugin.c | ||
| 269 | @@ -49,6 +49,7 @@ | ||
| 270 | |||
| 271 | |||
| 272 | #include "sqMemoryAccess.h" | ||
| 273 | +#include "sq.h" | ||
| 274 | |||
| 275 | |||
| 276 | /*** Constants ***/ | ||
| 277 | diff --git a/unix/src/plugins/Squeak3D/Squeak3D.c b/unix/src/plugins/Squeak3D/Squeak3D.c | ||
| 278 | index 3732e62..2127bb3 100644 | ||
| 279 | --- a/unix/src/plugins/Squeak3D/Squeak3D.c | ||
| 280 | +++ b/unix/src/plugins/Squeak3D/Squeak3D.c | ||
| 281 | @@ -1657,8 +1657,8 @@ static sqInt halt(void) { | ||
| 282 | } | ||
| 283 | |||
| 284 | EXPORT(sqInt) initialiseModule(void) { | ||
| 285 | - loadBBFn = interpreterProxy->ioLoadFunctionFrom("loadBitBltFrom", bbPluginName); | ||
| 286 | - copyBitsFn = interpreterProxy->ioLoadFunctionFrom("copyBitsFromtoat", bbPluginName); | ||
| 287 | + loadBBFn = (sqInt) interpreterProxy->ioLoadFunctionFrom("loadBitBltFrom", bbPluginName); | ||
| 288 | + copyBitsFn = (sqInt) interpreterProxy->ioLoadFunctionFrom("copyBitsFromtoat", bbPluginName); | ||
| 289 | return (loadBBFn != 0) && (copyBitsFn != 0); | ||
| 290 | } | ||
| 291 | |||
| 292 | diff --git a/unix/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c b/unix/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c | ||
| 293 | index 24601e4..07e4714 100644 | ||
| 294 | --- a/unix/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c | ||
| 295 | +++ b/unix/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c | ||
| 296 | @@ -1215,6 +1215,8 @@ static sqInt halt(void) { | ||
| 297 | ; | ||
| 298 | } | ||
| 299 | |||
| 300 | +extern void initSurfacePluginFunctionPointers(); | ||
| 301 | + | ||
| 302 | EXPORT(sqInt) initialiseModule(void) { | ||
| 303 | initSurfacePluginFunctionPointers(); | ||
| 304 | } | ||
| 305 | diff --git a/unix/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c b/unix/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c | ||
| 306 | index 1a53f09..ed3a446 100644 | ||
| 307 | --- a/unix/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c | ||
| 308 | +++ b/unix/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c | ||
| 309 | @@ -132,6 +132,10 @@ EXPORT(sqInt) primitiveCanConnectToDisplay(void) { | ||
| 310 | } | ||
| 311 | } | ||
| 312 | |||
| 313 | +extern void forgetXDisplay(void); | ||
| 314 | +extern void synchronizeXDisplay(void); | ||
| 315 | +extern void openXDisplay(void); | ||
| 316 | +extern int disconnectXDisplay(void); | ||
| 317 | |||
| 318 | /* Call an internal function which will disconnect the X display session. The actual | ||
| 319 | Squeak window on the X server is not effected, but this instance of Squeak will | ||
| 320 | diff --git a/unix/src/vm/interp.c b/unix/src/vm/interp.c | ||
| 321 | index 85f416d..c179a34 100644 | ||
| 322 | --- a/unix/src/vm/interp.c | ||
| 323 | +++ b/unix/src/vm/interp.c | ||
| 324 | @@ -15665,6 +15665,9 @@ sqInt primitiveAtPut(void) { | ||
| 325 | } | ||
| 326 | |||
| 327 | |||
| 328 | +extern sqInt ioSetCursorARGB(sqInt, sqInt, sqInt, sqInt, sqInt); | ||
| 329 | + | ||
| 330 | + | ||
| 331 | /* Set the cursor to the given shape. The Mac only supports 16x16 pixel cursors. Cursor offsets are handled by Smalltalk. */ | ||
| 332 | |||
| 333 | sqInt primitiveBeCursor(void) { | ||
| 334 | diff --git a/unix/src/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c b/unix/src/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c | ||
| 335 | index f0b72e7..f53d7f3 100644 | ||
| 336 | --- a/unix/src/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c | ||
| 337 | +++ b/unix/src/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c | ||
| 338 | @@ -162,7 +162,7 @@ EXPORT(sqInt) primitiveAsyncFileOpen(void) { | ||
| 339 | fOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(AsyncFile)); | ||
| 340 | f = asyncFileValueOf(fOop); | ||
| 341 | if (!(interpreterProxy->failed())) { | ||
| 342 | - asyncFileOpen(f, fileName, fileNameSize, writeFlag, semaIndex); | ||
| 343 | + asyncFileOpen(f, (int) fileName, fileNameSize, writeFlag, semaIndex); | ||
| 344 | } | ||
| 345 | if (interpreterProxy->failed()) { | ||
| 346 | return null; | ||
| 347 | @@ -209,7 +209,7 @@ EXPORT(sqInt) primitiveAsyncFileReadResult(void) { | ||
| 348 | interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= bufferSize)); | ||
| 349 | bufferPtr = (((pointerForOop(buffer)) + (BASE_HEADER_SIZE)) + startIndex) - 1; | ||
| 350 | if (!(interpreterProxy->failed())) { | ||
| 351 | - r = asyncFileReadResult(f, bufferPtr, count); | ||
| 352 | + r = asyncFileReadResult(f, (int) bufferPtr, count); | ||
| 353 | } | ||
| 354 | _return_value = interpreterProxy->integerObjectOf(r); | ||
| 355 | if (interpreterProxy->failed()) { | ||
| 356 | @@ -301,7 +301,7 @@ EXPORT(sqInt) primitiveAsyncFileWriteStart(void) { | ||
| 357 | interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= bufferSize)); | ||
| 358 | bufferPtr = (((pointerForOop(buffer)) + (BASE_HEADER_SIZE)) + startIndex) - 1; | ||
| 359 | if (!(interpreterProxy->failed())) { | ||
| 360 | - asyncFileWriteStart(f, fPosition, bufferPtr, count); | ||
| 361 | + asyncFileWriteStart(f, fPosition, (int) bufferPtr, count); | ||
| 362 | } | ||
| 363 | if (interpreterProxy->failed()) { | ||
| 364 | return null; | ||
| 365 | diff --git a/unix/src/vm/intplugins/CroquetPlugin/CroquetPlugin.c b/unix/src/vm/intplugins/CroquetPlugin/CroquetPlugin.c | ||
| 366 | index ae84066..c27ac3c 100644 | ||
| 367 | --- a/unix/src/vm/intplugins/CroquetPlugin/CroquetPlugin.c | ||
| 368 | +++ b/unix/src/vm/intplugins/CroquetPlugin/CroquetPlugin.c | ||
| 369 | @@ -512,6 +512,8 @@ EXPORT(sqInt) primitiveTransposeMatrix(void) { | ||
| 370 | |||
| 371 | /* Primitive. Answer whether an AABB intersects with a given triangle */ | ||
| 372 | |||
| 373 | +extern sqInt triBoxOverlap(float*, float*, float*, float*, float*); | ||
| 374 | + | ||
| 375 | EXPORT(sqInt) primitiveTriBoxIntersects(void) { | ||
| 376 | float*maxCorner; | ||
| 377 | float*minCorner; | ||
| 378 | diff --git a/unix/src/vm/intplugins/FilePlugin/FilePlugin.c b/unix/src/vm/intplugins/FilePlugin/FilePlugin.c | ||
| 379 | index 0495a0f..baf618c 100644 | ||
| 380 | --- a/unix/src/vm/intplugins/FilePlugin/FilePlugin.c | ||
| 381 | +++ b/unix/src/vm/intplugins/FilePlugin/FilePlugin.c | ||
| 382 | @@ -734,7 +734,7 @@ EXPORT(sqInt) primitiveFileStdioHandles(void) { | ||
| 383 | return interpreterProxy->primitiveFail(); | ||
| 384 | } | ||
| 385 | } | ||
| 386 | - validMask = sqFileStdioHandlesInto((&fileRecords)); | ||
| 387 | + validMask = sqFileStdioHandlesInto((SQFile*)(&fileRecords)); | ||
| 388 | if (validMask == 0) { | ||
| 389 | return interpreterProxy->primitiveFail(); | ||
| 390 | } | ||
| 391 | diff --git a/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c b/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c | ||
| 392 | index 501077a..53767a4 100644 | ||
| 393 | --- a/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c | ||
| 394 | +++ b/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c | ||
| 395 | @@ -101,6 +101,10 @@ static sqInt halt(void) { | ||
| 396 | } | ||
| 397 | |||
| 398 | |||
| 399 | +sqInt _isBytes(sqInt oop) { | ||
| 400 | + return ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8); | ||
| 401 | +} | ||
| 402 | + | ||
| 403 | /* Return 1, 2 or 3, if string1 is <, =, or > string2, with the collating order of characters given by the order array. */ | ||
| 404 | |||
| 405 | EXPORT(sqInt) primitiveCompareString(void) { | ||
| 406 | @@ -115,17 +119,17 @@ EXPORT(sqInt) primitiveCompareString(void) { | ||
| 407 | sqInt len2; | ||
| 408 | |||
| 409 | rcvr = stackValue(3); | ||
| 410 | - if (!(isBytes(stackValue(2)))) { | ||
| 411 | + if (!(_isBytes(stackValue(2)))) { | ||
| 412 | return primitiveFail(); | ||
| 413 | } | ||
| 414 | string1 = arrayValueOf(stackValue(2)); | ||
| 415 | string1 -= 1; | ||
| 416 | - if (!(isBytes(stackValue(1)))) { | ||
| 417 | + if (!(_isBytes(stackValue(1)))) { | ||
| 418 | return primitiveFail(); | ||
| 419 | } | ||
| 420 | string2 = arrayValueOf(stackValue(1)); | ||
| 421 | string2 -= 1; | ||
| 422 | - if (!(isBytes(stackValue(0)))) { | ||
| 423 | + if (!(_isBytes(stackValue(0)))) { | ||
| 424 | return primitiveFail(); | ||
| 425 | } | ||
| 426 | order = arrayValueOf(stackValue(0)); | ||
| 427 | @@ -225,7 +229,7 @@ EXPORT(sqInt) primitiveCompressToByteArray(void) { | ||
| 428 | rcvr = stackValue(2); | ||
| 429 | bm = arrayValueOf(stackValue(1)); | ||
| 430 | bm -= 1; | ||
| 431 | - if (!(isBytes(stackValue(0)))) { | ||
| 432 | + if (!(_isBytes(stackValue(0)))) { | ||
| 433 | return primitiveFail(); | ||
| 434 | } | ||
| 435 | ba = arrayValueOf(stackValue(0)); | ||
| 436 | @@ -393,7 +397,7 @@ EXPORT(sqInt) primitiveConvert8BitSigned(void) { | ||
| 437 | sqInt s; | ||
| 438 | |||
| 439 | rcvr = stackValue(2); | ||
| 440 | - if (!(isBytes(stackValue(1)))) { | ||
| 441 | + if (!(_isBytes(stackValue(1)))) { | ||
| 442 | return primitiveFail(); | ||
| 443 | } | ||
| 444 | aByteArray = arrayValueOf(stackValue(1)); | ||
| 445 | @@ -453,7 +457,7 @@ EXPORT(sqInt) primitiveDecompressFromByteArray(void) { | ||
| 446 | rcvr = stackValue(3); | ||
| 447 | bm = arrayValueOf(stackValue(2)); | ||
| 448 | bm -= 1; | ||
| 449 | - if (!(isBytes(stackValue(1)))) { | ||
| 450 | + if (!(_isBytes(stackValue(1)))) { | ||
| 451 | return primitiveFail(); | ||
| 452 | } | ||
| 453 | ba = arrayValueOf(stackValue(1)); | ||
| 454 | @@ -556,12 +560,12 @@ EXPORT(sqInt) primitiveFindFirstInString(void) { | ||
| 455 | sqInt stringSize; | ||
| 456 | |||
| 457 | rcvr = stackValue(3); | ||
| 458 | - if (!(isBytes(stackValue(2)))) { | ||
| 459 | + if (!(_isBytes(stackValue(2)))) { | ||
| 460 | return primitiveFail(); | ||
| 461 | } | ||
| 462 | aString = arrayValueOf(stackValue(2)); | ||
| 463 | aString -= 1; | ||
| 464 | - if (!(isBytes(stackValue(1)))) { | ||
| 465 | + if (!(_isBytes(stackValue(1)))) { | ||
| 466 | return primitiveFail(); | ||
| 467 | } | ||
| 468 | inclusionMap = arrayValueOf(stackValue(1)); | ||
| 469 | @@ -614,18 +618,18 @@ EXPORT(sqInt) primitiveFindSubstring(void) { | ||
| 470 | sqInt startIndex; | ||
| 471 | |||
| 472 | rcvr = stackValue(4); | ||
| 473 | - if (!(isBytes(stackValue(3)))) { | ||
| 474 | + if (!(_isBytes(stackValue(3)))) { | ||
| 475 | return primitiveFail(); | ||
| 476 | } | ||
| 477 | key = arrayValueOf(stackValue(3)); | ||
| 478 | key -= 1; | ||
| 479 | - if (!(isBytes(stackValue(2)))) { | ||
| 480 | + if (!(_isBytes(stackValue(2)))) { | ||
| 481 | return primitiveFail(); | ||
| 482 | } | ||
| 483 | body = arrayValueOf(stackValue(2)); | ||
| 484 | body -= 1; | ||
| 485 | start = stackIntegerValue(1); | ||
| 486 | - if (!(isBytes(stackValue(0)))) { | ||
| 487 | + if (!(_isBytes(stackValue(0)))) { | ||
| 488 | return primitiveFail(); | ||
| 489 | } | ||
| 490 | matchTable = arrayValueOf(stackValue(0)); | ||
| 491 | @@ -673,7 +677,7 @@ EXPORT(sqInt) primitiveIndexOfAsciiInString(void) { | ||
| 492 | |||
| 493 | rcvr = stackValue(3); | ||
| 494 | anInteger = stackIntegerValue(2); | ||
| 495 | - if (!(isBytes(stackValue(1)))) { | ||
| 496 | + if (!(_isBytes(stackValue(1)))) { | ||
| 497 | return primitiveFail(); | ||
| 498 | } | ||
| 499 | aString = arrayValueOf(stackValue(1)); | ||
| 500 | @@ -719,7 +723,7 @@ EXPORT(sqInt) primitiveStringHash(void) { | ||
| 501 | sqInt pos; | ||
| 502 | |||
| 503 | rcvr = stackValue(2); | ||
| 504 | - if (!(isBytes(stackValue(1)))) { | ||
| 505 | + if (!(_isBytes(stackValue(1)))) { | ||
| 506 | return primitiveFail(); | ||
| 507 | } | ||
| 508 | aByteArray = arrayValueOf(stackValue(1)); | ||
| 509 | @@ -758,14 +762,14 @@ EXPORT(sqInt) primitiveTranslateStringWithTable(void) { | ||
| 510 | sqInt i; | ||
| 511 | |||
| 512 | rcvr = stackValue(4); | ||
| 513 | - if (!(isBytes(stackValue(3)))) { | ||
| 514 | + if (!(_isBytes(stackValue(3)))) { | ||
| 515 | return primitiveFail(); | ||
| 516 | } | ||
| 517 | aString = arrayValueOf(stackValue(3)); | ||
| 518 | aString -= 1; | ||
| 519 | start = stackIntegerValue(2); | ||
| 520 | stop = stackIntegerValue(1); | ||
| 521 | - if (!(isBytes(stackValue(0)))) { | ||
| 522 | + if (!(_isBytes(stackValue(0)))) { | ||
| 523 | return primitiveFail(); | ||
| 524 | } | ||
| 525 | table = arrayValueOf(stackValue(0)); | ||
| 526 | diff --git a/unix/src/vm/intplugins/RePlugin/RePlugin.c b/unix/src/vm/intplugins/RePlugin/RePlugin.c | ||
| 527 | index 97a99c9..4f09246 100644 | ||
| 528 | --- a/unix/src/vm/intplugins/RePlugin/RePlugin.c | ||
| 529 | +++ b/unix/src/vm/intplugins/RePlugin/RePlugin.c | ||
| 530 | @@ -252,7 +252,7 @@ EXPORT(sqInt) primPCREExec(void) { | ||
| 531 | /* begin rcvrExtraPtr */ | ||
| 532 | extraObj = interpreterProxy->fetchPointerofObject(3, rcvr); | ||
| 533 | if (extraObj == (interpreterProxy->nilObject())) { | ||
| 534 | - extraPtr = NULL; | ||
| 535 | + extraPtr = 0; | ||
| 536 | goto l1; | ||
| 537 | } | ||
| 538 | extraPtr = ((int) (interpreterProxy->arrayValueOf(extraObj))); | ||
| 539 | @@ -317,7 +317,7 @@ EXPORT(sqInt) primPCREExecfromto(void) { | ||
| 540 | /* begin rcvrExtraPtr */ | ||
| 541 | extraObj = interpreterProxy->fetchPointerofObject(3, rcvr); | ||
| 542 | if (extraObj == (interpreterProxy->nilObject())) { | ||
| 543 | - extraPtr = NULL; | ||
| 544 | + extraPtr = 0; | ||
| 545 | goto l1; | ||
| 546 | } | ||
| 547 | extraPtr = ((int) (interpreterProxy->arrayValueOf(extraObj))); | ||
| 548 | diff --git a/unix/src/vm/intplugins/SerialPlugin/SerialPlugin.c b/unix/src/vm/intplugins/SerialPlugin/SerialPlugin.c | ||
| 549 | index a40a64d..ecc29f5 100644 | ||
| 550 | --- a/unix/src/vm/intplugins/SerialPlugin/SerialPlugin.c | ||
| 551 | +++ b/unix/src/vm/intplugins/SerialPlugin/SerialPlugin.c | ||
| 552 | @@ -100,6 +100,9 @@ EXPORT(sqInt) primitiveSerialPortClose(void) { | ||
| 553 | return null; | ||
| 554 | } | ||
| 555 | |||
| 556 | +extern sqInt serialPortCloseByName(const char*); | ||
| 557 | +extern sqInt serialPortOpenByName(char*, int, int, int, int, int, int, int, int); | ||
| 558 | + | ||
| 559 | EXPORT(sqInt) primitiveSerialPortCloseByName(void) { | ||
| 560 | char * cString; | ||
| 561 | char *deviceName; | ||
| 562 | diff --git a/unix/src/vm/intplugins/SlangTestSupportPlugin/SlangTestSupportPlugin.c b/unix/src/vm/intplugins/SlangTestSupportPlugin/SlangTestSupportPlugin.c | ||
| 563 | index 72f9def..46280d9 100644 | ||
| 564 | --- a/unix/src/vm/intplugins/SlangTestSupportPlugin/SlangTestSupportPlugin.c | ||
| 565 | +++ b/unix/src/vm/intplugins/SlangTestSupportPlugin/SlangTestSupportPlugin.c | ||
| 566 | @@ -147,7 +147,7 @@ static sqInt inlineByMethod(void) { | ||
| 567 | sqInt bar; | ||
| 568 | sqInt foo; | ||
| 569 | |||
| 570 | - foo = "foo"; | ||
| 571 | + foo = (sqInt) "foo"; | ||
| 572 | bar = methodThatShouldNotBeInlinedByMethod(); | ||
| 573 | } | ||
| 574 | |||
| 575 | @@ -159,24 +159,24 @@ static sqInt inlineByPragma(void) { | ||
| 576 | sqInt bar; | ||
| 577 | sqInt foo; | ||
| 578 | |||
| 579 | - foo = "foo"; | ||
| 580 | + foo = (sqInt) "foo"; | ||
| 581 | bar = methodThatShouldNotBeInlinedByPragma(); | ||
| 582 | } | ||
| 583 | |||
| 584 | static sqInt methodThatShouldBeInlinedByMethod(void) { | ||
| 585 | - return "foo"; | ||
| 586 | + return (sqInt) "foo"; | ||
| 587 | } | ||
| 588 | |||
| 589 | static sqInt methodThatShouldBeInlinedByPragma(void) { | ||
| 590 | - return "foo"; | ||
| 591 | + return (sqInt) "foo"; | ||
| 592 | } | ||
| 593 | |||
| 594 | static sqInt methodThatShouldNotBeInlinedByMethod(void) { | ||
| 595 | - return "bar"; | ||
| 596 | + return (sqInt) "bar"; | ||
| 597 | } | ||
| 598 | |||
| 599 | static sqInt methodThatShouldNotBeInlinedByPragma(void) { | ||
| 600 | - return "bar"; | ||
| 601 | + return (sqInt) "bar"; | ||
| 602 | } | ||
| 603 | |||
| 604 | |||
| 605 | diff --git a/unix/vm-sound-pulse/sqUnixSoundPulseAudio.c b/unix/vm-sound-pulse/sqUnixSoundPulseAudio.c | ||
| 606 | index 18d0f7f..8b0f35d 100644 | ||
| 607 | --- a/unix/vm-sound-pulse/sqUnixSoundPulseAudio.c | ||
| 608 | +++ b/unix/vm-sound-pulse/sqUnixSoundPulseAudio.c | ||
| 609 | @@ -995,10 +995,10 @@ DBGMSG("<sound_StartRecording()"); | ||
| 610 | static sqInt sound_StopRecording(void) { | ||
| 611 | DBGMSG(">sound_StopRecording()"); | ||
| 612 | |||
| 613 | - if (!audioIn.open) return; | ||
| 614 | + if (!audioIn.open) return 0; | ||
| 615 | audioIn.open = false; | ||
| 616 | |||
| 617 | - if (NULL == audioIn.pa_conn) return; | ||
| 618 | + if (NULL == audioIn.pa_conn) return 0; | ||
| 619 | |||
| 620 | ioThreadStall(&audioIn); | ||
| 621 | |||
| 622 | diff --git a/unix/vm/SqSound.h b/unix/vm/SqSound.h | ||
| 623 | index bddbf24..973db1b 100644 | ||
| 624 | --- a/unix/vm/SqSound.h | ||
| 625 | +++ b/unix/vm/SqSound.h | ||
| 626 | @@ -47,7 +47,7 @@ static struct SqSound sound_##NAME##_itf= { \ | ||
| 627 | sound_RecordSamplesIntoAtLength, \ | ||
| 628 | sound_Volume, \ | ||
| 629 | sound_SetVolume, \ | ||
| 630 | - sound_SetRecordLevel, \ | ||
| 631 | + (void (*)(sqInt))sound_SetRecordLevel, \ | ||
| 632 | sound_GetSwitch, \ | ||
| 633 | sound_SetSwitch, \ | ||
| 634 | sound_SetDevice \ | ||
| 635 | diff --git a/unix/vm/aio.c b/unix/vm/aio.c | ||
| 636 | index 57e054e..f133c8e 100644 | ||
| 637 | --- a/unix/vm/aio.c | ||
| 638 | +++ b/unix/vm/aio.c | ||
| 639 | @@ -31,6 +31,7 @@ | ||
| 640 | */ | ||
| 641 | |||
| 642 | #include "sqaio.h" | ||
| 643 | +#include "sq.h" | ||
| 644 | |||
| 645 | #ifdef HAVE_CONFIG_H | ||
| 646 | |||
| 647 | diff --git a/unix/vm/sqUnixMain.c b/unix/vm/sqUnixMain.c | ||
| 648 | index 98ea3bc..76391f7 100644 | ||
| 649 | --- a/unix/vm/sqUnixMain.c | ||
| 650 | +++ b/unix/vm/sqUnixMain.c | ||
| 651 | @@ -34,6 +34,7 @@ | ||
| 652 | #include "sqMemoryAccess.h" | ||
| 653 | #include "sqaio.h" | ||
| 654 | #include "sqUnixCharConv.h" | ||
| 655 | +#include "sqUnixGlobals.h" | ||
| 656 | #include "debug.h" | ||
| 657 | |||
| 658 | #ifdef ioMSecs | ||
| 659 | @@ -42,6 +43,7 @@ | ||
| 660 | |||
| 661 | #include <stdio.h> | ||
| 662 | #include <stdlib.h> | ||
| 663 | +#include <ctype.h> | ||
| 664 | #include <string.h> | ||
| 665 | #include <time.h> | ||
| 666 | #include <sys/time.h> | ||
| 667 | @@ -511,6 +513,8 @@ sqInt ioRelinquishProcessorForMicroseconds(sqInt us) | ||
| 668 | |||
| 669 | sqInt ioBeep(void) { return dpy->ioBeep(); } | ||
| 670 | |||
| 671 | +extern sqInt printCallStack(void); | ||
| 672 | + | ||
| 673 | #if defined(IMAGE_DUMP) | ||
| 674 | |||
| 675 | static void emergencyDump(int quit) | ||
diff --git a/gnu/packages/smalltalk.scm b/gnu/packages/smalltalk.scm index 71538eb0479..e9dc8af1584 100644 --- a/gnu/packages/smalltalk.scm +++ b/gnu/packages/smalltalk.scm | |||
| @@ -229,9 +229,9 @@ such as ones for networking and GUI programming.") | |||
| 229 | (origin | 229 | (origin |
| 230 | (method url-fetch) | 230 | (method url-fetch) |
| 231 | (uri (string-append "http://squeakvm.org/unix/release/" | 231 | (uri (string-append "http://squeakvm.org/unix/release/" |
| 232 | "Squeak-" version "-src.tar.gz")) | 232 | "Squeak-" version "-src-no-mp3.tar.gz")) |
| 233 | (sha256 | 233 | (sha256 |
| 234 | (base32 "0bpwbnpy2sb4gylchfx50sha70z36bwgdxraym4vrr93l8pd3dix")) | 234 | (base32 "01miyjpka9x24xsp4j54mm9zjiaci670sss50qvd94y5q2iq9cx7")) |
| 235 | (modules '((guix build utils))) | 235 | (modules '((guix build utils))) |
| 236 | (snippet | 236 | (snippet |
| 237 | ;; Make builds bit-reproducible. | 237 | ;; Make builds bit-reproducible. |
| @@ -243,8 +243,29 @@ such as ones for networking and GUI programming.") | |||
| 243 | "ux_version = \"GNU\";\n")) | 243 | "ux_version = \"GNU\";\n")) |
| 244 | (substitute* "unix/vm/config.cmake" | 244 | (substitute* "unix/vm/config.cmake" |
| 245 | (("\\(VM_BUILD_STRING.*") | 245 | (("\\(VM_BUILD_STRING.*") |
| 246 | "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")")) | 246 | "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")")))) |
| 247 | #t)))) | 247 | (patches (search-patches "squeak-vm-gcc-14-fix.patch")))) |
| 248 | (build-system cmake-build-system) | ||
| 249 | (arguments | ||
| 250 | (list #:tests? #f ;no check target | ||
| 251 | #:configure-flags | ||
| 252 | #~(list (string-append "-DVM_HOST=" #$(nix-system->gnu-triplet | ||
| 253 | (or (%current-target-system) | ||
| 254 | (%current-system)))) | ||
| 255 | (string-append "-DVM_VERSION=" #$version) | ||
| 256 | "-DCMAKE_VERBOSE_MAKEFILE=ON") | ||
| 257 | #:phases | ||
| 258 | #~(modify-phases %standard-phases | ||
| 259 | (add-after 'unpack 'chdir | ||
| 260 | (lambda _ | ||
| 261 | (chdir "unix"))) | ||
| 262 | (add-after 'chdir 'remove-hardcoded-PATH | ||
| 263 | (lambda _ | ||
| 264 | ;; Remove hard-coded FHS PATH entries. | ||
| 265 | (substitute* '("cmake/squeak.in" | ||
| 266 | "cmake/squeak.sh.in") | ||
| 267 | (("^PATH=.*") ""))))))) | ||
| 268 | (native-inputs (list pkg-config)) | ||
| 248 | (inputs | 269 | (inputs |
| 249 | (list alsa-lib | 270 | (list alsa-lib |
| 250 | dbus | 271 | dbus |
| @@ -253,32 +274,6 @@ such as ones for networking and GUI programming.") | |||
| 253 | libxrender | 274 | libxrender |
| 254 | mesa | 275 | mesa |
| 255 | pulseaudio)) | 276 | pulseaudio)) |
| 256 | (native-inputs | ||
| 257 | (list pkg-config)) | ||
| 258 | (build-system cmake-build-system) | ||
| 259 | (arguments | ||
| 260 | `(#:tests? #f ;no check target | ||
| 261 | #:phases | ||
| 262 | (modify-phases %standard-phases | ||
| 263 | (add-after 'unpack 'remove-hardcoded-PATH | ||
| 264 | (lambda _ | ||
| 265 | ;; Remove hard-coded FHS PATH entries. | ||
| 266 | (substitute* '("unix/cmake/squeak.in" | ||
| 267 | "unix/cmake/squeak.sh.in") | ||
| 268 | (("^PATH=.*") "")) | ||
| 269 | #t)) | ||
| 270 | (add-before 'configure 'enter-build-directory | ||
| 271 | (lambda _ | ||
| 272 | (mkdir "build") | ||
| 273 | (chdir "build") | ||
| 274 | #t)) | ||
| 275 | (replace 'configure | ||
| 276 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 277 | (let ((out (assoc-ref outputs "out"))) | ||
| 278 | (invoke "../unix/cmake/configure" | ||
| 279 | (string-append "--prefix=" out) | ||
| 280 | "--without-quartz") | ||
| 281 | #t)))))) | ||
| 282 | (synopsis "Smalltalk programming language and environment") | 277 | (synopsis "Smalltalk programming language and environment") |
| 283 | (description "Squeak is a full-featured implementation of the Smalltalk | 278 | (description "Squeak is a full-featured implementation of the Smalltalk |
| 284 | programming language and environment based on (and largely compatible with) | 279 | programming language and environment based on (and largely compatible with) |
