Re: How reconcile openmodelica-dvel & octave dependencies on sundials vs. sundials2

2018-06-20 Thread Adam Dershowitz
It took me a while to actually try this.  But, it does seem to work fine.  I 
would encourage someone to push this change to the port file.

Thanks for creating this diff.

--Adam



> On Jun 6, 2018, at 1:20 AM, Ken Cunningham  
> wrote:
> 
> Adam, Murray -- This small patch will patch the octave Portfile to make 
> sundials2 support a variant.
> If you want to install octave without sundials2 support (so you can use 
> openmodelica which needs sundials) this should allow you to do that.
> 
> The command is:
> 
> sudo port -v install octave -sundials2
> 
> I built octave locally without sundials2 support and it seems to build 
> cleanly.
> 
> I don't know how many people might want to install both octave and 
> openmodelica.
> If there are enough people, perhaps Marcus /Marius might add something like 
> this into the octave Portfile.
> 
> Best,
> 
> Ken
> 
> --- patch below ---
> 
> --- Portfile  2018-06-02 16:18:27.0 -0700
> +++ Portfile  2018-06-05 22:14:12.0 -0700
> @@ -295,6 +295,11 @@
> --without-magick\
> --disable-docs
> 
> +#default to no sundials support - see variant below
> +configure.args-append   \
> +--without-sundials_nvecserial \
> +--without-sundials_ida
> +
> # in configure.ac, listed as one of "[p]rograms used when running Octave"
> depends_lib-append port:python27
> configure.python ${prefix}/bin/python2.7
> @@ -365,10 +370,6 @@
> configure.args-append --without-openssl
> #depends_lib-append path:lib/libssl.dylib:openssl
> 
> -#--without-sundials_nvecserial
> -#--without-sundials_ida
> -depends_lib-append  port:sundials2
> -
> # see etc/README.MacOS
> depends_run-append   \
> port:epstool \
> @@ -399,6 +400,13 @@
> #https://trac.macports.org/ticket/51480
> #default_variants-append +java
> 
> +variant sundials2 description {build with sundials2 support - not compatible 
> with sundials} {
> +depends_lib-append  port:sundials2
> +configure.args-delete --without-sundials_nvecserial
> +configure.args-delete --without-sundials_ida
> +}
> +default_variants-append +sundials2
> +
> variant qt4 conflicts qt5 description {build the GUI using Qt4} {
> PortGroup qt4 1.0
> depends_lib-append port:qscintilla-qt4
> 



Re: How reconcile openmodelica-dvel & octave dependencies on sundials vs. sundials2

2018-06-05 Thread Ken Cunningham
Adam, Murray -- This small patch will patch the octave Portfile to make 
sundials2 support a variant.
If you want to install octave without sundials2 support (so you can use 
openmodelica which needs sundials) this should allow you to do that.

The command is:

sudo port -v install octave -sundials2

I built octave locally without sundials2 support and it seems to build cleanly.

I don't know how many people might want to install both octave and openmodelica.
If there are enough people, perhaps Marcus /Marius might add something like 
this into the octave Portfile.

Best,

Ken

--- patch below ---

--- Portfile2018-06-02 16:18:27.0 -0700
+++ Portfile2018-06-05 22:14:12.0 -0700
@@ -295,6 +295,11 @@
 --without-magick\
 --disable-docs
 
+#default to no sundials support - see variant below
+configure.args-append   \
+--without-sundials_nvecserial \
+--without-sundials_ida
+
 # in configure.ac, listed as one of "[p]rograms used when running Octave"
 depends_lib-append port:python27
 configure.python ${prefix}/bin/python2.7
@@ -365,10 +370,6 @@
 configure.args-append --without-openssl
 #depends_lib-append path:lib/libssl.dylib:openssl
 
-#--without-sundials_nvecserial
-#--without-sundials_ida
-depends_lib-append  port:sundials2
-
 # see etc/README.MacOS
 depends_run-append   \
 port:epstool \
@@ -399,6 +400,13 @@
 #https://trac.macports.org/ticket/51480
 #default_variants-append +java
 
+variant sundials2 description {build with sundials2 support - not compatible 
with sundials} {
+depends_lib-append  port:sundials2
+configure.args-delete --without-sundials_nvecserial
+configure.args-delete --without-sundials_ida
+}
+default_variants-append +sundials2
+
 variant qt4 conflicts qt5 description {build the GUI using Qt4} {
 PortGroup qt4 1.0
 depends_lib-append port:qscintilla-qt4



Re: How reconcile openmodelica-dvel & octave dependencies on sundials vs. sundials2

2018-06-04 Thread Ken Cunningham

On 2018-06-04, at 8:22 AM, Adam Dershowitz wrote:

>>> The odd thing is that octave 4.2.2 was working fine with sundials (which is 
>>> version 3.1.0_1)

This doesn't seem too likely, unless Octave was ignoring sundials.

Why don't you try deleting the sundials dependency in the Octave portfile and 
see what happens then? We only added the sundials dep fairly recently I believe.

here's the important bit in the Portfile

#--without-sundials_nvecserial
#--without-sundials_ida
depends_lib-append  port:sundials2


so looks like you would delete this line:

depends_lib-append  port:sundials2

and add these two to the configure args.

--without-sundials_nvecserial
--without-sundials_ida


might not be too hard if you can live without sundials




Ken

Re: How reconcile openmodelica-dvel & octave dependencies on sundials vs. sundials2

2018-06-04 Thread Adam Dershowitz
It looks like sundials (v3.) won’t work with Octave 4.4, only sundials2 (2.7):

http://octave.1599824.n4.nabble.com/sundials-3-td4687354.html 

https://savannah.gnu.org/bugs/?52475 


--Adam



> On Jun 4, 2018, at 11:15 AM, Ken Cunningham  
> wrote:
> 
> Welcome to our world!
> 
> How to fix this?...
> 
> you could try using sundials in octave (change the dependency in the 
> Portfile). Maybe sundials2 was just an oversight. If that works, come up with 
> a variant.
> 
> you could disable sundials in octave if you don't want or need it (again, 
> maybe a variant).
> 
> 
> ... 
> 
> 
> On 2018-06-04, at 5:49 AM, Adam Dershowitz wrote:
> 
>> I’m in the same situation (I have openmodelica-devel installed and want to 
>> upgrade octave).  The odd thing is that octave 4.2.2 was working fine with 
>> sundials (which is version 3.1.0_1).  But, the upgrade of octave to 4.4 
>> requires the sundials2 port (2.7.0).  So, somehow it seems that upgrading 
>> octaves requires downgrading sundials.  But, that is not compatible with 
>> openmodelica).  
>> 
>> 
>> --Adam
>> 
>> 
>> 
>>> On Jun 3, 2018, at 10:17 PM, Ken Cunningham 
>>> mailto:ken.cunningham.web...@gmail.com>> 
>>> wrote:
>>> 
>>> The two sundials ports don't have exactly identical file names, but there 
>>> is too much overlap to try a simple naming trick for installing them both 
>>> it appears.
>>> 
>>> If one of the ports you want to install has a bundled copy of sundials that 
>>> you can statically link in, you might get away with that as a quick one-off 
>>> solution. Not a great general solution, but it is done.
>>> 
>>> 
>>> More commonly, you would have to come up with a scheme to install them in 
>>> non-conflicting locations where they can coexist without crashing into each 
>>> other, and then direct the ports that need them to the location.
>>> 
>>> e.g.
>>> 
>>> /opt/local/libexec/sundials/*
>>> /opt/local/libexec/sundials2*
>>> 
>>> or sometimes this pattern is chosen
>>> 
>>> /opt/local/include/sundials/*
>>> /opt/local/include/sundials2/*
>>> /opt/local/lib/sundials/*
>>> /opt/local/lib/sundials2/*
>>> 
>>> 
>>> Sometimes, if one version is far more favoured than the other, the favoured 
>>> version gets the default install location, and the less commonly used one 
>>> gets an alternate location. This can be easier as most ports don't need to 
>>> be modified, but also can generate hassles if the wrong library or header 
>>> collection is found.
>>> 
>>> 
>>> And then, each and every port that uses sundials* needs to be checked 
>>> and/or modified to make sure they find and use the correct versions of the 
>>> headers and libraries.
>>> 
>>> A fair bit of work, to be sure...usually takes a dedicated dev who needs 
>>> them both to work to dive in on this kind of project.
>>> 
>>> Updating ports to all use the latest version of the library is often a 
>>> simpler and better solution, eg the recent ffmpeg project...
>>> 
>>> Ken
>>> 
>>> 
>>> On 2018-06-03, at 2:51 PM, Murray Eisenberg wrote:
>>> 
 The current octave 
 (@4.4.0_2+accelerate+app+docs+gfortran+graphicsmagick+qt5+sound) epends on 
 sundials2.
 openmodelica-dvel depends on sundials. And sundials cannot be installed 
 because it conflicts with sundials2.
 
 Any way to resolve this?
 
 
 ---
 Murray Eisenberg   murrayeisenb...@gmail.com 
 
 503 King Farm Blvd #101Home (240)-246-7240
 Rockville, MD 20850-6667   Mobile (413)-427-5334
 
 
>>> 
>> 
> 



Re: How reconcile openmodelica-dvel & octave dependencies on sundials vs. sundials2

2018-06-04 Thread Ken Cunningham
Welcome to our world!

How to fix this?...

you could try using sundials in octave (change the dependency in the Portfile). 
Maybe sundials2 was just an oversight. If that works, come up with a variant.

you could disable sundials in octave if you don't want or need it (again, maybe 
a variant).


... 


On 2018-06-04, at 5:49 AM, Adam Dershowitz wrote:

> I’m in the same situation (I have openmodelica-devel installed and want to 
> upgrade octave).  The odd thing is that octave 4.2.2 was working fine with 
> sundials (which is version 3.1.0_1).  But, the upgrade of octave to 4.4 
> requires the sundials2 port (2.7.0).  So, somehow it seems that upgrading 
> octaves requires downgrading sundials.  But, that is not compatible with 
> openmodelica).  
> 
> 
> --Adam
> 
> 
> 
>> On Jun 3, 2018, at 10:17 PM, Ken Cunningham 
>>  wrote:
>> 
>> The two sundials ports don't have exactly identical file names, but there is 
>> too much overlap to try a simple naming trick for installing them both it 
>> appears.
>> 
>> If one of the ports you want to install has a bundled copy of sundials that 
>> you can statically link in, you might get away with that as a quick one-off 
>> solution. Not a great general solution, but it is done.
>> 
>> 
>> More commonly, you would have to come up with a scheme to install them in 
>> non-conflicting locations where they can coexist without crashing into each 
>> other, and then direct the ports that need them to the location.
>> 
>> e.g.
>> 
>> /opt/local/libexec/sundials/*
>> /opt/local/libexec/sundials2*
>> 
>> or sometimes this pattern is chosen
>> 
>> /opt/local/include/sundials/*
>> /opt/local/include/sundials2/*
>> /opt/local/lib/sundials/*
>> /opt/local/lib/sundials2/*
>> 
>> 
>> Sometimes, if one version is far more favoured than the other, the favoured 
>> version gets the default install location, and the less commonly used one 
>> gets an alternate location. This can be easier as most ports don't need to 
>> be modified, but also can generate hassles if the wrong library or header 
>> collection is found.
>> 
>> 
>> And then, each and every port that uses sundials* needs to be checked and/or 
>> modified to make sure they find and use the correct versions of the headers 
>> and libraries.
>> 
>> A fair bit of work, to be sure...usually takes a dedicated dev who needs 
>> them both to work to dive in on this kind of project.
>> 
>> Updating ports to all use the latest version of the library is often a 
>> simpler and better solution, eg the recent ffmpeg project...
>> 
>> Ken
>> 
>> 
>> On 2018-06-03, at 2:51 PM, Murray Eisenberg wrote:
>> 
>>> The current octave 
>>> (@4.4.0_2+accelerate+app+docs+gfortran+graphicsmagick+qt5+sound) epends on 
>>> sundials2.
>>> openmodelica-dvel depends on sundials. And sundials cannot be installed 
>>> because it conflicts with sundials2.
>>> 
>>> Any way to resolve this?
>>> 
>>> 
>>> ---
>>> Murray Eisenbergmurrayeisenb...@gmail.com
>>> 503 King Farm Blvd #101 Home (240)-246-7240
>>> Rockville, MD 20850-6667Mobile (413)-427-5334
>>> 
>>> 
>> 
> 



Re: How reconcile openmodelica-dvel & octave dependencies on sundials vs. sundials2

2018-06-04 Thread Adam Dershowitz
I’m in the same situation (I have openmodelica-devel installed and want to 
upgrade octave).  The odd thing is that octave 4.2.2 was working fine with 
sundials (which is version 3.1.0_1).  But, the upgrade of octave to 4.4 
requires the sundials2 port (2.7.0).  So, somehow it seems that upgrading 
octaves requires downgrading sundials.  But, that is not compatible with 
openmodelica).  


--Adam



> On Jun 3, 2018, at 10:17 PM, Ken Cunningham  
> wrote:
> 
> The two sundials ports don't have exactly identical file names, but there is 
> too much overlap to try a simple naming trick for installing them both it 
> appears.
> 
> If one of the ports you want to install has a bundled copy of sundials that 
> you can statically link in, you might get away with that as a quick one-off 
> solution. Not a great general solution, but it is done.
> 
> 
> More commonly, you would have to come up with a scheme to install them in 
> non-conflicting locations where they can coexist without crashing into each 
> other, and then direct the ports that need them to the location.
> 
> e.g.
> 
> /opt/local/libexec/sundials/*
> /opt/local/libexec/sundials2*
> 
> or sometimes this pattern is chosen
> 
> /opt/local/include/sundials/*
> /opt/local/include/sundials2/*
> /opt/local/lib/sundials/*
> /opt/local/lib/sundials2/*
> 
> 
> Sometimes, if one version is far more favoured than the other, the favoured 
> version gets the default install location, and the less commonly used one 
> gets an alternate location. This can be easier as most ports don't need to be 
> modified, but also can generate hassles if the wrong library or header 
> collection is found.
> 
> 
> And then, each and every port that uses sundials* needs to be checked and/or 
> modified to make sure they find and use the correct versions of the headers 
> and libraries.
> 
> A fair bit of work, to be sure...usually takes a dedicated dev who needs them 
> both to work to dive in on this kind of project.
> 
> Updating ports to all use the latest version of the library is often a 
> simpler and better solution, eg the recent ffmpeg project...
> 
> Ken
> 
> 
> On 2018-06-03, at 2:51 PM, Murray Eisenberg wrote:
> 
>> The current octave 
>> (@4.4.0_2+accelerate+app+docs+gfortran+graphicsmagick+qt5+sound) epends on 
>> sundials2.
>> openmodelica-dvel depends on sundials. And sundials cannot be installed 
>> because it conflicts with sundials2.
>> 
>> Any way to resolve this?
>> 
>> 
>> ---
>> Murray Eisenberg murrayeisenb...@gmail.com 
>> 
>> 503 King Farm Blvd #101  Home (240)-246-7240
>> Rockville, MD 20850-6667 Mobile (413)-427-5334
>> 
>> 
> 



Re: How reconcile openmodelica-dvel & octave dependencies on sundials vs. sundials2

2018-06-03 Thread Ken Cunningham
The two sundials ports don't have exactly identical file names, but there is 
too much overlap to try a simple naming trick for installing them both it 
appears.

If one of the ports you want to install has a bundled copy of sundials that you 
can statically link in, you might get away with that as a quick one-off 
solution. Not a great general solution, but it is done.


More commonly, you would have to come up with a scheme to install them in 
non-conflicting locations where they can coexist without crashing into each 
other, and then direct the ports that need them to the location.

e.g.

/opt/local/libexec/sundials/*
/opt/local/libexec/sundials2*

or sometimes this pattern is chosen

/opt/local/include/sundials/*
/opt/local/include/sundials2/*
/opt/local/lib/sundials/*
/opt/local/lib/sundials2/*


Sometimes, if one version is far more favoured than the other, the favoured 
version gets the default install location, and the less commonly used one gets 
an alternate location. This can be easier as most ports don't need to be 
modified, but also can generate hassles if the wrong library or header 
collection is found.


And then, each and every port that uses sundials* needs to be checked and/or 
modified to make sure they find and use the correct versions of the headers and 
libraries.

A fair bit of work, to be sure...usually takes a dedicated dev who needs them 
both to work to dive in on this kind of project.

Updating ports to all use the latest version of the library is often a simpler 
and better solution, eg the recent ffmpeg project...

Ken


On 2018-06-03, at 2:51 PM, Murray Eisenberg wrote:

> The current octave 
> (@4.4.0_2+accelerate+app+docs+gfortran+graphicsmagick+qt5+sound) epends on 
> sundials2.
> openmodelica-dvel depends on sundials. And sundials cannot be installed 
> because it conflicts with sundials2.
> 
> Any way to resolve this?
> 
> 
> ---
> Murray Eisenberg  murrayeisenb...@gmail.com
> 503 King Farm Blvd #101   Home (240)-246-7240
> Rockville, MD 20850-6667  Mobile (413)-427-5334
> 
> 



How reconcile openmodelica-dvel & octave dependencies on sundials vs. sundials2

2018-06-03 Thread Murray Eisenberg
The current octave 
(@4.4.0_2+accelerate+app+docs+gfortran+graphicsmagick+qt5+sound) epends on 
sundials2.
openmodelica-dvel depends on sundials. And sundials cannot be installed because 
it conflicts with sundials2.

Any way to resolve this?


---
Murray Eisenbergmurrayeisenb...@gmail.com
503 King Farm Blvd #101 Home (240)-246-7240
Rockville, MD 20850-6667Mobile (413)-427-5334