Re: Bugs in Scratch

2013-04-18 Thread Stuart Henderson
On 2013/04/18 08:54, Stuart Cassoff wrote:
  The patch applied cleanly - but I'm still seeing issues with the 
  sqCamera-linux.c, see below, when doing a make install.
  
  I'll try and work on it in the next week, and get a diff that works against 
  current.
  
  Thanks
  
  Fred
  
  PS When I've manually patch the sqCamera-linux.c file, scratch 1.4 has 
  built and installed fine
 
 I don't know why you keep having trouble with the patch.
 
 
 Stu
 
 

  ===  Building for scratch-1.4.0.7
  The licensing info for scratch-1.4.0.7 is incomplete. (in graphics/scratch)
  Please notify the OpenBSD port maintainer: (in graphics/scratch)

that clearly isn't a fully -current system.



Re: Bugs in Scratch

2013-04-17 Thread Stuart Henderson
On 2013/04/16 07:48, Lars Engblom wrote:
 Unless some new obstacles have been appearing, I would really suggest
 you upgrade to this port. I have been running it since before the
 ports freeze, and it is working better (amd64) than the old version.
 Those times it is crashing (sound events), the old version is also
 crashing. This means that this port is not introducing any new
 problem that would not have been in the old version.

Updated diff against -current. OK with you stu@?

Index: Makefile
===
RCS file: /cvs/ports/graphics/scratch/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile11 Mar 2013 11:10:55 -  1.5
+++ Makefile17 Apr 2013 11:29:59 -
@@ -2,48 +2,83 @@
 
 COMMENT =  visual programming environment and toolkit
 
-DISTNAME = scratch-1.3
-REVISION = 0
+DISTNAME = ${PKGNAME}.src
+PKGNAME =  scratch-1.4.0.7
 CATEGORIES =   graphics
 HOMEPAGE = http://scratch.mit.edu/
-MASTER_SITES = ${HOMEPAGE:=files/}
-DISTFILES =WinScratch1.3.zip
 
 MAINTAINER =   Stuart Cassoff s...@users.sourceforge.net
 
-# MIT
+# GPLv2 / MIT / Creative Commons (CC BY-SA 3.0)
 PERMIT_PACKAGE_CDROM = Yes
 
-BUILD_DEPENDS= archivers/unzip
-RUN_DEPENDS =  lang/squeak/vm
+WANTLIB =  X11 Xau Xdmcp Xext Xrender cairo expat fontconfig freetype \
+   glib-2.0 gmodule-2.0 gobject-2.0 harfbuzz iconv intl \
+   m pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre pixman-1 \
+   png pthread pthread-stubs xcb xcb-render xcb-shm z
+
+MASTER_SITES = http://download.scratch.mit.edu/
+
+LIB_DEPENDS=   devel/pango
+
+RUN_DEPENDS =  lang/squeak/vm \
+   devel/desktop-file-utils \
+   devel/xdg-utils \
+   misc/shared-mime-info \
+   x11/gtk+2,-guic
 
-EXTRACT_ONLY =
-NO_BUILD = Yes
+SEPARATE_BUILD =   Yes
 NO_TEST =  Yes
 
-SCRATCH_LIB_DIR =  ${PREFIX}/lib/scratch
-SCRATCH_SHARE_DIR =${PREFIX}/share/scratch
-SCRATCH_SUBDIR =   WinScratch1.3/Scratch\ 1.3
+CFLAGS +=  -Wall -fPIC -shared
+SUBST_VARS =   SC_DIR
+
+SC_DIR =   ${PREFIX}/share/scratch
+
+post-extract:
+   gunzip -o ${WRKSRC}/src/man/scratch.1 ${WRKSRC}/src/man/scratch.1.gz
+
+do-build:
+   @${SUBST_CMD} -c ${FILESDIR}/scratch ${WRKBUILD}/scratch
+   @${SUBST_CMD} -c ${WRKSRC}/src/man/scratch.1 ${WRKBUILD}/scratch.1
+   cd ${WRKSRC}/src/plugins/unicode  ${CC} ${CFLAGS} *.c \
+   `pkg-config --cflags --libs pangocairo` \
+   -o ${WRKBUILD}/UnicodePlugin
+.for p in Scratch Camera
+   cd ${WRKSRC}/src/plugins/${p:L}  ${CC} ${CFLAGS} *.c \
+   -o ${WRKBUILD}/${p}Plugin
+.endfor
 
 do-install:
