Re: html and postscript viewer

2016-03-30 Thread Ryan Schmidt
On Mar 30, 2016, at 21:17, Mark Brethen wrote:
> 
> I suppose these launch scripts will need to be installed in ${prefix}/bin.

No need for custom scripts. Set PSVIEWER to "open" (part of OS X) and BROWSER 
to "openbrowser" (and add a dependency on my openbrowser port). 
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Mark Brethen
I suppose these launch scripts will need to be installed in ${prefix}/bin.

> On Mar 30, 2016, at 8:59 PM, Brandon Allbery  wrote:
> 
> On Wed, Mar 30, 2016 at 9:45 PM, Mark Brethen  > wrote:
> According to the documentation these parameters are actually the names of 
> shell scripts that CGX runs to open the viewers. For example, the instruction 
> for the html viewer are as follows:
> 
> This is because Linux's story for handling this stuff sucks. xdg-open is 
> *still* unreliable, and apparently always will be.
> OS X can, and should, do better.
> 
> -- 
> brandon s allbery kf8nh   sine nomine associates
> allber...@gmail.com   
> ballb...@sinenomine.net 
> unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net 
> 
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Brandon Allbery
On Wed, Mar 30, 2016 at 9:45 PM, Mark Brethen 
wrote:

> According to the documentation these parameters are actually the names of
> shell scripts that CGX runs to open the viewers. For example, the
> instruction for the html viewer are as follows:


This is because Linux's story for handling this stuff sucks. xdg-open is
*still* unreliable, and apparently always will be.
OS X can, and should, do better.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Kevin Walzer

On 3/30/16 9:28 PM, Ryan Schmidt wrote:

/usr/bin/open is not necessarily suitable. For example, I have configure my 
system so that if I `open` a .html file, it opens into my text editor, because 
I frequently edit html files. However, if another program is trying to open a 
web page, then I want that web page to open in my web browser, not my text 
editor.



You are technically correct, but I suspect your use case is going to be 
applicable only for a small group of users who are also developers.


/usr/bin/open is the command-line interface to the LaunchServices API, 
which is supposed to handle all this. I am not aware of any clean way to 
query Safari's preferences to determine the default browser without 
groveling through plist files, or perhaps AppleScript.


