Add the Pharo language and IDE package

http://pharo.org

I'm one of the developers of Pharo and the creator and maintainer of the
Ubuntu PPA : https://launchpad.net/~pharo/+archive/stable.
This commit is contained in:
Damien Cassou 2014-08-05 15:37:56 +02:00 committed by Rob Vermaas
parent b6e2a52b72
commit 8efdaa0aa2
11 changed files with 222 additions and 0 deletions

View file

@ -0,0 +1,79 @@
{ stdenv, fetchurl, cmake, bash, unzip, glibc, openssl, gcc, mesa, freetype, xlibs, alsaLib }:
stdenv.mkDerivation rec {
name = "pharo-vm-core-i386-2014.06.25";
system = "x86_32-linux";
src = fetchurl {
url = http://files.pharo.org/vm/src/vm-unix-sources/pharo-vm-2014.06.25.tar.bz2;
md5 = "4d80d8169c2f2f0355c43ee90bbad23f";
};
sources10Zip = fetchurl {
url = http://files.pharo.org/sources/PharoV10.sources.zip;
md5 = "3476222a0345a6f8f8b6093b5e3b30fb";
};
sources20Zip = fetchurl {
url = http://files.pharo.org/sources/PharoV20.sources.zip;
md5 = "a145b0733f9d68d9ce6a76270b6b9ec8";
};
sources30Zip = fetchurl {
url = http://files.pharo.org/sources/PharoV30.sources.zip;
md5 = "bb0a66b8968ef7d0da97ec86331f68c8";
};
# Building
preConfigure = ''
cd build/
'';
resources = ./resources;
installPhase = ''
echo Current directory $(pwd)
echo Creating prefix "$prefix"
mkdir -p "$prefix/lib/pharo-vm"
cd ../../results
mv vm-display-null vm-display-null.so
mv vm-display-X11 vm-display-X11.so
mv vm-sound-null vm-sound-null.so
mv vm-sound-ALSA vm-sound-ALSA.so
mv pharo pharo-vm
cp * "$prefix/lib/pharo-vm"
cp -R "$resources"/* "$prefix/"
mkdir $prefix/bin
chmod u+w $prefix/bin
cat > $prefix/bin/pharo-vm-x <<EOF
#!${bash}/bin/bash
# disable parameter expansion to forward all arguments unprocessed to the VM
set -f
exec $prefix/lib/pharo-vm/pharo-vm "\$@"
EOF
cat > $prefix/bin/pharo-vm-nox <<EOF
#!${bash}/bin/bash
# disable parameter expansion to forward all arguments unprocessed to the VM
set -f
exec $prefix/lib/pharo-vm/pharo-vm -vm-display-null "\$@"
EOF
chmod +x $prefix/bin/pharo-vm-x $prefix/bin/pharo-vm-nox
unzip ${sources10Zip} -d $prefix/lib/pharo-vm/
unzip ${sources20Zip} -d $prefix/lib/pharo-vm/
unzip ${sources30Zip} -d $prefix/lib/pharo-vm/
'';
patches = [ patches/pharo-is-not-squeak.patch patches/fix-executable-name.patch patches/fix-cmake-root-directory.patch ];
buildInputs = [ bash unzip cmake glibc openssl gcc mesa freetype xlibs.libX11 xlibs.libICE xlibs.libSM alsaLib ];
}

View file

@ -0,0 +1,84 @@
From: Damien Cassou <damien.cassou@gmail.com>
Subject: Fix use of absolute paths in cmake files
* build/directories.cmake
* build/CMakeLists.txt
* build/vm-sound-ALSA/CMakeLists.txt
* build/vm-sound-null/CMakeLists.txt
* build/vm-display-null/CMakeLists.txt
* build/vm-display-X11/CMakeLists.txt
--- a/build/CMakeLists.txt
+++ b/build/CMakeLists.txt
@@ -71,7 +71,7 @@
list(APPEND LINKLIBS m)
list(APPEND LINKLIBS dl)
list(APPEND LINKLIBS pthread)
-set(EXECUTABLE_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results")
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results")
add_subdirectory("vm-display-null")
add_subdirectory("vm-display-X11")
add_subdirectory("vm-sound-ALSA")
--- a/build/directories.cmake
+++ b/build/directories.cmake
@@ -1,12 +1,12 @@
-set(topDir "/builds/workspace/Pharo-vm-unix-sources/cog")
-set(buildDir "/builds/workspace/Pharo-vm-unix-sources/cog/build")
+set(topDir "${CMAKE_SOURCE_DIR}/..")
+set(buildDir "${CMAKE_SOURCE_DIR}/../build")
set(thirdpartyDir "${buildDir}/thirdParty")
-set(platformsDir "/builds/workspace/Pharo-vm-unix-sources/cog/platforms")
-set(srcDir "/builds/workspace/Pharo-vm-unix-sources/cog/src")
+set(platformsDir "${CMAKE_SOURCE_DIR}/../platforms")
+set(srcDir "${CMAKE_SOURCE_DIR}/../src")
set(srcPluginsDir "${srcDir}/plugins")
set(srcVMDir "${srcDir}/vm")
set(platformName "unix")
set(targetPlatform ${platformsDir}/${platformName})
set(crossDir "${platformsDir}/Cross")
set(platformVMDir "${targetPlatform}/vm")
-set(outputDir "/builds/workspace/Pharo-vm-unix-sources/cog/results")
+set(outputDir "${CMAKE_SOURCE_DIR}/../results")
--- a/build/vm-display-X11/CMakeLists.txt
+++ b/build/vm-display-X11/CMakeLists.txt
@@ -11,7 +11,7 @@
include_directories(${crossDir}/plugins/FilePlugin)
include_directories(${targetPlatform}/plugins/B3DAcceleratorPlugin)
include_directories(${crossDir}/plugins/B3DAcceleratorPlugin)
-set(LIBRARY_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results")
+set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results")
list(APPEND LINKLIBS SM)
list(APPEND LINKLIBS ICE)
list(APPEND LINKLIBS GL)
--- a/build/vm-display-null/CMakeLists.txt
+++ b/build/vm-display-null/CMakeLists.txt
@@ -11,7 +11,7 @@
include_directories(${crossDir}/plugins/FilePlugin)
include_directories(${targetPlatform}/plugins/B3DAcceleratorPlugin)
include_directories(${crossDir}/plugins/B3DAcceleratorPlugin)
-set(LIBRARY_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results")
+set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results")
target_link_libraries(vm-display-null ${LINKLIBS})
set_target_properties(vm-display-null PROPERTIES PREFIX "" SUFFIX ""
LINK_FLAGS -m32)
--- a/build/vm-sound-ALSA/CMakeLists.txt
+++ b/build/vm-sound-ALSA/CMakeLists.txt
@@ -11,7 +11,7 @@
include_directories(${crossDir}/plugins/FilePlugin)
include_directories(${targetPlatform}/plugins/B3DAcceleratorPlugin)
include_directories(${crossDir}/plugins/B3DAcceleratorPlugin)
-set(LIBRARY_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results")
+set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results")
target_link_libraries(vm-sound-ALSA ${LINKLIBS})
set_target_properties(vm-sound-ALSA PROPERTIES PREFIX "" SUFFIX ""
LINK_FLAGS -m32)
--- a/build/vm-sound-null/CMakeLists.txt
+++ b/build/vm-sound-null/CMakeLists.txt
@@ -11,7 +11,7 @@
include_directories(${crossDir}/plugins/FilePlugin)
include_directories(${targetPlatform}/plugins/B3DAcceleratorPlugin)
include_directories(${crossDir}/plugins/B3DAcceleratorPlugin)
-set(LIBRARY_OUTPUT_PATH "/builds/workspace/Pharo-vm-unix-sources/cog/results")
+set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../results")
target_link_libraries(vm-sound-null ${LINKLIBS})
set_target_properties(vm-sound-null PROPERTIES PREFIX "" SUFFIX ""
LINK_FLAGS -m32)

View file

@ -0,0 +1,14 @@
Change the name of the executable file from Squeak to Pharo
--- a/platforms/unix/vm-display-X11/sqUnixX11.c
+++ b/platforms/unix/vm-display-X11/sqUnixX11.c
@@ -153,8 +153,8 @@
/*** Variables -- X11 Related ***/
/* name of Squeak windows in Xrm and the WM */
-#define xResClass "Squeak"
-#define xResName "squeak"
+#define xResClass "pharo-vm"
+#define xResName "Pharo"
char *displayName= 0; /* name of display, or 0 for $DISPLAY */
Display *stDisplay= null; /* Squeak display */

View file

@ -0,0 +1,23 @@
pharo --help must talk about Pharo and not about Squeak
--- a/platforms/unix/vm-display-X11/sqUnixX11.c
+++ b/platforms/unix/vm-display-X11/sqUnixX11.c
@@ -7075,8 +7075,8 @@
printf(" -lazy go to sleep when main window unmapped\n");
printf(" -mapdelbs map Delete key onto Backspace\n");
printf(" -nointl disable international keyboard support\n");
- printf(" -notitle disable the Squeak window title bar\n");
- printf(" -title <t> use t as the Squeak window title instead of the image name\n");
+ printf(" -notitle disable the Pharo window title bar\n");
+ printf(" -title <t> use t as the Pharo window title instead of the image name\n");
printf(" -ldtoms <n> launch drop timeout milliseconds\n");
printf(" -noxdnd disable X drag-and-drop protocol support\n");
printf(" -optmod <n> map Mod<n> to the Option key\n");
@@ -7095,7 +7095,7 @@
static void display_printUsageNotes(void)
{
printf(" Using `unix:0' for <dpy> may improve local display performance.\n");
- printf(" -xshm only works when Squeak is running on the X server host.\n");
+ printf(" -xshm only works when Pharo is running on the X server host.\n");
}

View file

@ -0,0 +1,11 @@
[Desktop Entry]
Name=Pharo VM
GenericName=Pharo Virtual Machine
Exec=pharo-vm-x %F
Icon=pharo
Terminal=false
Type=Application
StartupNotify=false
Categories=Development;
MimeType=application/x-pharo-image;
NoDisplay=true

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-pharo-image">
<comment>Pharo image file</comment>
<comment xml:lang="fr">Fichier d'image Pharo</comment>
<glob pattern="*.image"/>
<icon name="pharo"/>
</mime-type>
</mime-info>

View file

@ -3719,6 +3719,8 @@ let
guile-xcb = callPackage ../development/guile-modules/guile-xcb { };
pharo-vm = callPackage_i686 ../development/pharo/vm { };
srecord = callPackage ../development/tools/misc/srecord { };
windowssdk = (