-   ${INSTALL_DATA_DIR} ${SCRATCH_LIB_DIR}
-   ${INSTALL_DATA_DIR} ${SCRATCH_SHARE_DIR}
-   unzip -oq ${DISTDIR}/${DISTFILES} \
-   -x ${SCRATCH_SUBDIR}/*.dll ${SCRATCH_SUBDIR}/Scratch.exe \
-   -d ${SCRATCH_SHARE_DIR}
-   gzip  ${SCRATCH_SHARE_DIR}/${SCRATCH_SUBDIR}/Scratch.image  \
-   ${SCRATCH_LIB_DIR}/Scratch.image.gz
-   chmod 444 ${SCRATCH_LIB_DIR}/Scratch.image.gz
-   rm -f ${SCRATCH_SHARE_DIR}/${SCRATCH_SUBDIR}/Scratch.image
-   mv ${SCRATCH_SHARE_DIR}/${SCRATCH_SUBDIR}/* ${SCRATCH_SHARE_DIR}
-   rm -rf ${SCRATCH_SHARE_DIR}/${SCRATCH_SUBDIR:H}
-   find ${SCRATCH_SHARE_DIR} -type d -exec chmod 755 {} ';'
-   find ${SCRATCH_SHARE_DIR} -type f -exec chmod 444 {} ';'
-.for i in Help locale Scratch.ini license.txt
-   mv ${SCRATCH_SHARE_DIR}/$i ${SCRATCH_LIB_DIR}/$i
+   ${INSTALL_DATA_DIR} ${SC_DIR}/Plugins
+.for p in Unicode Scratch Camera
+   ${INSTALL_DATA} ${WRKBUILD}/${p}Plugin ${SC_DIR}/Plugins/${p}Plugin
+.endfor
+.for f in Help locale Media Projects Scratch.image Scratch.ini \
+   LICENSE gpl-2.0.txt
+   cp -r ${WRKSRC}/$f ${SC_DIR}/$f
+.endfor
+   chown -R ${SHAREOWN}:${SHAREGRP} ${SC_DIR}
+   find ${SC_DIR} -type d -exec chmod 755 {} ';'
+   find ${SC_DIR} -type f -exec chmod 444 {} ';'
+   ${INSTALL_SCRIPT} ${WRKBUILD}/scratch ${PREFIX}/bin/scratch
+   ${INSTALL_MAN_DIR} ${PREFIX}/man/man1
+   ${INSTALL_MAN} ${WRKBUILD}/scratch.1 ${PREFIX}/man/man1/scratch.1
+   ${INSTALL_DATA_DIR} ${PREFIX}/share/applications
+   ${INSTALL_DATA} ${WRKSRC}/src/scratch.desktop \
+   ${PREFIX}/share/applications
+   ${INSTALL_DATA_DIR} ${PREFIX}/share/mime/packages
+   ${INSTALL_DATA} ${WRKSRC}/src/scratch.xml \
+   ${PREFIX}/share/mime/packages
+.for d in 128x128 32x32 48x48
+   ${INSTALL_DATA_DIR} ${PREFIX}/share/icons/hicolor/$d/apps
+   ${INSTALL_DATA} ${WRKSRC}/src/icons/$d/scratch* \
+   ${PREFIX}/share/icons/hicolor/$d/apps
+.endfor
+.for d 

Re: Bugs in Scratch

2013-04-17 Thread OpenBSD

On 04/17/13 12:31, Stuart Henderson wrote:

On 2013/04/16 07:48, Lars Engblom wrote:

Unless some new obstacles have been appearing, I would really suggest
you upgrade to this port. I have been running it since before the
ports freeze, and it is working better (amd64) than the old version.
Those times it is crashing (sound events), the old version is also
crashing. This means that this port is not introducing any new
problem that would not have been in the old version.


Updated diff against -current. OK with you stu@?



The patch applied cleanly - but I'm still seeing issues with the 
sqCamera-linux.c, see below, when doing a make install.


I'll try and work on it in the next week, and get a diff that works 
against current.


Thanks

Fred

PS When I've manually patch the sqCamera-linux.c file, scratch 1.4 has 
built and installed fine


Build error message follows:

===  Building for scratch-1.4.0.7
The licensing info for scratch-1.4.0.7 is incomplete. (in graphics/scratch)
Please notify the OpenBSD port maintainer: (in graphics/scratch)
Stuart Cassoff s...@users.sourceforge.net (in graphics/scratch)
cd 
/usr/ports/pobj/scratch-1.4.0.7/scratch-1.4.0.7.src/src/plugins/unicode 
 cc -O2 -pipe  -Wall -fPIC -shared *.c  `pkg-config --cflags --libs 
pangocairo`  -o /usr/ports/pobj/scratch-1.4.0.7/build-i386/UnicodePlugin
cd 
/usr/ports/pobj/scratch-1.4.0.7/scratch-1.4.0.7.src/src/plugins/scratch 
 cc -O2 -pipe  -Wall -fPIC -shared *.c  -o 
/usr/ports/pobj/scratch-1.4.0.7/build-i386/ScratchPlugin

ScratchPlugin.c:107: warning: 'checkedFloatPtrOf' defined but not used
ScratchPlugin.c:115: warning: 'checkedUnsignedIntPtrOf' defined but not used
ScratchPlugin.c:123: warning: 'hueFromRGBminmax' defined but not used
ScratchPlugin.c:146: warning: 'interpolateandfrac' defined but not used
ScratchPlugin.c: In function 'bitmapatputHsv':
ScratchPlugin.c:65: warning: 'outPix' may be used uninitialized in this 
function
cd 
/usr/ports/pobj/scratch-1.4.0.7/scratch-1.4.0.7.src/src/plugins/camera 
 cc -O2 -pipe  -Wall -fPIC -shared *.c  -o 
/usr/ports/pobj/scratch-1.4.0.7/build-i386/CameraPlugin

sqCamera-linux.c:48:47: error: asm/types.h: No such file or directory
sqCamera-linux.c:50:29: error: linux/videodev2.h: No such file or directory
sqCamera-linux.c:119: error: field 'vBuf' has incomplete type
sqCamera-linux.c: In function 'vBufReset':
sqCamera-linux.c:165: error: dereferencing pointer to incomplete type
sqCamera-linux.c:165: error: dereferencing pointer to incomplete type
sqCamera-linux.c:166: error: dereferencing pointer to incomplete type
sqCamera-linux.c:166: error: 'V4L2_BUF_TYPE_VIDEO_CAPTURE' undeclared 
(first use in this function)
sqCamera-linux.c:166: error: (Each undeclared identifier is reported 
only once

sqCamera-linux.c:166: error: for each function it appears in.)
sqCamera-linux.c:167: error: dereferencing pointer to incomplete type
sqCamera-linux.c:167: error: 'V4L2_MEMORY_MMAP' undeclared (first use in 
this function)

sqCamera-linux.c: In function 'convertImage':
sqCamera-linux.c:396: error: 'V4L2_PIX_FMT_YUYV' undeclared (first use 
in this function)
sqCamera-linux.c:401: error: 'V4L2_PIX_FMT_RGB565' undeclared (first use 
in this function)
sqCamera-linux.c:406: error: 'V4L2_PIX_FMT_RGB444' undeclared (first use 
in this function)
sqCamera-linux.c:411: error: 'V4L2_PIX_FMT_RGB24' undeclared (first use 
in this function)

sqCamera-linux.c: In function 'queueBuffer':
sqCamera-linux.c:433: error: 'VIDIOC_QBUF' undeclared (first use in this 
function)

sqCamera-linux.c: In function 'dequeueBuffer':
sqCamera-linux.c:440: error: 'VIDIOC_DQBUF' undeclared (first use in 
this function)

sqCamera-linux.c: In function 'read_frame':
sqCamera-linux.c:466: error: dereferencing pointer to incomplete type
sqCamera-linux.c: In function 'stream_off':
sqCamera-linux.c:517: error: variable 'streamType' has initializer but 
incomplete type
sqCamera-linux.c:517: error: 'V4L2_BUF_TYPE_VIDEO_CAPTURE' undeclared 
(first use in this function)

sqCamera-linux.c:517: error: storage size of 'streamType' isn't known
sqCamera-linux.c:518: error: 'VIDIOC_STREAMOFF' undeclared (first use in 
this function)

sqCamera-linux.c:517: warning: unused variable 'streamType'
sqCamera-linux.c: In function 'stream_on':
sqCamera-linux.c:525: error: variable 'streamType' has initializer but 
incomplete type
sqCamera-linux.c:525: error: 'V4L2_BUF_TYPE_VIDEO_CAPTURE' undeclared 
(first use in this function)

sqCamera-linux.c:525: error: storage size of 'streamType' isn't known
sqCamera-linux.c:526: error: 'VIDIOC_STREAMON' undeclared (first use in 
this function)

sqCamera-linux.c:525: warning: unused variable 'streamType'
sqCamera-linux.c: In function 'queueAllBuffers':
sqCamera-linux.c:553: error: dereferencing pointer to incomplete type
sqCamera-linux.c:553: error: dereferencing pointer to incomplete type
sqCamera-linux.c:553: error: dereferencing pointer to incomplete type
sqCamera-linux.c: In function 'init_mmap':

Re: Bugs in Scratch

2013-04-16 Thread Lars Engblom
Unless some new obstacles have been appearing, I would really suggest 
you upgrade to this port. I have been running it since before the ports 
freeze, and it is working better (amd64) than the old version. Those 
times it is crashing (sound events), the old version is also crashing. 
This means that this port is not introducing any new problem that would 
not have been in the old version.


On 02/11/13 14:17, Stuart Cassoff wrote:

On 02/11/13 05:11, Stuart Henderson wrote:

On 2013/02/10 21:11, Stuart Cassoff wrote:

Is it too late for this to go in?

We don't have a proper working diff, Thunderbird mangled the one you
sent (stripped trailing spaces on lines in the manpage diff)
and not sure what's going on with sqCamera-linux.c at all, might also
be whitespace, might be something else.


Tres bien, Monsieur.
Voila la diffe, inlinee et attache.


Index: Makefile
===
RCS file: /cvs/ports/graphics/scratch/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile8 Jan 2013 15:23:15 -   1.4
+++ Makefile11 Feb 2013 12:08:09 -
@@ -2,51 +2,84 @@

  COMMENT = visual programming environment and toolkit

-DISTNAME = scratch-1.3
-REVISION = 0
+DISTNAME = ${PKGNAME}.src
+PKGNAME =  scratch-1.4.0.7
  CATEGORIES =  graphics
  HOMEPAGE =http://scratch.mit.edu/
-MASTER_SITES = ${HOMEPAGE:=files/}
-DISTFILES =WinScratch1.3.zip
-
  MAINTAINER =  Stuart Cassoff s...@users.sourceforge.net

-# MIT
+# GPLv2 / MIT / Creative Commons (CC BY-SA 3.0)
  PERMIT_PACKAGE_CDROM =Yes
  PERMIT_PACKAGE_FTP =  Yes
  PERMIT_DISTFILES_CDROM =Yes
  PERMIT_DISTFILES_FTP =Yes

-BUILD_DEPENDS= archivers/unzip
-RUN_DEPENDS =  lang/squeak/vm
+WANTLIB =  X11 Xau Xdmcp Xext Xrender cairo expat fontconfig freetype \
+   glib-2.0 gmodule-2.0 gobject-2.0 harfbuzz iconv intl \
+   m pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre pixman-1 \
+   png pthread pthread-stubs xcb xcb-render xcb-shm z
+
+MASTER_SITES = http://download.scratch.mit.edu/
+
+LIB_DEPENDS=   devel/pango
+
+RUN_DEPENDS =  lang/squeak/vm \
+   devel/desktop-file-utils \
+   devel/xdg-utils \
+   misc/shared-mime-info \
+   x11/gtk+2,-guic

-EXTRACT_ONLY =
-NO_BUILD = Yes
+SEPARATE_BUILD =   Yes
  NO_REGRESS =  Yes
+CFLAGS +=  -Wall -fPIC -shared
+SUBST_VARS =   SC_DIR
+
+SC_DIR =   ${PREFIX}/share/scratch

-SCRATCH_LIB_DIR =  ${PREFIX}/lib/scratch
-SCRATCH_SHARE_DIR =${PREFIX}/share/scratch
-SCRATCH_SUBDIR =   WinScratch1.3/Scratch\ 1.3
+post-extract:
+   gunzip -o ${WRKSRC}/src/man/scratch.1 ${WRKSRC}/src/man/scratch.1.gz
+
+do-build:
+   @${SUBST_CMD} -c ${FILESDIR}/scratch ${WRKBUILD}/scratch
+   @${SUBST_CMD} -c ${WRKSRC}/src/man/scratch.1 ${WRKBUILD}/scratch.1
+   cd ${WRKSRC}/src/plugins/unicode  ${CC} ${CFLAGS} *.c \
+   `pkg-config --cflags --libs pangocairo` \
+   -o ${WRKBUILD}/UnicodePlugin
+.for p in Scratch Camera
+   cd ${WRKSRC}/src/plugins/${p:L}  ${CC} ${CFLAGS} *.c \
+   -o ${WRKBUILD}/${p}Plugin
+.endfor

  do-install:
-   ${INSTALL_DATA_DIR} ${SCRATCH_LIB_DIR}
-   ${INSTALL_DATA_DIR} ${SCRATCH_SHARE_DIR}
-   unzip -oq ${DISTDIR}/${DISTFILES} \
-   -x ${SCRATCH_SUBDIR}/*.dll ${SCRATCH_SUBDIR}/Scratch.exe \
-   -d ${SCRATCH_SHARE_DIR}
-   gzip  ${SCRATCH_SHARE_DIR}/${SCRATCH_SUBDIR}/Scratch.image  \
-   ${SCRATCH_LIB_DIR}/Scratch.image.gz
-   chmod 444 ${SCRATCH_LIB_DIR}/Scratch.image.gz
-   rm -f ${SCRATCH_SHARE_DIR}/${SCRATCH_SUBDIR}/Scratch.image
-   mv ${SCRATCH_SHARE_DIR}/${SCRATCH_SUBDIR}/* ${SCRATCH_SHARE_DIR}
-   rm -rf ${SCRATCH_SHARE_DIR}/${SCRATCH_SUBDIR:H}
-   find ${SCRATCH_SHARE_DIR} -type d -exec chmod 755 {} ';'
-   find ${SCRATCH_SHARE_DIR} -type f -exec chmod 444 {} ';'
-.for i in Help locale Scratch.ini license.txt
-   mv ${SCRATCH_SHARE_DIR}/$i ${SCRATCH_LIB_DIR}/$i
+   ${INSTALL_DATA_DIR} ${SC_DIR}/Plugins
+.for p in Unicode Scratch Camera
+   ${INSTALL_DATA} ${WRKBUILD}/${p}Plugin ${SC_DIR}/Plugins/${p}Plugin
+.endfor
+.for f in Help locale Media Projects Scratch.image Scratch.ini \
+   LICENSE gpl-2.0.txt
+   cp -r ${WRKSRC}/$f ${SC_DIR}/$f
+.endfor
+   chown -R ${SHAREOWN}:${SHAREGRP} ${SC_DIR}
+   find ${SC_DIR} -type d -exec chmod 755 {} ';'
+   find ${SC_DIR} -type f -exec chmod 444 {} ';'
+   ${INSTALL_SCRIPT} ${WRKBUILD}/scratch ${PREFIX}/bin/scratch
+   ${INSTALL_MAN_DIR} ${PREFIX}/man/man1
+   ${INSTALL_MAN} ${WRKBUILD}/scratch.1 ${PREFIX}/man/man1/scratch.1
+   ${INSTALL_DATA_DIR} ${PREFIX}/share/applications
+   

Re: Bugs in Scratch

2013-02-13 Thread OpenBSD

On 02/11/13 12:17, Stuart Cassoff wrote:

On 02/11/13 05:11, Stuart Henderson wrote:

On 2013/02/10 21:11, Stuart Cassoff wrote:

Is it too late for this to go in?


We don't have a proper working diff, Thunderbird mangled the one you
sent (stripped trailing spaces on lines in the manpage diff)
and not sure what's going on with sqCamera-linux.c at all, might also
be whitespace, might be something else.



Tres bien, Monsieur.
Voila la diffe, inlinee et attache.




Hi ports@

This also works with on a iBook G4:

OpenBSD 5.3-beta (GENERIC) #14: Sun Feb  3 21:53:42 MST 2013
t...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 536870912 (512MB)
avail mem = 508682240 (485MB)
mainbus0 at root: model PowerBook6,5

ibook:fred ~ pkg_info|grep scratch
scratch-1.4.0.7 visual programming environment and toolkit

Thanks

Fred



Re: Bugs in Scratch

2013-02-11 Thread Stuart Henderson
On 2013/02/10 21:11, Stuart Cassoff wrote:
 On 02/10/13 18:50, OpenBSD wrote:
 
  But that was easy to fix and Scratch 1.4 is running well - with a few 
  hiccups - 
  such as core dumping when importing a 5 Mb mp3 file, 
  and recording sound causing a squeak primitive failure.
 
 Sound recording isn't working in Squeak on OpenBSD at the moment.
 
  
  Thanks for the upgrade to 1.4.
 
 My pleasure.
 
 Is it too late for this to go in?
 
 
 Stu
 

We don't have a proper working diff, Thunderbird mangled the one you
sent (stripped trailing spaces on lines in the manpage diff)
and not sure what's going on with sqCamera-linux.c at all, might also
be whitespace, might be something else.

|--- src/plugins/camera/sqCamera-linux.c.orig   Tue Oct 18 17:24:46 2011
|+++ src/plugins/camera/sqCamera-linux.cSun Sep 30 01:44:40 2012
--
Patching file src/plugins/camera/sqCamera-linux.c using Plan A...
Hunk #1 succeeded at 45.
Hunk #2 failed at 81.
Hunk #3 succeeded at 99.
Hunk #4 succeeded at 188.
Hunk #5 succeeded at 410 with fuzz 2 (offset 201 lines).
Hunk #6 succeeded at 447 (offset -201 lines).
Hunk #7 failed at 509.
Hunk #8 succeeded at 991 with fuzz 2 (offset 201 lines).
2 out of 8 hunks failed--saving rejects to 
src/plugins/camera/sqCamera-linux.c.rej



Re: Bugs in Scratch

2013-02-11 Thread Stuart Henderson
On 2013/02/11 07:17, Stuart Cassoff wrote:
 On 02/11/13 05:11, Stuart Henderson wrote:
  On 2013/02/10 21:11, Stuart Cassoff wrote:
  Is it too late for this to go in?
  
  We don't have a proper working diff, Thunderbird mangled the one you
  sent (stripped trailing spaces on lines in the manpage diff)
  and not sure what's going on with sqCamera-linux.c at all, might also
  be whitespace, might be something else.
 
 
 Tres bien, Monsieur.
 Voila la diffe, inlinee et attache.

Hmm... I still get a coredump every time on amd64 when I try and play
any sounds (including without the malloc.conf flags)..



Re: Bugs in Scratch

2013-02-11 Thread Stuart Cassoff
On 02/11/13 07:32, Stuart Henderson wrote:
 On 2013/02/11 07:17, Stuart Cassoff wrote:
 On 02/11/13 05:11, Stuart Henderson wrote:
 On 2013/02/10 21:11, Stuart Cassoff wrote:
 Is it too late for this to go in?

 We don't have a proper working diff, Thunderbird mangled the one you
 sent (stripped trailing spaces on lines in the manpage diff)
 and not sure what's going on with sqCamera-linux.c at all, might also
 be whitespace, might be something else.


 Tres bien, Monsieur.
 Voila la diffe, inlinee et attache.
 
 Hmm... I still get a coredump every time on amd64 when I try and play
 any sounds (including without the malloc.conf flags)..
 

Do you get a coredump as well with Scratch 1.3?

Scratch is little more than a Squeak image.
I believe the (sound) problem is in Squeak.


Stu




Re: Bugs in Scratch

2013-02-11 Thread Stuart Henderson
On 2013/02/11 08:18, Stuart Cassoff wrote:
 On 02/11/13 07:32, Stuart Henderson wrote:
  On 2013/02/11 07:17, Stuart Cassoff wrote:
  On 02/11/13 05:11, Stuart Henderson wrote:
  On 2013/02/10 21:11, Stuart Cassoff wrote:
  Is it too late for this to go in?
 
  We don't have a proper working diff, Thunderbird mangled the one you
  sent (stripped trailing spaces on lines in the manpage diff)
  and not sure what's going on with sqCamera-linux.c at all, might also
  be whitespace, might be something else.
 
 
  Tres bien, Monsieur.
  Voila la diffe, inlinee et attache.
  
  Hmm... I still get a coredump every time on amd64 when I try and play
  any sounds (including without the malloc.conf flags)..
  
 
 Do you get a coredump as well with Scratch 1.3?
 
 Scratch is little more than a Squeak image.
 I believe the (sound) problem is in Squeak.
 
 
 Stu
 
 

Yes, the things which I have tried so far work equally well in
1.3 and 1.4.0.7 (i.e. most things work, but as soon as I play sound
it segfaults which is then trapped and then the trap handler
SIGABRTs and dumps core).

$ scratch
fcntl(F_SETOWN, getpid()): Inappropriate ioctl for device

Segmentation fault

10434876 [] in SoundPlayer classplayLoop
10423676 Semaphorecritical:
10423584 SoundPlayer classplayLoop
10434572 [] in SoundPlayer classstartPlayerProcessBufferSize:rate:stereo:
10434664 [] in BlockContextnewProcess
Abort trap (core dumped) 


...


$ gdb `which squeak`
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as amd64-unknown-openbsd5.3...
(gdb) set args -plugins /usr/local/share/scratch/Plugins 
/usr/local/share/scratch/Scratch.image
(gdb) r
Starting program: /usr/local/bin/squeak -plugins 
/usr/local/share/scratch/Plugins /usr/local/share/scratch/Scratch.image
fcntl(F_SETOWN, getpid()): Inappropriate ioctl for device

Program received signal SIGSEGV, Segmentation fault.
0x0c443ac567e1 in slotSizeOf (oop=1259916424) at gnu-interp.c:21773
21773   header = longAt(oop);
(gdb) bt
#0  0x0c443ac567e1 in slotSizeOf (oop=1259916424) at gnu-interp.c:21773
#1  0x0c443ad1d4e5 in primitiveSoundPlaySamples ()
at 
/usr/obj/ports/squeak-vm-3.10.1/Squeak-3.10-1/platforms/unix/src/vm/intplugins/SoundPlugin/SoundPlugin.c:227
#2  0x0c443ac2ee25 in dispatchFunctionPointer (
aFunctionPointer=0xc443ad1d3db) at gnu-interp.c:4014
#3  0x0c443ac2cb09 in callExternalPrimitive (functionID=0xc443ad1d3db)
at gnu-interp.c:3025
#4  0x0c443ac4704a in primitiveExternalCall () at gnu-interp.c:14370
#5  0x0c443ac2ee25 in dispatchFunctionPointer (
aFunctionPointer=0xc443ac469fc) at gnu-interp.c:4014
#6  0x0c443ac38187 in interpret () at gnu-interp.c:7829
#7  0x0c443ac2a507 in main (argc=4, argv=0x7f7e1de0, 
envp=0x7f7e1e08)
at 
/usr/obj/ports/squeak-vm-3.10.1/Squeak-3.10-1/platforms/unix/vm/sqUnixMain.c:1413
(gdb) print oop
$1 = 1259916424

...

So some people have audio working with this? Which arch?
Smells like an LP64 issue...



Re: Bugs in Scratch

2013-02-11 Thread Stuart Cassoff
On 02/11/13 09:00, Stuart Henderson wrote:
 On 2013/02/11 08:18, Stuart Cassoff wrote:
 On 02/11/13 07:32, Stuart Henderson wrote:
 On 2013/02/11 07:17, Stuart Cassoff wrote:
 On 02/11/13 05:11, Stuart Henderson wrote:
 On 2013/02/10 21:11, Stuart Cassoff wrote:
 Is it too late for this to go in?

 We don't have a proper working diff, Thunderbird mangled the one you
 sent (stripped trailing spaces on lines in the manpage diff)
 and not sure what's going on with sqCamera-linux.c at all, might also
 be whitespace, might be something else.


 Tres bien, Monsieur.
 Voila la diffe, inlinee et attache.

 Hmm... I still get a coredump every time on amd64 when I try and play
 any sounds (including without the malloc.conf flags)..


 Do you get a coredump as well with Scratch 1.3?

 Scratch is little more than a Squeak image.
 I believe the (sound) problem is in Squeak.


 Stu


 
 Yes, the things which I have tried so far work equally well in
 1.3 and 1.4.0.7 (i.e. most things work, but as soon as I play sound
 it segfaults which is then trapped and then the trap handler
 SIGABRTs and dumps core).
 
 
 So some people have audio working with this? Which arch?
 Smells like an LP64 issue...
 

Looks like the 64 and 32 bit versions of Squeak are slightly different,
with separate dirs for each in the Squeak source.


Stu




Re: Bugs in Scratch

2013-02-10 Thread OpenBSD

On 02/07/13 06:06, Lars Engblom wrote:

The version in -current is crashing with at least the second game from
this one: http://nostarch.com/download/Super-Scratch-Resources.zip

These games are from this book: http://nostarch.com/scratch

I am using that book for teaching a group of pupils to take the first
steps towards programming. It is a bit annoying to not be able to test
things out at home before going to the school to teach them

Regards,
  Lasse


Hi Lasse,

Following the upgrade to Scratch 1.4 [1] posted by Stuart to ports I'm 
able to run the second game from the Super-Scratch-Resources.zip on:


s3:fred ~ dmesg|head -2
OpenBSD 5.3-beta (GENERIC.MP) #25: Fri Feb  1 16:35:30 MST 2013
t...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP

I can also run the game on:
x41:fred ~ dmesg|head -2
OpenBSD 5.3-beta (GENERIC) #27: Thu Feb  7 19:44:17 MST 2013
t...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC

but the sqCamera-linux.c patch failed to apply, and running it manually 
it also failed with:


x41:fred 
/usr/ports/pobj/scratch-1.4.0.7.src/scratch-1.4.0.7.src/src/plugins/camera 
cat sqCamera-linux.c.rej

@@ -71,6 +81,7 @@
 #endif


+#ifdef __linux__
 /*  LIBV4L2 USAGE 
 /
 / Attempting to get best-of-all-worlds so
@@ -495,7 +509,7 @@
bpp = 2;
break;
  case V4L2_PIX_FMT_YUYV: /* printf(V4L2_PIX_FMT_YUYV\n); */
