From 8efdaa0aa2486942f3bfe888a0cd13b67130b147 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Tue, 5 Aug 2014 15:37:56 +0200 Subject: 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. --- pkgs/development/pharo/vm/default.nix | 79 +++++++++++++++++++ .../vm/patches/fix-cmake-root-directory.patch | 84 +++++++++++++++++++++ .../pharo/vm/patches/fix-executable-name.patch | 14 ++++ .../pharo/vm/patches/pharo-is-not-squeak.patch | 23 ++++++ .../resources/share/applications/pharo-vm.desktop | 11 +++ .../share/icons/hicolor/16x16/apps/pharo.png | Bin 0 -> 902 bytes .../share/icons/hicolor/256x256/apps/pharo.png | Bin 0 -> 52181 bytes .../share/icons/hicolor/32x32/apps/pharo.png | Bin 0 -> 2368 bytes .../share/icons/hicolor/48x48/apps/pharo.png | Bin 0 -> 4602 bytes .../resources/share/mime/packages/pharo-image.xml | 9 +++ 10 files changed, 220 insertions(+) create mode 100644 pkgs/development/pharo/vm/default.nix create mode 100644 pkgs/development/pharo/vm/patches/fix-cmake-root-directory.patch create mode 100644 pkgs/development/pharo/vm/patches/fix-executable-name.patch create mode 100644 pkgs/development/pharo/vm/patches/pharo-is-not-squeak.patch create mode 100644 pkgs/development/pharo/vm/resources/share/applications/pharo-vm.desktop create mode 100644 pkgs/development/pharo/vm/resources/share/icons/hicolor/16x16/apps/pharo.png create mode 100644 pkgs/development/pharo/vm/resources/share/icons/hicolor/256x256/apps/pharo.png create mode 100644 pkgs/development/pharo/vm/resources/share/icons/hicolor/32x32/apps/pharo.png create mode 100644 pkgs/development/pharo/vm/resources/share/icons/hicolor/48x48/apps/pharo.png create mode 100644 pkgs/development/pharo/vm/resources/share/mime/packages/pharo-image.xml (limited to 'pkgs/development/pharo') diff --git a/pkgs/development/pharo/vm/default.nix b/pkgs/development/pharo/vm/default.nix new file mode 100644 index 000000000000..939ff8ec7506 --- /dev/null +++ b/pkgs/development/pharo/vm/default.nix @@ -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 < $prefix/bin/pharo-vm-nox < +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) diff --git a/pkgs/development/pharo/vm/patches/fix-executable-name.patch b/pkgs/development/pharo/vm/patches/fix-executable-name.patch new file mode 100644 index 000000000000..b32ed7a32d25 --- /dev/null +++ b/pkgs/development/pharo/vm/patches/fix-executable-name.patch @@ -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 */ diff --git a/pkgs/development/pharo/vm/patches/pharo-is-not-squeak.patch b/pkgs/development/pharo/vm/patches/pharo-is-not-squeak.patch new file mode 100644 index 000000000000..c06916c96ee3 --- /dev/null +++ b/pkgs/development/pharo/vm/patches/pharo-is-not-squeak.patch @@ -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 use t as the Squeak window title instead of the image name\n"); ++ printf(" -notitle disable the Pharo window title bar\n"); ++ printf(" -title use t as the Pharo window title instead of the image name\n"); + printf(" -ldtoms launch drop timeout milliseconds\n"); + printf(" -noxdnd disable X drag-and-drop protocol support\n"); + printf(" -optmod map Mod to the Option key\n"); +@@ -7095,7 +7095,7 @@ + static void display_printUsageNotes(void) + { + printf(" Using `unix:0' for 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"); + } + + diff --git a/pkgs/development/pharo/vm/resources/share/applications/pharo-vm.desktop b/pkgs/development/pharo/vm/resources/share/applications/pharo-vm.desktop new file mode 100644 index 000000000000..9061ec9b8e50 --- /dev/null +++ b/pkgs/development/pharo/vm/resources/share/applications/pharo-vm.desktop @@ -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 diff --git a/pkgs/development/pharo/vm/resources/share/icons/hicolor/16x16/apps/pharo.png b/pkgs/development/pharo/vm/resources/share/icons/hicolor/16x16/apps/pharo.png new file mode 100644 index 000000000000..7910e17ebc49 Binary files /dev/null and b/pkgs/development/pharo/vm/resources/share/icons/hicolor/16x16/apps/pharo.png differ diff --git a/pkgs/development/pharo/vm/resources/share/icons/hicolor/256x256/apps/pharo.png b/pkgs/development/pharo/vm/resources/share/icons/hicolor/256x256/apps/pharo.png new file mode 100644 index 000000000000..f6e881417524 Binary files /dev/null and b/pkgs/development/pharo/vm/resources/share/icons/hicolor/256x256/apps/pharo.png differ diff --git a/pkgs/development/pharo/vm/resources/share/icons/hicolor/32x32/apps/pharo.png b/pkgs/development/pharo/vm/resources/share/icons/hicolor/32x32/apps/pharo.png new file mode 100644 index 000000000000..ec8a5f95c6c4 Binary files /dev/null and b/pkgs/development/pharo/vm/resources/share/icons/hicolor/32x32/apps/pharo.png differ diff --git a/pkgs/development/pharo/vm/resources/share/icons/hicolor/48x48/apps/pharo.png b/pkgs/development/pharo/vm/resources/share/icons/hicolor/48x48/apps/pharo.png new file mode 100644 index 000000000000..3f206cf8b18c Binary files /dev/null and b/pkgs/development/pharo/vm/resources/share/icons/hicolor/48x48/apps/pharo.png differ diff --git a/pkgs/development/pharo/vm/resources/share/mime/packages/pharo-image.xml b/pkgs/development/pharo/vm/resources/share/mime/packages/pharo-image.xml new file mode 100644 index 000000000000..927514dd215b --- /dev/null +++ b/pkgs/development/pharo/vm/resources/share/mime/packages/pharo-image.xml @@ -0,0 +1,9 @@ + + + + Pharo image file + Fichier d'image Pharo + + + + -- cgit 1.4.1