Merge pull request #69077 from peterhoeg/u/librecad
librecad: 2.1.3 -> 2.2.0-rc1
This commit is contained in:
commit
3b8a23247f
@ -1,42 +1,64 @@
|
|||||||
{ stdenv, fetchurl, qt4, qmake4Hook, muparser, which, boost, pkgconfig }:
|
{ mkDerivation, lib, fetchFromGitHub, installShellFiles, pkgconfig, runtimeShell
|
||||||
|
, qtbase, qtsvg, qttools, qmake
|
||||||
|
, boost, muparser }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
mkDerivation rec {
|
||||||
version = "2.1.3";
|
|
||||||
pname = "librecad";
|
pname = "librecad";
|
||||||
|
version = "2.2.0-rc1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/LibreCAD/LibreCAD/tarball/${version}";
|
owner = "LibreCAD";
|
||||||
name = "${pname}-${version}" + ".tar.gz";
|
repo = "LibreCAD";
|
||||||
sha256 = "1czp8bja61hfav2m7184cq1np1n76w3w6vn0hlkp81hhz9zc62sx";
|
rev = version;
|
||||||
|
sha256 = "0kwj838hqzbw95gl4x6scli9gj3gs72hdmrrkzwq5rjxam18k3f3";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
patches = [ ./fix_qt_5_11_build.patch ];
|
||||||
sed -i -e s,/bin/bash,`type -P bash`, scripts/postprocess-unix.sh
|
|
||||||
sed -i -e s,/usr/share,$out/share, librecad/src/lib/engine/rs_system.cpp
|
postPatch = ''
|
||||||
|
substituteInPlace scripts/postprocess-unix.sh \
|
||||||
|
--replace /bin/sh ${runtimeShell}
|
||||||
|
|
||||||
|
substituteInPlace librecad/src/lib/engine/rs_system.cpp \
|
||||||
|
--replace /usr/share $out/share
|
||||||
|
|
||||||
|
substituteInPlace librecad/src/main/qc_applicationwindow.cpp \
|
||||||
|
--replace __DATE__ 0
|
||||||
'';
|
'';
|
||||||
|
|
||||||
qmakeFlags = [ "MUPARSER_DIR=${muparser}" "BOOST_DIR=${boost.dev}" ];
|
qmakeFlags = [
|
||||||
|
"MUPARSER_DIR=${muparser}"
|
||||||
|
"BOOST_DIR=${boost.dev}"
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -m 555 -D unix/librecad $out/bin/librecad
|
runHook preInstall
|
||||||
install -m 444 -D desktop/librecad.desktop $out/share/applications/librecad.desktop
|
|
||||||
install -m 444 -D desktop/librecad.sharedmimeinfo $out/share/mime/packages/librecad.xml
|
install -Dm555 -t $out/bin unix/{librecad,ttf2lff}
|
||||||
install -m 444 -D desktop/graphics_icons_and_splash/Icon\ LibreCAD/Icon_Librecad.svg \
|
install -Dm444 -t $out/share/applications desktop/librecad.desktop
|
||||||
|
install -Dm644 -t $out/share/pixmaps librecad/res/main/librecad.png
|
||||||
|
install -Dm444 desktop/librecad.sharedmimeinfo $out/share/mime/packages/librecad.xml
|
||||||
|
install -Dm444 desktop/graphics_icons_and_splash/Icon\ LibreCAD/Icon_Librecad.svg \
|
||||||
$out/share/icons/hicolor/scalable/apps/librecad.svg
|
$out/share/icons/hicolor/scalable/apps/librecad.svg
|
||||||
|
|
||||||
|
installManPage desktop/librecad.?
|
||||||
|
|
||||||
cp -R unix/resources $out/share/librecad
|
cp -R unix/resources $out/share/librecad
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ qt4 muparser which boost ];
|
buildInputs = [ boost muparser qtbase qtsvg ];
|
||||||
nativeBuildInputs = [ pkgconfig qmake4Hook ];
|
|
||||||
|
nativeBuildInputs = [ installShellFiles pkgconfig qmake qttools ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "A 2D CAD package based upon Qt";
|
description = "2D CAD package based on Qt";
|
||||||
homepage = https://librecad.org;
|
homepage = "https://librecad.org";
|
||||||
repositories.git = git://github.com/LibreCAD/LibreCAD.git;
|
license = licenses.gpl2;
|
||||||
license = stdenv.lib.licenses.gpl2;
|
maintainers = with maintainers; [ viric ];
|
||||||
maintainers = with stdenv.lib.maintainers; [viric];
|
platforms = platforms.linux;
|
||||||
platforms = with stdenv.lib.platforms; linux;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
36
pkgs/applications/misc/librecad/fix_qt_5_11_build.patch
Normal file
36
pkgs/applications/misc/librecad/fix_qt_5_11_build.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
diff --git a/librecad/src/ui/forms/qg_commandwidget.cpp b/librecad/src/ui/forms/qg_commandwidget.cpp
|
||||||
|
index 835e47d..2c878e8 100644
|
||||||
|
--- a/librecad/src/ui/forms/qg_commandwidget.cpp
|
||||||
|
+++ b/librecad/src/ui/forms/qg_commandwidget.cpp
|
||||||
|
@@ -27,6 +27,7 @@
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
+#include <QAction>
|
||||||
|
#include <QKeyEvent>
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include <QSettings>
|
||||||
|
diff --git a/librecad/src/ui/generic/colorwizard.cpp b/librecad/src/ui/generic/colorwizard.cpp
|
||||||
|
index 2beaceb..84068ad 100644
|
||||||
|
--- a/librecad/src/ui/generic/colorwizard.cpp
|
||||||
|
+++ b/librecad/src/ui/generic/colorwizard.cpp
|
||||||
|
@@ -27,6 +27,7 @@
|
||||||
|
#include "colorwizard.h"
|
||||||
|
#include "ui_colorwizard.h"
|
||||||
|
|
||||||
|
+#include <QAction>
|
||||||
|
#include <QColorDialog>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QListWidget>
|
||||||
|
diff --git a/librecad/src/ui/generic/widgetcreator.cpp b/librecad/src/ui/generic/widgetcreator.cpp
|
||||||
|
index 7c35144..0e394f2 100644
|
||||||
|
--- a/librecad/src/ui/generic/widgetcreator.cpp
|
||||||
|
+++ b/librecad/src/ui/generic/widgetcreator.cpp
|
||||||
|
@@ -27,6 +27,7 @@
|
||||||
|
#include "widgetcreator.h"
|
||||||
|
#include "ui_widgetcreator.h"
|
||||||
|
|
||||||
|
+#include <QActionGroup>
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QPushButton>
|
@ -19143,7 +19143,7 @@ in
|
|||||||
|
|
||||||
libowfat = callPackage ../development/libraries/libowfat { };
|
libowfat = callPackage ../development/libraries/libowfat { };
|
||||||
|
|
||||||
librecad = callPackage ../applications/misc/librecad { };
|
librecad = libsForQt5.callPackage ../applications/misc/librecad { };
|
||||||
|
|
||||||
libreoffice = hiPrio libreoffice-still;
|
libreoffice = hiPrio libreoffice-still;
|
||||||
libreoffice-unwrapped = libreoffice.libreoffice;
|
libreoffice-unwrapped = libreoffice.libreoffice;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user