-   bpp = 4;
+   bpp = 2;
break;
}

But that was easy to fix and Scratch 1.4 is running well - with a few 
hiccups - such as core dumping when importing a 5 Mb mp3 file, and 
recording sound causing a squeak primitive failure.


Thanks for the upgrade to 1.4.

Cheers

Fred

[1] http://marc.info/?l=openbsd-portsm=136033160003744w=2



Re: Bugs in Scratch

2013-02-10 Thread Stuart Cassoff
On 02/10/13 18:50, OpenBSD wrote:

 But that was easy to fix and Scratch 1.4 is running well - with a few hiccups 
 - 
 such as core dumping when importing a 5 Mb mp3 file, 
 and recording sound causing a squeak primitive failure.

Sound recording isn't working in Squeak on OpenBSD at the moment.

 
 Thanks for the upgrade to 1.4.

My pleasure.

Is it too late for this to go in?


Stu



Re: Bugs in Scratch

2013-02-06 Thread Lars Engblom
The version in -current is crashing with at least the second game from 
this one: http://nostarch.com/download/Super-Scratch-Resources.zip


These games are from this book: http://nostarch.com/scratch

I am using that book for teaching a group of pupils to take the first 
steps towards programming. It is a bit annoying to not be able to test 
things out at home before going to the school to teach them


