Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Oct 2018 02:37:34 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r483212 - in head/science/kalzium-kde4: . files
Message-ID:  <201810280237.w9S2bYkj017138@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Sun Oct 28 02:37:33 2018
New Revision: 483212
URL: https://svnweb.freebsd.org/changeset/ports/483212

Log:
  science/kalzium-kde4: Fix build
  
  * Fix variable/macro name clash
  * Fix broken eigen:3 recognition by disablijng it
  
  PR:		232593

Added:
  head/science/kalzium-kde4/files/
  head/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.cpp   (contents, props changed)
  head/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.h   (contents, props changed)
Modified:
  head/science/kalzium-kde4/Makefile
  head/science/kalzium-kde4/pkg-plist

Modified: head/science/kalzium-kde4/Makefile
==============================================================================
--- head/science/kalzium-kde4/Makefile	Sun Oct 28 00:59:07 2018	(r483211)
+++ head/science/kalzium-kde4/Makefile	Sun Oct 28 02:37:33 2018	(r483212)
@@ -2,7 +2,7 @@
 
 PORTNAME=	kalzium
 PORTVERSION=	${KDE4_VERSION}
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	science kde kde-kde4
 
 MAINTAINER=	kde@FreeBSD.org
@@ -17,12 +17,14 @@ BUILD_DEPENDS=	${LOCALBASE}/lib/ocaml/facile/facile.a:
 		${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
 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>

Added: head/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.cpp	Sun Oct 28 02:37:33 2018	(r483212)
@@ -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());

Added: head/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/kalzium-kde4/files/patch-src_calculator_gasCalculator.h	Sun Oct 28 02:37:33 2018	(r483212)
@@ -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;
+ 

Modified: head/science/kalzium-kde4/pkg-plist
==============================================================================
--- head/science/kalzium-kde4/pkg-plist	Sun Oct 28 00:59:07 2018	(r483211)
+++ head/science/kalzium-kde4/pkg-plist	Sun Oct 28 02:37:33 2018	(r483212)
@@ -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%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810280237.w9S2bYkj017138>