Re: [KDE/Mac] compiling/installing

2014-07-29 Thread René J.V. Bertin
Hi,

I think I stumbled upon a more likely reason for the build issues evoked below. 
There's been a change in the cmake portgroup,
registry/portgroups/636464737c420ea283d4ad483ea35193d9da591588cba9f1d1d4e56d8ff6912e-6789/cmake-1.0.tcl
 vs. 
registry/portgroups/75f5e1bbba3b966f499792f00c2d7f4a1d35c65f00a5600ebfa600fa36b276cf-6911/cmake-1.0.tcl
 :

@@ -1,5 +1,5 @@
 # -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; 
tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
-# $Id: cmake-1.0.tcl 121112 2014-06-17 20:16:44Z mo...@macports.org $
+# $Id: cmake-1.0.tcl 119436 2014-04-25 13:10:38Z ni...@macports.org $
 #
 # Copyright (c) 2009 Orville Bennett illogical1 at gmail.com
 # Copyright (c) 2010-2013 The MacPorts Project
@@ -81,9 +81,12 @@
 # The environment variable CPPFLAGS is not considered by CMake.
 # (CMake upstream ticket #12928 CMake silently ignores CPPFLAGS
 # http://www.cmake.org/Bug/view.php?id=12928).
-#
-# But adding -I${prefix}/include to CFLAGS/CXXFLAGS is a bad idea.
-# If any other flags are needed, we need to add them.
+# Thus, we have to add them manually to the CFLAGS and CXXFLAGS in the
+# pre-configure phase.
+if {${configure.cppflags} ne } {
+configure.cflags-append ${configure.cppflags}
+configure.cxxflags-append ${configure.cppflags}
+}

 # In addition, CMake provides build-type-specific flags for
 # Release (-O3 -DNDEBUG), Debug (-g), MinSizeRel (-Os -DNDEBUG), and

This ought at least explain the failures to find headerfiles in 
/opt/local/include mentioned by b...@ithryn.net .

R.

On Jul 28, 2014, at 21:58, René J.V. Bertin wrote:

 On Jul 28, 2014, at 20:33, b...@ithryn.net wrote:
 
 The log file complains of a linking error, specifically it can't find 
 -lakonadi-calendar. This library does exist, however the link command does 
 not have -L/opt/local/lib so it cannot find the library. If i edit the link 
 command by hand, the link succeeds. However the renaming compile files as 
 the compiler can't find header files, since the include flags appear to be 
 incorrect, i.e. there is no -I/opt/local/include/.
 
 I've been noticing the same error, but have been able to circumvent it 
 fiddling with configure.compiler .
 
 Did you reinstall all KDE packages?
 
 NB: I seem to recall seeing a recent change to a FindKDE4 cmake file; if 
 correct, I wonder if that's related?!
 
 René

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


Re: [KDE/Mac] compiling/installing

2014-07-29 Thread Mojca Miklavec
On Tue, Jul 29, 2014 at 10:24 AM, René J.V. Bertin wrote:
 Hi,

 I think I stumbled upon a more likely reason for the build issues evoked 
 below. There's been a change in the cmake portgroup,
 registry/portgroups/636464737c420ea283d4ad483ea35193d9da591588cba9f1d1d4e56d8ff6912e-6789/cmake-1.0.tcl
  vs. 
 registry/portgroups/75f5e1bbba3b966f499792f00c2d7f4a1d35c65f00a5600ebfa600fa36b276cf-6911/cmake-1.0.tcl
  :

 @@ -1,5 +1,5 @@
  # -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; 
 tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
 -# $Id: cmake-1.0.tcl 121112 2014-06-17 20:16:44Z mo...@macports.org $
 +# $Id: cmake-1.0.tcl 119436 2014-04-25 13:10:38Z ni...@macports.org $
  #
  # Copyright (c) 2009 Orville Bennett illogical1 at gmail.com
  # Copyright (c) 2010-2013 The MacPorts Project
 @@ -81,9 +81,12 @@
  # The environment variable CPPFLAGS is not considered by CMake.
  # (CMake upstream ticket #12928 CMake silently ignores CPPFLAGS
  # http://www.cmake.org/Bug/view.php?id=12928).
 -#
 -# But adding -I${prefix}/include to CFLAGS/CXXFLAGS is a bad idea.
 -# If any other flags are needed, we need to add them.
 +# Thus, we have to add them manually to the CFLAGS and CXXFLAGS in the
 +# pre-configure phase.
 +if {${configure.cppflags} ne } {
 +configure.cflags-append ${configure.cppflags}
 +configure.cxxflags-append ${configure.cppflags}
 +}

  # In addition, CMake provides build-type-specific flags for
  # Release (-O3 -DNDEBUG), Debug (-g), MinSizeRel (-Os -DNDEBUG), and

 This ought at least explain the failures to find headerfiles in 
 /opt/local/include mentioned by b...@ithryn.net .

