Re: help needed to compile a C program

2018-04-13 Thread Ryan Schmidt

On Apr 13, 2018, at 14:26, macpo...@parvis.nl wrote:

> On 2018-04-13, at 20:17, Rainer Müller wrote:
> 
>> On 2018-04-13 18:21, macpo...@parvis.nl wrote:
>>> with makefile:
>>> ---
>>> pango-list-typefaces:   pango-list-typefaces.c
>>>cc -o $@ -Wall -g pango-list-typefaces.c \
>>>$(pkg-config --cflags --libs pango) \
>>>$(pkg-config --cflags --libs cairo) \
>>>$(pkg-config --cflags --libs pangocairo) \Currently 

Remove the word "Currently"

>>>$(pkg-config --cflags --libs glib-2.0)
>> 
>> The Makefile is your problem. $(foo) is a normal variable expansion.
>> This should be: $(shell pkg-config ...)
>> 
>> Rainer
> 
> my mistake: I changed `pkg-config ..` to $(..).
> but neither $(shell pkg-config nor `pkg-config helped. same error.
> question remains open.

pkg-config should be adding all the necessary flags. For example:

$ pkg-config --cflags --libs glib-2.0
-I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include 
-I/opt/local/include -L/opt/local/lib -lglib-2.0 -lintl -Wl,-framework 
-Wl,CoreFoundation



> any suggestions on my aother questions?
> 
> Currently I have glib2 installed, but there is also glib2-devel, and they 
> conflict with each other.
> Same for pango and pango-devel.
> - What is the difference?
> - Which should I use?

glib2 and pango are the latest stable versions. glib2-devel and pango-devel are 
the latest development versions. At this moment in time, they happen to provide 
the same versions.


> I don't know what the include path will be. 
> - How should I use 'port provides glib.h' ?

port provides takes absolute paths:

$ port provides /opt/local/include/glib-2.0/glib.h
/opt/local/include/glib-2.0/glib.h is provided by: glib2




Re: help needed to compile a C program

2018-04-13 Thread Rainer Müller
On 2018-04-13 21:26, macpo...@parvis.nl wrote:
> 
>> On 2018-04-13, at 20:17, Rainer Müller  wrote:
>>
>> On 2018-04-13 18:21, macpo...@parvis.nl wrote:
>>> with makefile:
>>> ---
>>> pango-list-typefaces:   pango-list-typefaces.c
>>> cc -o $@ -Wall -g pango-list-typefaces.c \
>>> $(pkg-config --cflags --libs pango) \
>>> $(pkg-config --cflags --libs cairo) \
>>> $(pkg-config --cflags --libs pangocairo) \Currently 
>>> $(pkg-config --cflags --libs glib-2.0)
>>
>> The Makefile is your problem. $(foo) is a normal variable expansion.
>> This should be: $(shell pkg-config ...)
>>
>> Rainer
> 
> my mistake: I changed `pkg-config ..` to $(..).
> but neither $(shell pkg-config nor `pkg-config helped. same error.
> question remains open.

Works for me. Use "Download ZIP" to the upper right here, extract and
run make in the directory:
https://gist.github.com/raimue/634213828f7ff86b9a6f4698ed488d85
> any suggestions on my aother questions?
> 
> Currently I have glib2 installed, but there is also glib2-devel, and they 
> conflict with each other.
> Same for pango and pango-devel.
> - What is the difference?
> - Which should I use?

*-devel ports are pre-releases, beta or unstable. You usually do not
want them unless you really need the bleeding edge.

> I don't know what the include path will be. 
> - How should I use 'port provides glib.h' ?

Use an absolute path:

$ port provides /opt/local/include/glib-2.0/glib.h
/opt/local/include/glib-2.0/glib.h is provided by: glib2

If instead you meant you do not know which ports provides a specific
file, there is unfortunately no index available for that.

Rainer


Re: help needed to compile a C program

2018-04-13 Thread macports

> On 2018-04-13, at 20:17, Rainer Müller  wrote:
> 
> On 2018-04-13 18:21, macpo...@parvis.nl wrote:
>> with makefile:
>> ---
>> pango-list-typefaces:   pango-list-typefaces.c
>> cc -o $@ -Wall -g pango-list-typefaces.c \
>> $(pkg-config --cflags --libs pango) \
>> $(pkg-config --cflags --libs cairo) \
>> $(pkg-config --cflags --libs pangocairo) \Currently 
>> $(pkg-config --cflags --libs glib-2.0)
> 
> The Makefile is your problem. $(foo) is a normal variable expansion.
> This should be: $(shell pkg-config ...)
> 
> Rainer

my mistake: I changed `pkg-config ..` to $(..).
but neither $(shell pkg-config nor `pkg-config helped. same error.
question remains open.

any suggestions on my aother questions?

Currently I have glib2 installed, but there is also glib2-devel, and they 
conflict with each other.
Same for pango and pango-devel.
- What is the difference?
- Which should I use?

I don't know what the include path will be. 
- How should I use 'port provides glib.h' ?

Re: help needed to compile a C program

2018-04-13 Thread Rainer Müller
On 2018-04-13 18:21, macpo...@parvis.nl wrote:
> with makefile:
> ---
> pango-list-typefaces:   pango-list-typefaces.c
>         cc -o $@ -Wall -g pango-list-typefaces.c \
>         $(pkg-config --cflags --libs pango) \
>         $(pkg-config --cflags --libs cairo) \
>         $(pkg-config --cflags --libs pangocairo) \Currently 
>         $(pkg-config --cflags --libs glib-2.0)

The Makefile is your problem. $(foo) is a normal variable expansion.
This should be: $(shell pkg-config ...)

Rainer


missing dejavusansmono in rrdtool pango cairo fontconfig

2018-04-13 Thread macports
port -dv install pango +quartz +x11

i see : pango: checking which cairo font backends could be used... quartz 
freetype --> NO fontconfig

in the Cairo port are several andbales and disables but nothing for fontconfig. 
could that be my problem?


help needed to compile a C program

2018-04-13 Thread macports
I'm trying to use DejaVu fonts in rrdtool and it fails; rrdtool depends on 
pango, and currently I think that pango is my bottleneck.
To verify this I found a tiny program 
(https://www.lemoda.net/pango/list-fonts/index.html 
) that fails to compile.

---
#include 
#include 

static void
list_fonts ()
{
int i;
PangoFontFamily ** families;
int n_families;
PangoFontMap * fontmap;

fontmap = pango_cairo_font_map_get_default();
pango_font_map_list_families (fontmap, & families, & n_families);
printf ("There are %d families\n", n_families);
for (i = 0; i < n_families; i++) {
PangoFontFamily * family = families[i];
const char * family_name;

family_name = pango_font_family_get_name (family);
printf ("Family %d: %s\n", i, family_name);
}
g_free (families);
}

int main (int argc, char ** argv)
{
list_fonts ();
return 0;
}
---

with makefile:
---
pango-list-typefaces:   pango-list-typefaces.c
cc -o $@ -Wall -g pango-list-typefaces.c \
$(pkg-config --cflags --libs pango) \
$(pkg-config --cflags --libs cairo) \
$(pkg-config --cflags --libs pangocairo) \Currently 
$(pkg-config --cflags --libs glib-2.0)
---

and error:
---
make pango-list-typefaces
cc pango-list-typefaces.c   -o pango-list-typefaces
pango-list-typefaces.c:1:10: fatal error: 'glib.h' file not found
#include "glib.h"
 ^
1 error generated.
---


- What does Macports do for includes/libraries/etc, or -if nothing- what should 
I do to use them from Macports?

Currently I have glib2 installed, but there is also glib2-devel, and they 
conflict with each other.
Same for pango and pango-devel.
- What is the difference?
- Which should I use?

I don't know what the include path will be. 
- How should I use 'port provides glib.h' ?





Re: Rsync and --protect-decmpf

2018-04-13 Thread dan d.
On Fri, 13 Apr 2018, Christopher Stone wrote:

>
> I'm looking at using rsync for a number of jobs, and figuring out how to use 
> it properly on a Mac to preserve file attributes and dates has
> been a bit of a chore.

Look at the rclone port on macports or homebrew.  It does what you want with a 
simple option flag.  In many ways it is a dressed up
rsync with bells and whistles.


Re: Online MacPorts Meeting on 21st April at 13:00 UTC - suggestion

2018-04-13 Thread Mojca Miklavec
On 11 April 2018 at 17:47, Perry E. Metzger  wrote:
> On Sun, 8 Apr 2018 19:42:24 +0200 Rainer Müller 
> wrote:
>> However, meetings on IRC are slow, as you have to wait for others to
>> type, you have no notifications whether others still have something
>> to say, etc.
>>
>> For such a scheduled meeting, I would prefer audio chat as that
>> would make the communication more direct and faster.
>
> Google Hangouts seems to work well for large groups. It also features
> video if people want that.
>
>> The other well-known option would of course be Skype. However, with
>> Skype one person would have to collect interested developers first
>> and then invite them to a group call. With Discord it seems like
>> you can just create a room that everyone can join, which would be a
>> lot simpler.
>
> Similarly, with Google Hangouts, someone can just send out a link for
> people to click on and join the chat. (They do need a Google ID I
> think, but most people seem to have one of those these days.)

If we find three volunteers (I volunteer, so only two more needed), we
could perhaps do a technology test run tomorrow at 13:00 UTC (that's
precisely 7 days earlier)
... (or at any other potentially more suitable hour depending on who
wants to participate).

We could then test:
- Hangouts
- Discord
- (potentially Skype, but it needs personal invitations etc.)
- any other video conferencing tool, in case there are better suggestions
and see which one fits best, but only if we get some proposal early enough.

We could have IRC as a backup for coordination in case of technical
problems etc.

Mojca


Re: Rsync and --protect-decmpfs

2018-04-13 Thread Rainer Müller
Please keep the discussion on the mailing list by using Reply All.

On 2018-04-13 13:10, Christopher Stone wrote:
> On 04/13/2018, at 05:33, Rainer Müller  > wrote:
>> I think you are talking about the hfs-compression.diff patch. We used
>> to apply this patch, but the commit [1] that removed it said that it
>> was marked as broken with rsync 3.1.3.
> 
> 
> Hey Rainer,
> 
> Yes.  Apologies – I intended to mention the patch name and forgot.
>  Chalk that up to my inexperience with them.
> 
>> If there is a newer compatible version of that patch around somewhere
>> we could use that.
> 
> The attached hfs-compression.diff file is distributed with rsync 3.1.3.
>  It supposedly compiles and passes the test suite.
> 
> https://download.samba.org/pub/rsync/

I do not know where the information that the hfs-compression.diff patch
is broken comes from. It is not mentioned in the pull request [1] either.

I added jabenninghoff to CC.

Rainer

[1] https://github.com/macports/macports-ports/pull/1299


Re: Rsync and --protect-decmpfs

2018-04-13 Thread Richard L. Hamilton
AFAIK, that option is specific to HFS+ with compression, preserving an 
associated extended attribute; but it preserves it even if the receiving end  
doesn't know what to do with it properly (whatever that is); so I'd want the 
destination system to be as new or newer, to be reasonably sure it could.  Not 
sure whether it's of any use with APFS.

> On Apr 13, 2018, at 05:05, Christopher Stone  
> wrote:
> 
> Hey Folks,
> 
> I'm looking at using rsync for a number of jobs, and figuring out how to use 
> it properly on a Mac to preserve file attributes and dates has been a bit of 
> a chore.
> 
> I finally talked to someone I know who wrote a utility around it and got some 
> good advice.
> 
> Base command:
> 
> rsync -aAHNvXx --fileflags --force-change --numeric-ids --protect-args 
> --progress --stats  
> 
> My friend's advice and a few places on the Net recommend using this switch on 
> the Mac:
> 
> --protect-decmpfs (patch by Mike Bombich of CCC fame)
> 
> MacPorts rsync version 3.1.3 protocol version 31 doesn't have this option 
> available.
> 
> How desirable is this option?
> 
> Is there a way to add the option when building rsync with MacPorts?
> 
> If so I would expect to see a variant, but I've mostly used default ports and 
> am uneducated about variants.
> 
> I have't fooled with `make` for quite a while (preferring to let MacPorts do 
> the dirty work for me), but I expect I can make from source if I have to.
> 
> TIA for any useful commentary.
> 
> --
> Best Regards,
> Chris
> 



signature.asc
Description: Message signed with OpenPGP


Re: Rsync and --protect-decmpfs

2018-04-13 Thread Rainer Müller
On 2018-04-13 11:05, Christopher Stone wrote:
> My friend's advice and a few places on the Net recommend using this switch on 
> the Mac:
> 
> --protect-decmpfs (patch by Mike Bombich of CCC fame)
> 
> MacPorts rsync version 3.1.3 protocol version 31 doesn't have this option 
> available.
> 
> How desirable is this option?
> 
> Is there a way to add the option when building rsync with MacPorts?
>
> If so I would expect to see a variant, but I've mostly used default ports and 
> am uneducated about variants.
> 
> I have't fooled with `make` for quite a while (preferring to let MacPorts do 
> the dirty work for me), but I expect I can make from source if I have to.

I think you are talking about the hfs-compression.diff patch. We used to
apply this patch, but the commit [1] that removed it said that it was
marked as broken with rsync 3.1.3.

If there is a newer compatible version of that patch around somewhere we
could use that.

Rainer

[1]
https://github.com/macports/macports-ports/commit/3b08efaebe3b7413093b981f2f4ad661d27cffac#diff-c915c59a1e788fdf85b0d74e8116b961R32


Rsync and --protect-decmpfs

2018-04-13 Thread Christopher Stone
Hey Folks,

I'm looking at using rsync for a number of jobs, and figuring out how to use it 
properly on a Mac to preserve file attributes and dates has been a bit of a 
chore.

I finally talked to someone I know who wrote a utility around it and got some 
good advice.

Base command:

rsync -aAHNvXx --fileflags --force-change --numeric-ids --protect-args 
--progress --stats  

My friend's advice and a few places on the Net recommend using this switch on 
the Mac:

--protect-decmpfs (patch by Mike Bombich of CCC fame)

MacPorts rsync version 3.1.3 protocol version 31 doesn't have this option 
available.

How desirable is this option?

Is there a way to add the option when building rsync with MacPorts?

If so I would expect to see a variant, but I've mostly used default ports and 
am uneducated about variants.

I have't fooled with `make` for quite a while (preferring to let MacPorts do 
the dirty work for me), but I expect I can make from source if I have to.

TIA for any useful commentary.

--
Best Regards,
Chris