Regards,
 Lasse

On 02/05/13 15:26, Stuart Cassoff wrote:

On 01/08/13 17:17, Stuart Cassoff wrote:

On 01/08/13 10:37, Stuart Henderson wrote:

On 2013/01/08 16:05, Lars Engblom wrote:

1. Both in current and stable the path to the image is wrong in
/usr/local/share/scratch/iniscratch

I've just fixed this one.

Sorry, did not see this earlier - original email eaten by spam control.
I thought this was fixed last year. *shrug*

Stu



Apologies. I should have fixed this. I thought I'd get the update done sooner.

Thanks.


Stu






Re: Bugs in Scratch

2013-02-05 Thread Stuart Cassoff
On 01/08/13 17:17, Stuart Cassoff wrote:
 On 01/08/13 10:37, Stuart Henderson wrote:
 On 2013/01/08 16:05, Lars Engblom wrote:
 1. Both in current and stable the path to the image is wrong in
 /usr/local/share/scratch/iniscratch

 I've just fixed this one.
 
 Sorry, did not see this earlier - original email eaten by spam control.
 I thought this was fixed last year. *shrug*
 
 Stu
 


Apologies. I should have fixed this. I thought I'd get the update done sooner.

Thanks.


Stu



Bugs in Scratch

2013-01-08 Thread Lars Engblom
1. Both in current and stable the path to the image is wrong in 
/usr/local/share/scratch/iniscratch