(Looking on the web, I see your openbrowser script does exactly 
that--grinds through plist files via Perl--but that introduces an 
additional dependency. I'd suggest that using a system-bundled tool is 
almost always better. It's certainly simpler.)


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Mark Brethen
According to the documentation these parameters are actually the names of shell 
scripts that CGX runs to open the viewers. For example, the instruction for the 
html viewer are as follows:

Create the shell script, respectively a file with filename “firefox“ (or any 
other file- name) in a directory of your choice: “dir_your_choice“ (for example 
your HOME: /Users/LOGNAME) by using an editor of your choice. Next, insert the 
following two

lines in file: “firefox“, then safe and quit the file: 

#!/bin/bash
open -a Firefox $1

The above shell script “firefox” enables to launch Firefox from a Terminal 
window with command: $ firefox  . In the second line of the 
above script: "open" opens application (-a) Firefox, input is passed via “$1”.



> On Mar 30, 2016, at 8:14 PM, Ryan Schmidt  wrote:
> 
> 
> On Mar 30, 2016, at 8:11 PM, Mark Brethen wrote:
> 
>> Culculix CGX is setting a default html (firefox) and postscript (gv) viewer. 
>> For mac users, they recommend changing ‘gv’ to ‘preview’ but give no 
>> recommendation for a browser. I thought I’d ask here whether to keep it 
>> firefox or change it to something else? Safari?
> 
> OS X lets the user specify their preferred browser. This setting can be 
> changed in Safari's preferences window. You should respect that preference.
> 
> How does Culculix CGX invoke the web browser? If it does so by running a 
> command (such as "firefox" on other platforms), then you can use my 
> openbrowser port and the openbrowser command it provides to accomplish that.
> 
> If they run a command to invoke a the PostScript viewer, then you would 
> probably use "open -a Preview.app" to open Preview.
> 

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Ryan Schmidt

> On Mar 30, 2016, at 8:36 PM, Kevin Walzer  wrote:
> 
> On 3/30/16 9:28 PM, Ryan Schmidt wrote:
>> /usr/bin/open is not necessarily suitable. For example, I have configure my 
>> system so that if I `open` a .html file, it opens into my text editor, 
>> because I frequently edit html files. However, if another program is trying 
>> to open a web page, then I want that web page to open in my web browser, not 
>> my text editor.
>> 
> 
> You are technically correct, but I suspect your use case is going to be 
> applicable only for a small group of users who are also developers.
> 

It applies to any user who has changed the file association for .html files. 
There's no reason to inconvenience that subset of users when a solution exists.


> /usr/bin/open is the command-line interface to the LaunchServices API, which 
> is supposed to handle all this. I am not aware of any clean way to query 
> Safari's preferences to determine the default browser without groveling 
> through plist files, or perhaps AppleScript.
> 
> (Looking on the web, I see your openbrowser script does exactly that--grinds 
> through plist files via Perl--but that introduces an additional dependency. 
> I'd suggest that using a system-bundled tool is almost always better. It's 
> certainly simpler.)


___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Ryan Schmidt

On Mar 30, 2016, at 8:21 PM, Kevin Walzer wrote:

> On 3/30/16 9:11 PM, Mark Brethen wrote:
>> Culculix CGX is setting a default html (firefox) and postscript (gv) viewer. 
>> For mac users, they recommend changing ‘gv’ to ‘preview’ but give no 
>> recommendation for a browser. I thought I’d ask here whether to keep it 
>> firefox or change it to something else? Safari?
> 
> /usr/bin/open will launch the user-defined default browser and image viewer 
> for the system, with no further configuration on the developer's part 
> required.

/usr/bin/open is not necessarily suitable. For example, I have configure my 
system so that if I `open` a .html file, it opens into my text editor, because 
I frequently edit html files. However, if another program is trying to open a 
web page, then I want that web page to open in my web browser, not my text 
editor.

My openbrowser program solves this problem by opening the given file in the 
system configured web browser, not the program associated with .html files.

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Mark Brethen

> On Mar 30, 2016, at 8:24 PM, Mark Brethen  wrote:
> 
> I’ll use /opt/local/share/doc/${name} for the default location.

to be more correct, $(prefix}/share/doc/${name} ___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Mark Brethen
A header file specifies these parameters:


/* html browser, change if necessary */
/* postscript viewer, change if necessary */
#ifdef MTU
  #define BROWSER {"firefox"}
  #define PSVIEWER {"gv"}
#else
/* #define BROWSER {"netscape"} */
/*   #define BROWSER {"mozilla"} */
  #define BROWSER {"firefox"}
/* #define PSVIEWER {"ghostview"} */
  #define PSVIEWER {"gv”}
#endif


And also the location of the help files:

/* default location of the help files, please insert the actual one */
#ifdef MTU
  #ifdef DEVEL
#define HELPFILE{"/yaprod/yae55/Linux_x86_64/bin/cgx_doc/cgx.h$
 "/yaprod/yae55/Linux_x86_64/bin/ccx_doc/ccx.html"}
  #else
#define HELPFILE{"/yaprod/cae/application/CalculiX/doc/cgx_2.1$
 "/yaprod/cae/application/CalculiX/doc/ccx_2.10/cc$
  #endif
#elif defined AFLIB
  #define HELPFILE{"/usr/local/CalculiX/cgx_2.10/doc/cgx/cgx.html"$
"/usr/local/CalculiX/ccx_2.10/doc/ccx/ccx.html",\
"/usr/local/CalculiX/cgx_2.10/doc/aflib/aflib.pdf"}
#else
  #define HELPFILE{"/usr/local/CalculiX/cgx_2.10/doc/cgx/cgx.html"$
