Location of example files

2013-10-07 Thread Davide Liessi
Dear MacPorts developers,
I'm writing a Portfile for a Python module.
The distribution includes an example Python script that shows how to
use the module.
Where should I install it?
Is it OK to install it among the documentation files in the step
described in https://trac.macports.org/wiki/PortfileRecipes#doc?
Best wishes.
Davide Liessi
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Location of example files

2013-10-07 Thread Blair Zajac

On 10/07/2013 03:24 AM, Davide Liessi wrote:

Dear MacPorts developers,
I'm writing a Portfile for a Python module.
The distribution includes an example Python script that shows how to
use the module.
Where should I install it?
Is it OK to install it among the documentation files in the step
described in https://trac.macports.org/wiki/PortfileRecipes#doc?


Yes, $prefix/share/doc/$portname is the perfect place for it.

Blair

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


Re: Location of example files

2013-10-07 Thread Davide Liessi
Dear Blair,

2013/10/7 Blair Zajac bl...@orcaware.com:
 Yes, $prefix/share/doc/$portname is the perfect place for it.

thanks for the answer.

Should I install the script with executable permission (755)?

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


xinstall vs file copy/mkdir

2013-10-07 Thread Davide Liessi
Is there a preferred choice between xinstall and file Tcl extensions?
Which one should I use?

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


Re: Location of example files

2013-10-07 Thread Blair Zajac

On 10/7/13 5:14 AM, Davide Liessi wrote:

Dear Blair,

2013/10/7 Blair Zajacbl...@orcaware.com:

Yes, $prefix/share/doc/$portname is the perfect place for it.


thanks for the answer.

Should I install the script with executable permission (755)?


Yes, that's fine.  Make sure you patch the script to start with

#!$prefix/bin/

if it needs something from there, don't hard code /opt/local anywhere.

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


Re: Location of example files

2013-10-07 Thread Davide Liessi
Dear Blair,

2013/10/7 Blair Zajac bl...@orcaware.com:
 Yes, that's fine.  Make sure you patch the script to start with

 #!$prefix/bin/

 if it needs something from there, don't hard code /opt/local anywhere.

Just for information: I looked into the file, and there isn't a #!
line at the beginning.
Also, reading the usage info of that file I remembered that it is
meant to be used like this:
python demo.py example_file.pdf
so it doesn't need the executable permission.

Anyway, thanks for your help.
Best wishes.
Davide
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Location of example files

2013-10-07 Thread Ryan Schmidt

On Oct 7, 2013, at 07:02, Blair Zajac wrote:
 On 10/07/2013 03:24 AM, Davide Liessi wrote:
 Dear MacPorts developers,
 I'm writing a Portfile for a Python module.
 The distribution includes an example Python script that shows how to
 use the module.
 Where should I install it?
 Is it OK to install it among the documentation files in the step
 described in https://trac.macports.org/wiki/PortfileRecipes#doc?
 
 Yes, $prefix/share/doc/$portname is the perfect place for it.

Documentation goes in ${prefix}/share/doc/${subport}

Examples go in ${prefix}/share/examples/${subport}

See porthier(7)

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


Re: xinstall vs file copy/mkdir

2013-10-07 Thread Ryan Schmidt

On Oct 7, 2013, at 07:16, Davide Liessi davide.lie...@gmail.com wrote:

 Is there a preferred choice between xinstall and file Tcl extensions?
 Which one should I use?

For creating directories, they're pretty equivalent. If you need to specify 
ownership (which some ports like servers need) or permissions (which you almost 
never need for directories) xinstall is more convenient because it lets you do 
it all at once. Otherwise my rule of thumb is usually to use xinstall at 
destroot time and file mkdir otherwise.

For copying files, same rule of thumb. Also, file copy preserves modification 
times; xinstall touches the file so you get the current time. And xinstall 
has the convenient -W flag that lets you copy multiple files from a single 
directory without having to name that directory over and over.

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


Re: [MacPorts] #40508: unicode_path patch not working on subversion 1.8.3 release

2013-10-07 Thread Eric Gallager
You can use the `-d` flag to your port command to make sure. Although since
it didn't error out on you, I would assume that it worked...



On Mon, Oct 7, 2013 at 12:21 PM, MacPorts nore...@macports.org wrote:

 #40508: unicode_path patch not working on subversion 1.8.3 release
 +--
   Reporter:  genuinefafa@…  |  Owner:  dluke@…
   Type:  defect | Status:  assigned
   Priority:  Normal |  Milestone:
  Component:  ports  |Version:  2.2.0
 Resolution: |   Keywords:
   Port:  subversion |
 +--

 Comment (by genuinefafa@…):

  If i did everything right... The patch do not work (at least not on my
  Mac)

  {{{
  sh-3.2# cd ~
  sh-3.2# wget

 http://subversion.tigris.org/nonav/issues/showattachment.cgi/1291/svn_1.8.x_darwin_unicode_precomp.patch
  --2013-10-07 13:16:27--

 http://subversion.tigris.org/nonav/issues/showattachment.cgi/1291/svn_1.8.x_darwin_unicode_precomp.patch
  Resolving subversion.tigris.org...
  204.16.104.146
  Connecting to subversion.tigris.org|204.16.104.146|:80... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 4469 (4.4K) [text/plain]
  Saving to: `svn_1.8.x_darwin_unicode_precomp.patch'


  
 100%[===]
  4,469   19.5K/s   in 0.2s

  2013-10-07 13:16:28 (19.5 KB/s) - `svn_1.8.x_darwin_unicode_precomp.patch'
  saved [4469/4469]

  sh-3.2#
  sh-3.2# cd `port dir subversion`
  sh-3.2# mv ~/svn_1.8.x_darwin_unicode_precomp.patch files/patch-
  osx_unicode_precomp.diff
  sh-3.2# port build subversion +unicode_path
  ---  Computing dependencies for subversion
  ---  Fetching distfiles for subversion
  ---  Verifying checksums for subversion
  ---  Extracting subversion
  ---  Applying patches to subversion
  ---  Configuring subversion
  ---  Building subversion
  }}}

  Is there a way I can know if the patch was applied?

 --
 Ticket URL: https://trac.macports.org/ticket/40508#comment:11
 MacPorts http://www.macports.org/
 Ports system for OS X

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


Re: [111928] trunk/dports/devel/kmm_banking/Portfile

2013-10-07 Thread MK-MacPorts
Thanks, Ryan.

I missed that.

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


Re: Location of example files

2013-10-07 Thread Davide Liessi
2013/10/7 Ryan Schmidt ryandes...@macports.org:
 Documentation goes in ${prefix}/share/doc/${subport}

 Examples go in ${prefix}/share/examples/${subport}

 See porthier(7)

OK, I should have RTFM. :)

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