You reversed the direction of the commit
(http://trac.macports.org/changeset/121112), but adding
configure.cppflags is certainly not acceptable as it causes way too
many headaches.

Does it help if you add -DCMAKE_INCLUDE_PATH=${prefix}/include? (I'm
not 100% sure if that's the right variable.)

We were discussion replacing cppflags=-I${prefix}/include with a
variable with a list of include paths. Then CMake or any other build
system could convert that list into its own format.

For example
configure.includedirs-append ${prefix}/include/somelib
could end up as
-DCMAKE_INCLUDE_PATH=${prefix}/include/somelib...
in CMake and as something else in another system.

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


Re: [KDE/Mac] compiling/installing

2014-07-29 Thread Mojca Miklavec
On Tue, Jul 29, 2014 at 11:36 AM, René J.V. Bertin wrote:
 On Jul 29, 2014, at 10:51, Mojca Miklavec wrote:

 You reversed the direction of the commit
 Indeed ...

 (http://trac.macports.org/changeset/121112), but adding
 configure.cppflags is certainly not acceptable as it causes way too
 many headaches.

 Really? How long had it been there (i.e. the previous cmake-1.0.tcl version), 
 because I don't recall any issues that might have been caused by it.

The comment on the changeset includes a link to the ticket:
   - http://trac.macports.org/ticket/42872
But there are others:
   - http://trac.macports.org/ticket/41241
And the ticket alone lists 24 ports that added local patches to work
around the problem.

The problem probably affected *every single port* during an *upgrade*
from an icompatible API change.

 In fact, how can one get by NOT adding -I${prefix}/include and 
 -L${prefix}/lib, if prefix is not /usr or /usr/local ??

Mostly FindFoo.cmake. But ask the CMake developers. Usually the better
question would be how to *remove* /opt/local, /sw and other prefixes
when you have your ports installed under some nonstandard prefix or
when you have both MP and HB installed for example.

In any case adding -I${prefix}/include to CFLAGS will probably sooner
or later bite you back, so think about using one of the other CMake
variables.

 Maybe I just don't have any of the ports that add options other than -I to 
 configure.cppflags, if those exist?

CMake doesn't support cppflags. So if a port uses CMake and needs some
extra flags, it would be useless for that Portfiles to add cppflags
anyway.

 Does it help if you add -DCMAKE_INCLUDE_PATH=${prefix}/include? (I'm
 not 100% sure if that's the right variable.)

 I'd have to keep that in mind for when I run into a header search issue when 
 building. I personally only had the issue with (-lakonadi-calendar) not 
 finding libakonadi-calendar.dylib. And somehow I doubt cmake is clever enough 
 to add -L/opt/local/lib if it encountered -I/opt/local/include?

You usually have to explicitly add something like
-DAKONADI_CALENDAR_LIBRARY=${prefix}/lib/libakonadi-calendar.dylib
to the Portfile. See root6 for example.

 We were discussion replacing cppflags=-I${prefix}/include with a
 variable with a list of include paths. Then CMake or any other build
 system could convert that list into its own format.

 For example
configure.includedirs-append ${prefix}/include/somelib
 could end up as
-DCMAKE_INCLUDE_PATH=${prefix}/include/somelib...
 in CMake and as something else in another system.

 Yes, sounds like a plan, with something similar for LIBDIR I guess.

Yes.

 I'm not sure if CMAKE_INCLUDE_PATH is the one to go for though, and not 
 INCLUDEDIRS or something like that ...

Maybe. I'm not sure which variable is the proper one.

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


Re: [KDE/Mac] compiling/installing

2014-07-28 Thread René J.V. Bertin
On Jul 28, 2014, at 20:33, b...@ithryn.net wrote:

 The log file complains of a linking error, specifically it can't find 
 -lakonadi-calendar. This library does exist, however the link command does 
 not have -L/opt/local/lib so it cannot find the library. If i edit the link 
 command by hand, the link succeeds. However the renaming compile files as the 
 compiler can't find header files, since the include flags appear to be 
 incorrect, i.e. there is no -I/opt/local/include/.

I've been noticing the same error, but have been able to circumvent it fiddling 
with configure.compiler .

Did you reinstall all KDE packages?

NB: I seem to recall seeing a recent change to a FindKDE4 cmake file; if 
correct, I wonder if that's related?!

René
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users