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<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*), void*)", referenced from: _main in pdfgrep.o "poppler::document::load_from_file(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from: do_search_in_document(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > 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