"/usr/local/CalculiX/ccx_2.10/doc/ccx/ccx.html"}
#endif

I’ll use /opt/local/share/doc/${name} for the default location.


> On Mar 30, 2016, at 8:14 PM, Ryan Schmidt  wrote:
> 
> 
> On Mar 30, 2016, at 8:11 PM, Mark Brethen wrote:
> 
>> Culculix CGX is setting a default html (firefox) and postscript (gv) viewer. 
>> For mac users, they recommend changing ‘gv’ to ‘preview’ but give no 
>> recommendation for a browser. I thought I’d ask here whether to keep it 
>> firefox or change it to something else? Safari?
> 
> OS X lets the user specify their preferred browser. This setting can be 
> changed in Safari's preferences window. You should respect that preference.
> 
> How does Culculix CGX invoke the web browser? If it does so by running a 
> command (such as "firefox" on other platforms), then you can use my 
> openbrowser port and the openbrowser command it provides to accomplish that.
> 
> If they run a command to invoke a the PostScript viewer, then you would 
> probably use "open -a Preview.app" to open Preview.
> 

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Kevin Walzer

On 3/30/16 9:11 PM, Mark Brethen wrote:

Culculix CGX is setting a default html (firefox) and postscript (gv) viewer. 
For mac users, they recommend changing ‘gv’ to ‘preview’ but give no 
recommendation for a browser. I thought I’d ask here whether to keep it firefox 
or change it to something else? Safari?
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev
/usr/bin/open will launch the user-defined default browser and image 
viewer for the system, with no further configuration on the developer's 
part required.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: multiple distfiles from multiple sources and with multiple compression types

2016-03-30 Thread Ryan Schmidt

On Mar 30, 2016, at 3:06 PM, Mojca Miklavec wrote:

> On 30 March 2016 at 19:25, René J. V. wrote:
>> 
>>> It is fairly obvious how to extract these files. There is usually no
>>> need to specify how these files should be extracted, since most
>>> compression methods can be deduced from the filename.
>>> 
>>> The command 'use_* yes' would then only set the extract.suffix
>>> accordingly, instead of the explicit extract.cmd. These two options
>>> would then be equivalent:
>>> 
>>> use_xz yes
>>> extract.suffix .tar.xz
>> 
>> Still, how would that be implemented in "base", except by an algorithm that
>> determines how to extract each file (that is to be handled in the extract 
>> phase)
>> based on the filename or (better) from a magic cookie?
> 
> Those are the details. If a distfile has a standard extension, it's no
> problem figuring out how to extract it.

libmagic should be used to determine the compression format; filename extension 
should not be used.

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: html and postscript viewer

2016-03-30 Thread Ryan Schmidt

On Mar 30, 2016, at 8:11 PM, Mark Brethen wrote:

> Culculix CGX is setting a default html (firefox) and postscript (gv) viewer. 
> For mac users, they recommend changing ‘gv’ to ‘preview’ but give no 
> recommendation for a browser. I thought I’d ask here whether to keep it 
> firefox or change it to something else? Safari?

OS X lets the user specify their preferred browser. This setting can be changed 
in Safari's preferences window. You should respect that preference.

How does Culculix CGX invoke the web browser? If it does so by running a 
command (such as "firefox" on other platforms), then you can use my openbrowser 
port and the openbrowser command it provides to accomplish that.

If they run a command to invoke a the PostScript viewer, then you would 
probably use "open -a Preview.app" to open Preview.

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


html and postscript viewer

2016-03-30 Thread Mark Brethen
Culculix CGX is setting a default html (firefox) and postscript (gv) viewer. 
For mac users, they recommend changing ‘gv’ to ‘preview’ but give no 
recommendation for a browser. I thought I’d ask here whether to keep it firefox 
or change it to something else? Safari?
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [147186] trunk/dports/net/nmap/Portfile

