Re: [143999] trunk/dports/textproc

2016-01-05 Thread Ryan Schmidt
On Jan 5, 2016, at 7:32 AM, Rainer Müller wrote:

> On 2016-01-04 07:45, Mojca Miklavec wrote:
>> I agree with Ryan here. But then again the port depends on poppler
>> which would probably be built with libstdc++ by default unless the
>> whole MacPorts is configured to use libc++. I'm not sure what strategy
>> could be used in these cases.
> 
> I would assume the whole installation uses libc++ if
> configure.cxx_stdlib is set to libc++.

Yes. The strategy that is meant to be used is: include the cxx11 1.0 portgroup. 
Doing so indicates that the software requires C++11. If the user's MacPorts 
installation uses libstdc++, the portgroup will prevent the port from being 
installed, and will direct the user to the LibcxxOnOlderSystems wiki page which 
will give the user instructions for either upgrading their OS or reinstalling 
all ports with libc++.


> Using that check in the cxx11 port group seems better. However, what
> would be a good way to point users to the pdfgrep-legacy port?
> 
> a) Extend the cxx11 port group to allow a custom message pointing to
>   pdfgrep-legacy.
> b) Drop the old version and users that want pdfgrep have to switch to
>   libc++.

That's a good question. I'm not sure.

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


Re: [143999] trunk/dports/textproc

2016-01-05 Thread Rainer Müller
On 2016-01-04 07:45, Mojca Miklavec wrote:
> I agree with Ryan here. But then again the port depends on poppler
> which would probably be built with libstdc++ by default unless the
> whole MacPorts is configured to use libc++. I'm not sure what strategy
> could be used in these cases.

I would assume the whole installation uses libc++ if
configure.cxx_stdlib is set to libc++.

Using that check in the cxx11 port group seems better. However, what
would be a good way to point users to the pdfgrep-legacy port?

a) Extend the cxx11 port group to allow a custom message pointing to
   pdfgrep-legacy.
b) Drop the old version and users that want pdfgrep have to switch to
   libc++.

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


Re: [143999] trunk/dports/textproc

2016-01-03 Thread Mojca Miklavec
On 3 January 2016 at 19:01, Ryan Schmidt wrote:
>> On Dec 29, 2015, at 12:49 PM, rai...@macports.org wrote:
>>
>> Revision
>> 143999
>> Author
>> rai...@macports.org
>> Date
>> 2015-12-29 10:49:23 -0800 (Tue, 29 Dec 2015)
>> Log Message
>>
>> textproc/pdfgrep, textproc/pdfgrep-legacy:
>> Add new pdfgrep-legacy port for old versions of OS X, closes #50076
>>
>> Modified Paths
>>
>>   • trunk/dports/textproc/pdfgrep/Portfile
>> Added Paths
>>
>>   • trunk/dports/textproc/pdfgrep-legacy/
>>   • trunk/dports/textproc/pdfgrep-legacy/Portfile
>> Diff
>>
>> Modified: trunk/dports/textproc/pdfgrep/Portfile (143998 => 143999)
>
>> +pre-fetch {
>> +if {${name} == ${subport} && ${os.platform} eq "darwin" && ${os.major} 
>> < 13} {
>> +ui_error "${name} only runs on Mac OS X 10.9 or greater as it 
>> requires features of C++11. Please install pdfgrep-legacy instead."
>> +return -code error "incompatible Mac OS X version"
>> +}
>> +}
>> +
>
> Can this check ${configure.cxx_stdlib} instead of ${os.major}? Or better yet, 
> can it just include the cxx11 1.0 portgroup and let it handle the details?

I agree with Ryan here. But then again the port depends on poppler
which would probably be built with libstdc++ by default unless the
whole MacPorts is configured to use libc++. I'm not sure what strategy
could be used in these cases.

I tried to build the port on a libstdc++-based system and the
compilation failed with the following error:

/opt/local/bin/clang++-mp-3.4  -pipe -Os -arch x86_64 -stdlib=libc++
-std=c++11  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch
x86_64 -o pdfgrep pdfgrep.o output.o exclude.o regengine.o
-L/opt/local/lib -lpoppler-cpp   -L/opt/local/lib -lpcre
Undefined symbols for architecture x86_64:
  "poppler::set_debug_error_function(void
(*)(std::__1::basic_string const&, void*), void*)", referenced from:
  _main in pdfgrep.o
  "poppler::document::load_from_file(std::__1::basic_string const&,
std::__1::basic_string const&, std::__1::basic_string const&)",
referenced from:
  do_search_in_document(std::__1::basic_string const&,
std::__1::basic_string const&, Regengine&, bool) in pdfgrep.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

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


Re: [143999] trunk/dports/textproc

2016-01-03 Thread Ryan Schmidt

> On Dec 29, 2015, at 12:49 PM, rai...@macports.org wrote:
> 
> Revision
> 143999
> Author
> rai...@macports.org
> Date
> 2015-12-29 10:49:23 -0800 (Tue, 29 Dec 2015)
> Log Message
> 
> textproc/pdfgrep, textproc/pdfgrep-legacy:
> Add new pdfgrep-legacy port for old versions of OS X, closes #50076
> 
> Modified Paths
> 
>   • trunk/dports/textproc/pdfgrep/Portfile
> Added Paths
> 
>   • trunk/dports/textproc/pdfgrep-legacy/
>   • trunk/dports/textproc/pdfgrep-legacy/Portfile
> Diff
> 
> Modified: trunk/dports/textproc/pdfgrep/Portfile (143998 => 143999)

> +pre-fetch {
> +if {${name} == ${subport} && ${os.platform} eq "darwin" && ${os.major} < 
> 13} {
> +ui_error "${name} only runs on Mac OS X 10.9 or greater as it 
> requires features of C++11. Please install pdfgrep-legacy instead."
> +return -code error "incompatible Mac OS X version"
> +}
> +}
> +

Can this check ${configure.cxx_stdlib} instead of ${os.major}? Or better yet, 
can it just include the cxx11 1.0 portgroup and let it handle the details?


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