2. In stable, I have problem to run the programs made by Scratch

3. With current, I do not get Scratch to open up at all

All this is happening on amd64.

If there is anything I can test for to make the bug report more useful, 
please tell


R. Lasse



Re: Bugs in Scratch

2013-01-08 Thread Landry Breuil
On Tue, Jan 08, 2013 at 04:05:35PM +0200, Lars Engblom wrote:
 1. Both in current and stable the path to the image is wrong in
 /usr/local/share/scratch/iniscratch
 
 2. In stable, I have problem to run the programs made by Scratch
 
 3. With current, I do not get Scratch to open up at all
 
 All this is happening on amd64.
 
 If there is anything I can test for to make the bug report more
 useful, please tell

This is a known issue that has already been reported some weeks ago here
: http://marc.info/?l=openbsd-portsm=135594402301890w=2

stu, as you're the maintainer can you have a look into that, or at least
state that you have no time so that someone can pick that up ? i have
zero knowledge in scratch.

Landry



Re: Bugs in Scratch

2013-01-08 Thread Stuart Henderson
On 2013/01/08 16:05, Lars Engblom wrote:
 1. Both in current and stable the path to the image is wrong in
 /usr/local/share/scratch/iniscratch

I've just fixed this one.

 2. In stable, I have problem to run the programs made by Scratch

Do you just mean run them by clicking the green flag (which seems
to work for some things, but not others), or something else? (I know
nothing about Scratch.. for the avoidance of doubt I am not stu@ ;)

 3. With current, I do not get Scratch to open up at all

The below diff to squeak fixes this; ok with you espie?

Index: Makefile
===
RCS file: /cvs/ports/lang/squeak/vm/Makefile,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile
--- Makefile29 Mar 2012 13:38:40 -  1.15
+++ Makefile8 Jan 2013 15:32:00 -
@@ -4,10 +4,10 @@
 COMMENT =  smalltalk system, vm
 
 SRCV = 1
-DISTFILES =Squeak-$V-${SRCV}.src.tar.gz 
+DISTFILES =Squeak-$V-${SRCV}.src.tar.gz
 
 PKGNAME =  squeak-vm-$V.${SRCV}
-REVISION = 1
+REVISION = 2
 
 WRKDIST =  ${WRKDIR}/Squeak-$V-${SRCV}
 WRKSRC =   ${WRKDIST}/platforms/unix/config
@@ -19,7 +19,7 @@ MASTER_SITES =${SQUEAK_SITE}unix-linux/
 CONFIGURE_STYLE =  gnu
 AUTOCONF_VERSION = 2.60
 DESTDIRNAME =  ROOT