2016-03-30 Thread Ryan Schmidt

> On Mar 30, 2016, at 10:10 AM, dl...@macports.org wrote:
> 
> Revision
> 147186
> Author
> dl...@macports.org
> Date
> 2016-03-30 08:10:35 -0700 (Wed, 30 Mar 2016)
> Log Message
> 
> nmap: add a way to build without subversion (fixes #37343), also switched 
> no_* variants to the correct (current) positive style
> Modified Paths
> 
>   • trunk/dports/net/nmap/Portfile

> @@ -32,20 +33,17 @@
>   sha256  
> 58cf8896d09057d1c3533f430c06b22791d0227ebbb93dede2ccb73693ed4b4b
>  
>  depends_lib  port:libpcap \
> - path:lib/libssl.dylib:openssl \
> - port:pcre \
>   port:zlib \
>   port:apr \
> - port:subversion
>  
>  use_bzip2yes
>  
>  configure.args   --without-zenmap --without-ndiff \
>   --mandir=\\\${prefix}/share/man \
>   --infodir=\\\${prefix}/share/info \
> - --with-openssl=${prefix} \
> - --with-libpcre=${prefix} \
> - --with-liblua=included
> + --with-liblua=included \
> + --without-subversion
> + 
>  
>  # nmap's configure script in nselib-bin does not respect 
> --with-liblua=included
>  # as with many ports, configure fails if nawk is installed, force use of 
> system awk
> @@ -54,16 +52,23 @@
>  use_parallel_build   no
>  configure.ccache no
>  
> -variant no_ssl   description {build without ssl support} {
> - configure.args-delete --with-openssl=${prefix}
> - depends_lib-delete path:lib/libssl.dylib:openssl
> +default_variants +ssl +pcre +subversion
> +
> +variant ssl description {build with ssl support} {
> + configure.args-append --with-openssl=${prefix}
> + depends_lib-append path:lib/libssl.dylib:openssl
>   }
>  
> -variant no_pcre  description {build without pcre support} {
> - configure.args-delete --with-pcre=${prefix}
> - depends_lib-delete port:pcre
> +variant pcre description {build with pcre support} {
> + configure.args-append --with-pcre=${prefix}
> + depends_lib-append port:pcre
>   }
>  
> +variant subversion description {build with subversion (nmap-update) support} 
> {
> + configure.args-delete --without-subversion
> + depends_lib-append port:subversion
> + }
> +

Switching from negative "no_" variants to positive variants is good, but when 
you do this, you should provide an upgrade path that preserves the user's 
choices. In this case, that means continuing for one year to provide a no_ssl 
variant (which does nothing, other than acting as a flag to indicate that you 
should not set "default_variants +ssl"), and similarly continuing to provide a 
no_pcre variant and not setting "default_variants +pcre" if that variant is 
chosen. For example:

# Can be removed after March 2017
variant no_ssl description {Legacy compatibility variant} {}
if {![variant_isset no_ssl]} {
default_variants +ssl
}
variant no_pcre description {Legacy compatibility variant} {}
if {![variant_isset no_pcre]} {
default_variants +pcre
}


___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Conflicting ports

2016-03-30 Thread Mark Brethen
The netgen file is newer and has the correct spelling “mp.second_order”, however I noticed that there are other differences between the netgen  file and calculix cgx. --- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_netgen/netgen/work/netgen-5.3.1/nglib/ng_vol.cpp	2014-08-29 04:54:00.0 -0500+++ /opt/local/var/macports/build/_Users_marbre_ports_math_calculix/calculix-cgx/work/CalculiX/cgx_2.10/netgen/ng_vol.cpp	2015-12-16 14:08:16.0 -0600@@ -1,5 +1,12 @@+/*+  original from  Joachim Schoeberl+  /netgen-4.9.13/nglib/ng_vol.cpp+  License: LGPL+*/ #include  #include +// added by wittig 2.dec 2013+#include   using namespace std; @@ -11,7 +18,9 @@ {   using namespace nglib; -  cout << "Netgen Testing" << endl;+  // changed by wittig 2.dec 2013+  //cout << "Netgen Testing" << endl;+  cout << "Netgen tet-mesher" << endl;    if (argc < 2)     {@@ -63,13 +72,17 @@   Ng_Meshing_Parameters mp;   mp.maxh = 1e6;   mp.fineness = 1;-  mp.second_order = 0;+  mp.secondorder = 0;+  // added by wittig 2.dec 2013+  if (argc == 3) mp.maxh = atof(argv[2]);    cout << "start meshing" << endl;   Ng_GenerateVolumeMesh (mesh, );   cout << "meshing done" << endl;    // volume mesh output+  // deactivated by wittig 2.dec 2013+  /*   np = Ng_GetNP(mesh);   cout << "Points: " << np << endl; @@ -87,6 +100,7 @@       cout << i << ": " << tet[0] << " " << tet[1]  	   << " " << tet[2] << " " << tet[3] << endl;     }+  */    Ng_SaveMesh(mesh,"test.vol"); 

ng_vol.cpp.diff
Description: Binary data
On Mar 30, 2016, at 12:24 AM, Ian Rees  wrote:From my reading of the cgx installation guide for cgx 2.9 (section 7.7.4 of the academic-looking PDF from dhondt.de), it seems that the version of netgen (5.3.1) built via MacPorts is already fixed.That said, I do have a pending change to the netgen port to add nglib ( https://trac.macports.org/ticket/50687 ), so perhaps we could combine any necessary changes to that ticket ;)    -Ian-On Wed, Mar 30, 2016 at 5:53 PM Joshua Root  wrote:On 2016-3-30 15:40 , Mark Brethen wrote:
> I’m working on a Calculix cgx port that uses a modified netgen for tet meshing. A modified file “ng_vol.cpp” (provided) is used to build Netgen. Since this would conflict with the Netgen port, how should this be implement as a helper app to cgx?

Can you install it in a different place than vanilla netgen?

- Josh
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Need help to write master_sites in the correct way

2016-03-30 Thread Abdulrahman Alshammari
Done. Thanks for your support, Mojca Miklavec
> On Mar 30, 2016, at 4:54 PM, Abdulrahman Alshammari  
> wrote:
> 
> I really appreciate your support. It is completely about my concern. Awesome 
> solutions.
> Thanks a lot
> 
>> On Mar 30, 2016, at 1:06 PM, Mojca Miklavec > > wrote:
>> 
>> 
>> On 30 March 2016 at 18:45, Abdulrahman Alshammari wrote:
>> > Hey,
>> >
>> > The software that I want to build a port for is getting updated 3-5 times 
>> > in
>> > a year. So, I need to build the portfile in a way that will be easy to
>> > update. So let me explain my issue.
>> >
>> > The homepage of the software is here:
>> > http://vsl.cis.udel.edu/civl/index.html 
>> > 
>> >
>> > For download, this is the list of software versions:
>> > http://vsl.cis.udel.edu/lib/sw/civl/ 
>> >
>> > For each version, there are sub-versions start with r, Like in the
>> > latest version I want to build a port for it:
>> > 1.6 ->> r2872 >> downloads >> we get this page:
>> >
>> > http://vsl.cis.udel.edu/lib/sw/civl/1.6/r2872/release/index.html 
>> > 
>> >
>> > Then, I need to download  the file CIVL-1.6_2872.tgz
>> >
>> > Any suggestion how can I handle this, so when I need to update the port, I
>> > just update a little bit in the portfile?
>> 
>> You have two options:
>> 
>> (1) either you specify "version 1.6_2872" and then automatically split it 
>> with some tcl tricks (I wrote the most dumb one, I'm sure there is a more 
>> elegant way to do it)
>> 
>> namecivl
>> version 1.6_2872
>> 
>> set version_major   [lindex [split ${version} _] 0]
>> set version_minor   [lindex [split ${version} _] 1]
>> 
>> extract.suffix  .tgz
>> distnameCIVL-${version}
>> 
>> master_sites
>> http://vsl.cis.udel.edu/lib/sw/${name}/${version_major}/r${version_minor}/release
>>  
>> 
>> 
>> checksums   rmd160  f9c755e26c7d3e2b4a5a29d4008c86551abda33b \
>> sha256  
>> b90db06b5f390b2888e0d3d9e25d68b77373a1e34ca20c73bfcef322708ff4c8
>> 
>> 
>> (2) or simply do the following:
>> 
>> namecivl
>> version 1.6
>> set rev 2872
>> 
>> extract.suffix  .tgz
>> distnameCIVL-${version}_${rev}
>> 
>> master_sites
>> http://vsl.cis.udel.edu/lib/sw/${name}/${version}/r${rev}/release 
>> 
>> 
>> checksums   rmd160  f9c755e26c7d3e2b4a5a29d4008c86551abda33b \
>> sha256  
>> b90db06b5f390b2888e0d3d9e25d68b77373a1e34ca20c73bfcef322708ff4c8
>> 
>> It dependes whether you want the revision to be part of the reported version 
>> or not. If the revision number is relevant and version 1.6 would be also 
>> released under different revisions (= subversions) after some time, you 
>> should probably use the first approach. If users only really care about 
>> "1.6", then you can increase the "revision" in Portfile by one when the next 
>> "sub-version" gets released.
>> 
>> Mojca
> 

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: multiple distfiles from multiple sources and with multiple compression types

2016-03-30 Thread Mojca Miklavec
On 30 March 2016 at 19:25, René J. V. wrote:
>
>> It is fairly obvious how to extract these files. There is usually no
>> need to specify how these files should be extracted, since most
>> compression methods can be deduced from the filename.
>>
>> The command 'use_* yes' would then only set the extract.suffix
>> accordingly, instead of the explicit extract.cmd. These two options
>> would then be equivalent:
>>
>> use_xz yes
>> extract.suffix .tar.xz
>
> Still, how would that be implemented in "base", except by an algorithm that
> determines how to extract each file (that is to be handled in the extract 
> phase)
> based on the filename or (better) from a magic cookie?

Those are the details. If a distfile has a standard extension, it's no
problem figuring out how to extract it.

I opened
https://trac.macports.org/ticket/50969

Mojca
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: multiple distfiles from multiple sources and with multiple compression types

2016-03-30 Thread René J . V . Bertin
Rainer Müller wrote:


> In case of multiple distfiles you will always specify the full name
> anyway. This would be that for an option such as this example:
> 
> distfilesfoo.tar.gz \
>  bar.tar.xz

Yes, *fetching* isn't the problem here.

> It is fairly obvious how to extract these files. There is usually no
> need to specify how these files should be extracted, since most
> compression methods can be deduced from the filename.
> 
> The command 'use_* yes' would then only set the extract.suffix
> accordingly, instead of the explicit extract.cmd. These two options
> would then be equivalent:
> 
> use_xz yes
> extract.suffix .tar.xz

Still, how would that be implemented in "base", except by an algorithm that 
determines how to extract each file (that is to be handled in the extract 
phase) 
based on the filename or (better) from a magic cookie?

R.

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: PortGroup directory hierarchy/priority

2016-03-30 Thread René J . V . Bertin
Rainer Müller wrote:

> 1. _resources/port1.0/group/*.tcl in ports tree of this port
> 2. _resources/port1.0/group/*.tcl in default ports tree

A "check in 1) and then in 2) if not found" even if 1) is inside a tree that 
doesn't override the default tree?

> The _resource directory is meant to contain files that are specific to
> this ports tree. This allows local modifications to port groups in a
> ports tree without influencing other ports trees.

The problem with that approach is that there are many PortGroups that apply to 
more than just a few ports.
I can see the occasional use case for limiting certain PortGroup customisations 
to a very specific set of (local) ports, but I'm seeing much more use for 
letting custom PortGroups behave like custom ports, i.e. override the default.
Right now, someone wanting to test my KF5 ports will have to replace at least 
the default Qt5 PortGroup, and remember to repeat that after each and every 
`port selfupdate`.

R

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Need help to write master_sites in the correct way

2016-03-30 Thread Mojca Miklavec
On 30 March 2016 at 18:45, Abdulrahman Alshammari wrote:
> Hey,
>
> The software that I want to build a port for is getting updated 3-5 times
in
> a year. So, I need to build the portfile in a way that will be easy to
> update. So let me explain my issue.
>
> The homepage of the software is here:
> http://vsl.cis.udel.edu/civl/index.html
>
> For download, this is the list of software versions:
> http://vsl.cis.udel.edu/lib/sw/civl/
>
> For each version, there are sub-versions start with r, Like in the
> latest version I want to build a port for it:
> 1.6 ->> r2872 >> downloads >> we get this page:
>
> http://vsl.cis.udel.edu/lib/sw/civl/1.6/r2872/release/index.html
>
> Then, I need to download  the file CIVL-1.6_2872.tgz
>
> Any suggestion how can I handle this, so when I need to update the port, I
> just update a little bit in the portfile?

You have two options:

(1) either you specify "version 1.6_2872" and then automatically split it
with some tcl tricks (I wrote the most dumb one, I'm sure there is a more
elegant way to do it)

namecivl
version 1.6_2872

set version_major   [lindex [split ${version} _] 0]
set version_minor   [lindex [split ${version} _] 1]

extract.suffix  .tgz
distnameCIVL-${version}

master_sites
http://vsl.cis.udel.edu/lib/sw/${name}/${version_major}/r${version_minor}/release

checksums   rmd160  f9c755e26c7d3e2b4a5a29d4008c86551abda33b \
sha256
 b90db06b5f390b2888e0d3d9e25d68b77373a1e34ca20c73bfcef322708ff4c8


(2) or simply do the following:

namecivl
version 1.6
set rev 2872

extract.suffix  .tgz
distnameCIVL-${version}_${rev}

master_sites
http://vsl.cis.udel.edu/lib/sw/${name}/${version}/r${rev}/release

checksums   rmd160  f9c755e26c7d3e2b4a5a29d4008c86551abda33b \
sha256
 b90db06b5f390b2888e0d3d9e25d68b77373a1e34ca20c73bfcef322708ff4c8

It dependes whether you want the revision to be part of the reported
version or not. If the revision number is relevant and version 1.6 would be
also released under different revisions (= subversions) after some time,
you should probably use the first approach. If users only really care about
"1.6", then you can increase the "revision" in Portfile by one when the
next "sub-version" gets released.

Mojca
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Need help to write master_sites in the correct way

2016-03-30 Thread Abdulrahman Alshammari
Hey,

The software that I want to build a port for is getting updated 3-5 times in a 
year. So, I need to build the portfile in a way that will be easy to update. So 
let me explain my issue.

The homepage of the software is here:
http://vsl.cis.udel.edu/civl/index.html 


For download, this is the list of software versions:
http://vsl.cis.udel.edu/lib/sw/civl/ 

For each version, there are sub-versions start with r, Like in the latest 
version I want to build a port for it:
1.6 ->> r2872 >> downloads >> we get this page:

http://vsl.cis.udel.edu/lib/sw/civl/1.6/r2872/release/index.html 


Then, I need to download  the file CIVL-1.6_2872.tgz 


Any suggestion how can I handle this, so when I need to update the port, I just 
update a little bit in the portfile?

thanks___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev