Merge pull request #42534 from Hodapp87/structuresynth

structure-synth: init at v1.5

authored by Matthew Bauer and committed by GitHub ef7a63e2 dc5eb16d

+99
+47
pkgs/tools/graphics/structure-synth/default.nix
··· 1 + { stdenv, fetchurl, qt4, qmake4Hook, unzip, mesa_glu, makeWrapper }: 2 + 3 + stdenv.mkDerivation rec { 4 + 5 + name = "structure-synth-${version}"; 6 + version = "v1.5"; 7 + 8 + src = fetchurl { 9 + url = mirror://sourceforge/structuresynth/StructureSynth-Source-v1.5.0.zip; 10 + sha256 = "1kiammx46719az6jzrav8yrwz82nk4m72ybj0kpbnvp9wfl3swbb"; 11 + }; 12 + 13 + buildInputs = [ qt4 unzip mesa_glu makeWrapper ]; 14 + nativeBuildInputs = [ qmake4Hook ]; 15 + 16 + # Thanks to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672000#15: 17 + patches = [ ./gcc47.patch ]; 18 + 19 + enableParallelBuilding = true; 20 + 21 + preConfigure = '' 22 + ${qt4}/bin/qmake -project -after "CONFIG+=opengl" -after "QT+=xml opengl script" -after "unix:LIBS+=-lGLU" 23 + ''; 24 + 25 + installPhase = '' 26 + mkdir -p $out/bin; 27 + mkdir -p $out/share/Examples $out/share/Misc; 28 + cp "Structure Synth Source Code" $out/bin/structure-synth; 29 + cp -r Examples/* $out/share/Examples; 30 + cp -r Misc/* $out/share/Misc; 31 + ''; 32 + 33 + # Structure Synth expects to see 'Examples' and 'Misc' directory in 34 + # either $HOME or $PWD - so help it along by moving $PWD to 'share', 35 + # where we just copied those two directories: 36 + preFixup = '' 37 + wrapProgram "$out/bin/structure-synth" --run "cd $out/share" 38 + ''; 39 + 40 + meta = with stdenv.lib; { 41 + description = "Application for generating 3D structures by specifying a design grammar"; 42 + homepage = http://structuresynth.sourceforge.net; 43 + maintainers = with maintainers; [ hodapp ]; 44 + license = licenses.gpl3; 45 + platforms = platforms.linux; 46 + }; 47 + }
+50
pkgs/tools/graphics/structure-synth/gcc47.patch
··· 1 + diff -rc "Structure Synth Source Code/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp" "Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp" 2 + *** "Structure Synth Source Code/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp" 2010-11-13 22:32:44.000000000 -0500 3 + --- "Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp" 2018-06-24 14:23:30.794296776 -0400 4 + *************** 5 + *** 1,5 **** 6 + #include <QThread> 7 + ! 8 + 9 + #include "RayTracer.h" 10 + 11 + --- 1,5 ---- 12 + #include <QThread> 13 + ! #include <GL/glu.h> 14 + 15 + #include "RayTracer.h" 16 + 17 + diff -rc "Structure Synth Source Code/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp" "Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp" 18 + *** "Structure Synth Source Code/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp" 2010-09-08 21:25:30.000000000 -0400 19 + --- "Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp" 2018-06-24 14:23:12.542868194 -0400 20 + *************** 21 + *** 122,128 **** 22 + currentT = p; 23 + 24 + // We do not intersect grid. 25 + ! if (!found) return false; 26 + } 27 + 28 + stepX = (dir.x() > 0) ? 1 : -1; 29 + --- 122,128 ---- 30 + currentT = p; 31 + 32 + // We do not intersect grid. 33 + ! if (!found) return NULL; 34 + } 35 + 36 + stepX = (dir.x() > 0) ? 1 : -1; 37 + Only in Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer: VoxelStepper.cpp.orig 38 + diff -rc "Structure Synth Source Code/SyntopiaCore/GLEngine/Sphere.h" "Structure Synth Source Code2/SyntopiaCore/GLEngine/Sphere.h" 39 + *** "Structure Synth Source Code/SyntopiaCore/GLEngine/Sphere.h" 2010-08-11 15:12:22.000000000 -0400 40 + --- "Structure Synth Source Code2/SyntopiaCore/GLEngine/Sphere.h" 2018-06-24 14:23:30.793296807 -0400 41 + *************** 42 + *** 2,7 **** 43 + --- 2,8 ---- 44 + 45 + #include "SyntopiaCore/Math/Vector3.h" 46 + #include "Object3D.h" 47 + + #include <GL/glu.h> 48 + 49 + namespace SyntopiaCore { 50 + namespace GLEngine {
+2
pkgs/top-level/all-packages.nix
··· 5155 5155 5156 5156 sstp = callPackage ../tools/networking/sstp {}; 5157 5157 5158 + structure-synth = callPackage ../tools/graphics/structure-synth { }; 5159 + 5158 5160 su-exec = callPackage ../tools/security/su-exec {}; 5159 5161 5160 5162 subsurface = libsForQt5.callPackage ../applications/misc/subsurface { };