aboutsummaryrefslogtreecommitdiff
path: root/science
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-10-28 02:37:33 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-10-28 02:37:33 +0000
commit6334af43dcf3beda19eea90577f861fe8e9f336f (patch)
tree93ad2cacde8b50884bbac691610982393537e294 /science
parent80915426d9417e3c09ce06d692920f1ec15148b2 (diff)
downloadports-6334af43dcf3beda19eea90577f861fe8e9f336f.tar.gz
ports-6334af43dcf3beda19eea90577f861fe8e9f336f.zip
Notes
Diffstat (limited to 'science')
-rw-r--r--science/kalzium-kde4/Makefile6
-rw-r--r--science/kalzium-kde4/files/patch-src_calculator_gasCalculator.cpp56
-rw-r--r--science/kalzium-kde4/files/patch-src_calculator_gasCalculator.h11
-rw-r--r--science/kalzium-kde4/pkg-plist3
4 files changed, 71 insertions, 5 deletions
diff --git a/science/kalzium-kde4/Makefile b/science/kalzium-kde4/Makefile
index 6eb5f838b43f..8d2aa6582764 100644
--- a/science/kalzium-kde4/Makefile
+++ b/science/kalzium-kde4/Makefile
@@ -2,7 +2,7 @@
PORTNAME= kalzium
PORTVERSION= ${KDE4_VERSION}
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= science kde kde-kde4
MAINTAINER= kde@FreeBSD.org
@@ -17,7 +17,7 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/ocaml/facile/facile.a:math/facile \
${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
-USES= cmake:outsource eigen:3 kde:4 pkgconfig qt:4 tar:xz
+USES= cmake:outsource eigen:2 kde:4 pkgconfig qt:4 tar:xz
USE_KDE= kdelibs automoc4
USE_OCAML= yes
NO_OCAML_RUNDEPENDS= yes
@@ -25,4 +25,6 @@ USE_QT= corelib declarative designer opengl script xml \
moc_build qmake_build rcc_build uic_build
USE_LDCONFIG= yes
+CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Eigen3
+
.include <bsd.port.mk>
diff --git a/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.cpp b/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.cpp
new file mode 100644
index 000000000000..40838dde6e74
--- /dev/null
+++ b/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.cpp
@@ -0,0 +1,56 @@
+--- src/calculator/gasCalculator.cpp.orig 2018-10-24 05:36:48 UTC
++++ src/calculator/gasCalculator.cpp
+@@ -139,7 +139,7 @@ void gasCalculator::calculatePressure()
+ double temp = m_temp.convertTo( KUnitConversion::Kelvin ).number();
+ double b = m_Vand_b.convertTo( KUnitConversion::Liter ).number();
+
+- double pressure = m_moles * R * temp / (volume - m_moles * b) - m_moles * m_moles * m_Vand_a / volume / volume;
++ double pressure = m_moles * Rgas * temp / (volume - m_moles * b) - m_moles * m_moles * m_Vand_a / volume / volume;
+
+ m_pressure = Value(pressure, KUnitConversion::Atmosphere );
+ m_pressure = m_pressure.convertTo(getCurrentUnitId(ui.pressure_unit));
+@@ -154,7 +154,7 @@ void gasCalculator::calculateMolarMass()
+ double temp = m_temp.convertTo(KUnitConversion::Kelvin).number();
+ double b = m_Vand_b.convertTo(KUnitConversion::Liter).number();
+
+- m_molarMass = mass * R * temp / (pressure + m_moles * m_moles * m_Vand_a / volume / volume)\
++ m_molarMass = mass * Rgas * temp / (pressure + m_moles * m_moles * m_Vand_a / volume / volume)\
+ / (volume - m_moles * b);
+ ui.molarMass->setValue(m_molarMass);
+ }
+@@ -165,7 +165,7 @@ void gasCalculator::calculateVol()
+ double temp = m_temp.convertTo(KUnitConversion::Kelvin).number();
+ double b = m_Vand_b.convertTo(KUnitConversion::Liter).number();
+
+- double volume = m_moles * R * temp / pressure + (m_moles * b);
++ double volume = m_moles * Rgas * temp / pressure + (m_moles * b);
+ m_vol = Value(volume, KUnitConversion::Liter);
+ m_vol = m_vol.convertTo( getCurrentUnitId(ui.volume_unit) );
+ ui.volume->setValue(m_vol.number());
+@@ -178,7 +178,7 @@ void gasCalculator::calculateTemp()
+ double b = m_Vand_b.convertTo(KUnitConversion::Liter).number();
+
+ double temp = (pressure + (m_moles * m_moles * m_Vand_a / volume / volume))\
+- * (volume - m_moles * b) / m_moles / R;
++ * (volume - m_moles * b) / m_moles / Rgas;
+ m_temp = Value(temp, KUnitConversion::Kelvin);
+ m_temp = m_temp.convertTo( getCurrentUnitId( ui.temp_unit ) );
+ ui.temp->setValue(m_temp.number());
+@@ -192,7 +192,7 @@ void gasCalculator::calculateMoles()
+ double b = m_Vand_b.convertTo(KUnitConversion::Liter).number();
+
+ m_moles = (pressure + m_moles * m_moles * m_Vand_a / volume / volume)\
+- * (volume - m_moles * b) / R / temp;
++ * (volume - m_moles * b) / Rgas / temp;
+ ui.moles->setValue(m_moles);
+ }
+
+@@ -204,7 +204,7 @@ void gasCalculator::calculateMass()
+ double b = m_Vand_b.convertTo(KUnitConversion::Liter).number();
+
+ double mass = (pressure + m_moles * m_moles * m_Vand_a / volume / volume)\
+- * (volume - m_moles * b) * m_molarMass / R / temp;
++ * (volume - m_moles * b) * m_molarMass / Rgas / temp;
+ m_mass = Value(mass, KUnitConversion::Gram);
+ m_mass = m_mass.convertTo( getCurrentUnitId( ui.mass_unit ) );
+ ui.mass->setValue(m_mass.number());
diff --git a/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.h b/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.h
new file mode 100644
index 000000000000..cab444aa0b80
--- /dev/null
+++ b/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.h
@@ -0,0 +1,11 @@
+--- src/calculator/gasCalculator.h.orig 2018-10-24 05:31:16 UTC
++++ src/calculator/gasCalculator.h
+@@ -28,7 +28,7 @@
+ #include "ui_gasCalculator.h"
+
+ // The universal Gas constant is defined here.
+-#define R 0.08206
++#define Rgas 0.08206
+
+ using namespace KUnitConversion;
+
diff --git a/science/kalzium-kde4/pkg-plist b/science/kalzium-kde4/pkg-plist
index 7be753bc4556..dbd3b79e14a3 100644
--- a/science/kalzium-kde4/pkg-plist
+++ b/science/kalzium-kde4/pkg-plist
@@ -16,9 +16,6 @@ lib/kde4/nuclearCalculator.so
lib/kde4/plasma_applet_didyouknow.so
lib/kde4/plasma_applet_molmassCalculator.so
lib/kde4/plasma_engine_kalzium.so
-lib/libcompoundviewer.so
-lib/libcompoundviewer.so.4
-lib/libcompoundviewer.so.%%KDE4_GENERIC_LIB_VERSION%%
lib/libscience.so
lib/libscience.so.4
lib/libscience.so.%%KDE4_GENERIC_LIB_VERSION%%