mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
LibreCAD: move to Qt5
This commit is contained in:
@@ -1,60 +0,0 @@
|
||||
SUMMARY="A 2D CAD drawing tool"
|
||||
DESCRIPTION="LibreCAD is a 2D CAD drawing tool based on the community edition \
|
||||
of QCAD (http://www.qcad.org).
|
||||
|
||||
LibreCAD has been re-structured, ported to new Qt versions and works natively \
|
||||
cross platform between OS X, Windows, Linux and Haiku."
|
||||
HOMEPAGE="http://librecad.org"
|
||||
COPYRIGHT="2015 LibreCAD"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="git+https://github.com/LibreCAD/LibreCAD#fc30396"
|
||||
PATCHES="librecad_x86-2.0.7.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
librecad$secondaryArchSuffix = $portVersion
|
||||
app:LibreCAD$secondaryArchSuffix = $portVersion
|
||||
cmd:ttf2lff$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku${secondaryArchSuffix}
|
||||
libqt4$secondaryArchSuffix >= 4.8.0
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
libqt4${secondaryArchSuffix}_devel >= 4.8.0
|
||||
boost${secondaryArchSuffix}_devel
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:qmake$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
qmake
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/LibreCAD $binDir
|
||||
|
||||
cd unix
|
||||
strip librecad
|
||||
addResourcesToBinaries ../haiku/LibreCAD.rdef librecad
|
||||
|
||||
cp librecad $appsDir/LibreCAD/LibreCAD
|
||||
cp -R appdata resources $appsDir/LibreCAD
|
||||
cp ttf2lff $binDir
|
||||
|
||||
addAppDeskbarSymlink $appsDir/LibreCAD/LibreCAD "LibreCAD"
|
||||
}
|
||||
@@ -1,19 +1,18 @@
|
||||
SUMMARY="A 2D CAD drawing tool"
|
||||
DESCRIPTION="LibreCAD is a 2D CAD drawing tool based on the community edition \
|
||||
of QCAD (http://www.qcad.org).
|
||||
|
||||
LibreCAD has been re-structured, ported to new Qt versions and works natively \
|
||||
cross platform between OS X, Windows, Linux and Haiku."
|
||||
HOMEPAGE="http://librecad.org"
|
||||
COPYRIGHT="2015 LibreCAD"
|
||||
SUMMARY="A 2D CAD drawing program"
|
||||
DESCRIPTION="LibreCAD is a cross-platform 2D CAD program written in C++11 \
|
||||
using the Qt framework. It can read DXF and DWG files and can write DXF, PDF \
|
||||
and SVG files. The user interface is highly customizable, and has dozens of \
|
||||
translations.
|
||||
HOMEPAGE="http://librecad.org/"
|
||||
COPYRIGHT="2017 LibreCAD"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/LibreCAD/LibreCAD/archive/2.1.3.tar.gz"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/LibreCAD/LibreCAD/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="74c4ede409b13d0365c65c0cd52dba04f1049530f6df706dc905443d5e60db06"
|
||||
PATCHES="librecad-$portVersion.patchset"
|
||||
SOURCE_DIR="LibreCAD-2.1.3"
|
||||
SOURCE_DIR="LibreCAD-$portVersion"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
@@ -22,15 +21,16 @@ PROVIDES="
|
||||
cmd:ttf2lff$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku${secondaryArchSuffix}
|
||||
libqt4$secondaryArchSuffix >= 4.8.0
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libqt5$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
libqt4${secondaryArchSuffix}_devel >= 4.8.0
|
||||
boost${secondaryArchSuffix}_devel
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libqt5$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
@@ -59,5 +59,5 @@ INSTALL()
|
||||
cp -R appdata resources $appsDir/LibreCAD
|
||||
cp ttf2lff $binDir
|
||||
|
||||
addAppDeskbarSymlink $appsDir/LibreCAD/LibreCAD "LibreCAD"
|
||||
addAppDeskbarSymlink $appsDir/LibreCAD/LibreCAD
|
||||
}
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
From d68187bdf171109f880bf13567fa6eff3b885cf8 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 27 Apr 2015 15:30:28 +1000
|
||||
Subject: Fix Haiku build
|
||||
|
||||
|
||||
diff --git a/librecad/src/boost.pri b/librecad/src/boost.pri
|
||||
index 3362f89..c6b3a0d 100644
|
||||
--- a/librecad/src/boost.pri
|
||||
+++ b/librecad/src/boost.pri
|
||||
@@ -3,7 +3,7 @@
|
||||
# XXX: this will not play nice with the win case as-is
|
||||
BOOST_LIBS =
|
||||
|
||||
-unix {
|
||||
+unix:!haiku {
|
||||
defineTest( checkBoostIncDir ) {
|
||||
|
||||
boostIncDir = $${1}
|
||||
diff --git a/librecad/src/lib/generators/lc_makercamsvg.cpp b/librecad/src/lib/generators/lc_makercamsvg.cpp
|
||||
index acb3717..a8bc8c9 100644
|
||||
--- a/librecad/src/lib/generators/lc_makercamsvg.cpp
|
||||
+++ b/librecad/src/lib/generators/lc_makercamsvg.cpp
|
||||
@@ -55,6 +55,22 @@
|
||||
#include "rs_utility.h"
|
||||
#include "rs_math.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+
|
||||
+#include <string>
|
||||
+#include <sstream>
|
||||
+
|
||||
+namespace patch
|
||||
+{
|
||||
+ template < typename T > std::string to_string( const T& n )
|
||||
+ {
|
||||
+ std::ostringstream stm ;
|
||||
+ stm << n ;
|
||||
+ return stm.str() ;
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
namespace {
|
||||
const std::string NAMESPACE_URI_SVG = "http://www.w3.org/2000/svg";
|
||||
const std::string NAMESPACE_URI_LC = "http://www.librecad.org";
|
||||
@@ -158,7 +174,11 @@ void LC_MakerCamSVG::writeBlock(RS_Block* block) {
|
||||
|
||||
xmlWriter->addElement("g", NAMESPACE_URI_SVG);
|
||||
|
||||
- xmlWriter->addAttribute("id", std::to_string(block->getId()));
|
||||
+#ifndef __HAIKU__
|
||||
+ xmlWriter->addAttribute("id", std::to_string(block->getId()));
|
||||
+#else
|
||||
+ xmlWriter->addAttribute("id", patch::to_string(block->getId()));
|
||||
+#endif
|
||||
xmlWriter->addAttribute("blockname", qPrintable(block->getName()), NAMESPACE_URI_LC);
|
||||
|
||||
writeLayers(block);
|
||||
@@ -299,7 +319,11 @@ void LC_MakerCamSVG::writeInsert(RS_Insert* insert) {
|
||||
|
||||
xmlWriter->addAttribute("x", numXml(insertionpoint.x));
|
||||
xmlWriter->addAttribute("y", numXml(insertionpoint.y - (max.y - min.y)));
|
||||
+#ifndef __HAIKU__
|
||||
xmlWriter->addAttribute("href", "#" + std::to_string(block->getId()), NAMESPACE_URI_XLINK);
|
||||
+#else
|
||||
+ xmlWriter->addAttribute("href", "#" + patch::to_string(block->getId()), NAMESPACE_URI_XLINK);
|
||||
+#endif
|
||||
|
||||
xmlWriter->closeElement();
|
||||
}
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 0bfb7d8ca97500685c836ab263dcec85032855c7 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 27 Apr 2015 18:44:16 +1000
|
||||
Subject: Add resource file for Haiku
|
||||
|
||||
|
||||
diff --git a/haiku/LibreCAD.rdef b/haiku/LibreCAD.rdef
|
||||
new file mode 100644
|
||||
index 0000000..fe99be0
|
||||
--- /dev/null
|
||||
+++ b/haiku/LibreCAD.rdef
|
||||
@@ -0,0 +1,63 @@
|
||||
+resource app_signature "application/x-vnd.LibreCAD";
|
||||
+resource app_flags B_SINGLE_LAUNCH;
|
||||
+resource app_version {
|
||||
+ major = 2,
|
||||
+ middle = 0,
|
||||
+ minor = 7,
|
||||
+
|
||||
+ /* Application "variety" can be set to one of the following:
|
||||
+ * B_APPV_DEVELOPMENT,
|
||||
+ * B_APPV_ALPHA,
|
||||
+ * B_APPV_BETA,
|
||||
+ * B_APPV_GAMMA,
|
||||
+ * B_APPV_GOLDEN_MASTER,
|
||||
+ * B_APPV_FINAL
|
||||
+ */
|
||||
+ variety = B_APPV_DEVELOPMENT,
|
||||
+ internal = 0,
|
||||
+
|
||||
+ short_info = "LibreCAD",
|
||||
+ long_info = "LibreCAD"
|
||||
+};
|
||||
+
|
||||
+resource file_types message {
|
||||
+ "types" = "application/x-dxf",
|
||||
+ "types" = "application/x-dwg"
|
||||
+};
|
||||
+
|
||||
+resource vector_icon array {
|
||||
+ $"6E63696602038ED900054D070606FD0F20B61720B61720B618B3F2B617B5D6B6"
|
||||
+ $"17B4E4B618B5EBB615B615B618B600B600B618B5D6B617B5EBB618B4E4B61720"
|
||||
+ $"B617B3F2B61820B6170606F30FC96220C961B3BFC96220CC79CC79B617CC79B6"
|
||||
+ $"17CB87B618C9A3B617CA95B617C98EB618C963B615C978B618C95FB5CDC961B5"
|
||||
+ $"3DC963B585C962B47E0211B9F5B462B892B516BB78B39CBED6B308BD24B326BF"
|
||||
+ $"38B301BFFCB303BF9AB304C091B302C1B8B328C125B310C33CB363C608B4A9C4"
|
||||
+ $"B4B3E8C797B58CCA04B837C8F5B6C5CAEBB971CC01BC4DCB99BAD5CC2DBCEDCC"
|
||||
+ $"61BE36CC50BD90CB59BE35C94BBE36CA52BE36C909BC7EC72AB987C847BADBC5"
|
||||
+ $"C4B7D9C1A3B63FC3C8B6AAC133B627C050B613C0C1B61DBF73B607BDBBB644BE"
|
||||
+ $"94B616BBF4B6A3B8FEB8CBBA4AB786B7E2B9DEB68DBCADB708BB35B57EBCAEB3"
|
||||
+ $"5EBCADB46EBCAEB3DDBAA5B647B733B4E1B8C0B752B60D0212C94BC143C911C2"
|
||||
+ $"BECA52C143CC61C143CB59C143CC26C349CA40C6EBCB67C53EC8B9C929C3E3CB"
|
||||
+ $"C6C675CAE5C2DCCC22C0B4CC6FC1C9CC58C04CCC77BF7DCC75BFE5CC75BF25CC"
|
||||
+ $"76BE75CC68BECDCC72BD19CC44BA83CB5ABBC2CBEAB8F7CAA7B667C866B78FC9"
|
||||
+ $"A5B4F1C6D3B35FC2CBB3E1C4E1B46EC2CBB68EC2CBB57EC2CBB6B7C34FB730C4"
|
||||
+ $"47B6F0C3CDB7A1C51CB8DBC68BB831C5E0BA15C7C9BD58C91FBBA6C8B1BDF0C9"
|
||||
+ $"46BF29C968BE8CC95DC002C974C1B0C939C0DBC963C2FBC8F5C54CC7A9C437C8"
|
||||
+ $"6CC62FC709C799C562C6F7C644C879C42B0606FF0320C96220C962B3F2C960B5"
|
||||
+ $"D6C961B4E4C962B5EBC961B615C963B600C960B618C978B617C9A3B618C98EB6"
|
||||
+ $"17CA95B617CC79B618CB87B617CC792006067F0FC963C963C95EC9A3C9A3C95F"
|
||||
+ $"CA22C961C9E3C963CAEAC962CC79C962CBB2C961CC79C962CC79C962CC79C962"
|
||||
+ $"CC79C960CBB2C961CA22C962CAEAC963C9E3021220BCAE20BCAEB31FBCAEB35E"
|
||||
+ $"BCADB33FBCAEB46EBCAEB68DBCADB57EBCAEB767BCB0B91CBCAFB842BCACB91D"
|
||||
+ $"BD27B91CBE18B91CBDA0B91CBE22B91FBE35B91DBE2CBE83BE36C94BBE36C3E7"
|
||||
+ $"BE35CA52BE36CC61BE36CB59BE35CC69BE36CC79BE37CC71BE36CC79BE37CC79"
|
||||
+ $"C142CC79C142CC71C142CC61C143CC69C143CB59C143C94BC143CA52C143C3E7"
|
||||
+ $"C143B91FC143BE83C143B91DC14DB91CC160B91CC157B91CC1D9B91CC2CAB91D"
|
||||
+ $"C251B842C2CDB68EC2CBB768C2C9B57EC2CBB35FC2CBB46EC2CBB33FC2CA20C2"
|
||||
+ $"CBB31FC2CA20C2CB070A000100023F9FE80000000000003F9FE8430000430000"
|
||||
+ $"0A000101023F9FE80000000000003F9FE84300004300000A000102023F9FE800"
|
||||
+ $"00000000003F9FE84300004300000A000103023F9FE80000000000003F9FE843"
|
||||
+ $"00004300000A000104023F9FE80000000000003F9FE84300004300000A000105"
|
||||
+ $"023F9FE80000000000003F9FE84300004300000A010106023F9FE80000000000"
|
||||
+ $"003F9FE8430000430000"
|
||||
+};
|
||||
--
|
||||
2.2.2
|
||||
|
||||
Reference in New Issue
Block a user