-CONFIGURE_ENV =RANLIB=ranlib \
+CONFIGURE_ENV =LDFLAGS=-lpthread ${LDFLAGS} RANLIB=ranlib \
ac_cv_socklen_t=yes
 USE_GMAKE =Yes
 USE_GROFF =Yes
Index: distinfo
===
RCS file: /cvs/ports/lang/squeak/vm/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo23 Jul 2008 11:17:22 -  1.5
+++ distinfo8 Jan 2013 15:32:00 -
@@ -1,5 +1,2 @@
-MD5 (squeak-3.10/Squeak-3.10-1.src.tar.gz) = f7rAKRFYMdGEIvMHnbsERA==
-RMD160 (squeak-3.10/Squeak-3.10-1.src.tar.gz) = vmcjnkchlyfX6ofHWiRdL3Fzw6o=
-SHA1 (squeak-3.10/Squeak-3.10-1.src.tar.gz) = a3qwcbz3gxig/q2U/4nRVXqHfHc=
 SHA256 (squeak-3.10/Squeak-3.10-1.src.tar.gz) = 
1enKsx8l+EL0K94VPgS5NUe1WeddoI8bmXpH9w0AMTM=
 SIZE (squeak-3.10/Squeak-3.10-1.src.tar.gz) = 5194944



Re: Bugs in Scratch

2013-01-08 Thread Stuart Henderson
On 2013/01/08 15:37, Stuart Henderson wrote:
 On 2013/01/08 16:05, Lars Engblom wrote:
  1. Both in current and stable the path to the image is wrong in
  /usr/local/share/scratch/iniscratch
 
 I've just fixed this one.
 
  2. In stable, I have problem to run the programs made by Scratch
 
 Do you just mean run them by clicking the green flag (which seems
 to work for some things, but not others), or something else? (I know

trying to narrow down the work for some things but not others;
one concrete thing is segfaults / abort traps when trying to play sound.



Re: Bugs in Scratch

2013-01-08 Thread Marc Espie
On Tue, Jan 08, 2013 at 03:56:43PM +, Stuart Henderson wrote:
 On 2013/01/08 15:37, Stuart Henderson wrote:
  On 2013/01/08 16:05, Lars Engblom wrote:
   1. Both in current and stable the path to the image is wrong in
   /usr/local/share/scratch/iniscratch
  
  I've just fixed this one.
  
   2. In stable, I have problem to run the programs made by Scratch
  
  Do you just mean run them by clicking the green flag (which seems
  to work for some things, but not others), or something else? (I know
 
 trying to narrow down the work for some things but not others;
 one concrete thing is segfaults / abort traps when trying to play sound.
sound is currently quite broken. I haven't had time to update squeak in
a while, we're probably lagging behind by a whole lot...



Re: Bugs in Scratch

2013-01-08 Thread Stuart Cassoff
On 01/08/13 10:37, Stuart Henderson wrote:
 On 2013/01/08 16:05, Lars Engblom wrote:
 1. Both in current and stable the path to the image is wrong in
 /usr/local/share/scratch/iniscratch
 
 I've just fixed this one.

Sorry, did not see this earlier - original email eaten by spam control.
I thought this was fixed last year. *shrug*

Stu