Re: [Evolution-hackers] Checking installation of header files for data service components

2020-11-23 Thread Markus Elfring via evolution-hackers
> … Instead, use DESTDIR properly

I find that this happening here.


> (aka not at all,

I am using such an environment variable for intended purposes,


> because you are not a packager,

Such a view can be appropriate at the moment.


> and configure the project properly,

Such an expectation can be fine (in principle).


> by using expected CMAKE_INSTALL_PREFIX, not some artificial.

This build parameter can trigger also further development challenges.

The chosen installation approach influences which storage locations
can be reused for libraries from the GNOME Evolution data service,
doesn't it?


> That's at least my understanding from this lengthy thread.

Our software usage seems to differ in specific aspects.

Regards,
Markus
___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] Checking installation of header files for data service components

2020-11-23 Thread Milan Crha via evolution-hackers
On Mon, 2020-11-23 at 17:15 +0100, Markus Elfring via evolution-hackers
wrote:
> How do you think about to take further software extension
> possibilities into account here?

Hi,
no, I'm sorry. Instead, use DESTDIR properly (aka not at all, because
you are not a packager, you are not building a package) and configure
the project properly, by using expected CMAKE_INSTALL_PREFIX, not some
artificial. That's at least my understanding from this lengthy thread.
Bye,
Milan

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] Checking installation of header files for data service components

2020-11-23 Thread Markus Elfring via evolution-hackers
> In file included from 
> /home/elfring/Projekte/Gnome/Evolution/lokal/src/e-util/e-util.h:266,
>  from 
> /home/elfring/Projekte/Gnome/Evolution/lokal/src/e-util/test-proxy-preferences.c:18:
> /home/elfring/Projekte/Gnome/Evolution/lokal/src/e-util/e-webdav-browser.h:26:10:
>  fatal error: libedataserverui/libedataserverui.h: No such file or directory
>26 | #include 
>   |  ^
> compilation terminated.
> ninja: build stopped: subcommand failed.
>
>
> Now I imagine that the header file inclusion parameters can be extended 
> somehow.
> Would you like to clarify corresponding adjustment possibilities?
>
> How should a path like the following be automatically chosen to resolve
> such a software dependency?
> ~/Projekte/Test/Evolution/Service/current/home/elfring/Projekte/Test/Evolution/Service/current/include/evolution-data-server/libedataserverui/libedataserverui.h

Now I suggest to extend a build script like the following.
https://gitlab.gnome.org/GNOME/evolution/-/blob/d1f4010751c65a3ac5de3919905e2f14f5f4744f/CMakeLists.txt#L271

add_printable_variable(EVOLUTION_DATA_SERVER_LIBRARY_SUBDIR
   "Choose a subdirectory for library files of the GNOME 
Evolution data server on demand"
   "evolution-data-server")
add_printable_variable_path(EVOLUTION_DATA_SERVER_INSTALLATION_PREFIX
"Choose an installation prefix for the GNOME 
Evolution data server on demand"
"${CMAKE_INSTALL_PREFIX}")

if(EVOLUTION_DATA_SERVER_INSTALLATION_PREFIX)
if(PKG_CONFIG_USE_CMAKE_PREFIX_PATH OR CMAKE_VERSION 
VERSION_GREATER_EQUAL 3.1)
option(EVOLUTION_DATA_SERVER_USE_STATIC_LIBRARIES
   "Should a configuration be used according to static 
libraries from the GNOME Evolution data server?"
   ON)
cmake_policy(SET CMP0057 NEW)
set(EVOLUTION_DATA_SERVER_INSTALLATION_DIR

"${EVOLUTION_DATA_SERVER_INSTALLATION_PREFIX}${CMAKE_BINARY_DIR}")

if(NOT EVOLUTION_DATA_SERVER_INSTALLATION_DIR IN_LIST 
CMAKE_PREFIX_PATH)
list(APPEND CMAKE_PREFIX_PATH 
"${EVOLUTION_DATA_SERVER_INSTALLATION_DIR}")
endif()

if(CMAKE_HOST_SYSTEM_NAME EQUAL "Darwin")
if(NOT EVOLUTION_DATA_SERVER_INSTALLATION_DIR IN_LIST 
CMAKE_FRAMEWORK_PATH)
list(APPEND CMAKE_FRAMEWORK_PATH 
"${EVOLUTION_DATA_SERVER_INSTALLATION_DIR}")
endif()

if(NOT EVOLUTION_DATA_SERVER_INSTALLATION_DIR IN_LIST 
CMAKE_APPBUNDLE_PATH)
list(APPEND CMAKE_APPBUNDLE_PATH 
"${EVOLUTION_DATA_SERVER_INSTALLATION_DIR}")
endif()
endif()
endif()
endif()

pkg_check_modules(EVOLUTION_DATA_SERVER REQUIRED
camel-1.2>=${eds_minimum_version}
libebook-1.2>=${eds_minimum_version}
libecal-2.0>=${eds_minimum_version}
libedataserver-1.2>=${eds_minimum_version}
libedataserverui-1.2>=${eds_minimum_version}
libebackend-1.2>=${eds_minimum_version}
)

if(EVOLUTION_DATA_SERVER_INSTALLATION_DIR)
set(subdir "/${EVOLUTION_DATA_SERVER_LIBRARY_SUBDIR}")

if(EVOLUTION_DATA_SERVER_USE_STATIC_LIBRARIES)
set(pattern "(.*/include${subdir})")
list(TRANSFORM EVOLUTION_DATA_SERVER_INCLUDE_DIRS REPLACE
 "^${pattern}$" 
"${EVOLUTION_DATA_SERVER_INSTALLATION_PREFIX}\\1"
 OUTPUT_VARIABLE x)
message(STATUS "Static transformation approach:\n${x}")
list(TRANSFORM EVOLUTION_DATA_SERVER_CFLAGS REPLACE
 "^-I${pattern}$" 
"-I${EVOLUTION_DATA_SERVER_INSTALLATION_PREFIX}\\1"
 OUTPUT_VARIABLE y)
else()
set(pattern
#   
"(${EVOLUTION_DATA_SERVER_INSTALLATION_PREFIX}.*/include(?!${subdir}))"
"(${EVOLUTION_DATA_SERVER_INSTALLATION_PREFIX}.*/include)"
   )
list(TRANSFORM EVOLUTION_DATA_SERVER_INCLUDE_DIRS REPLACE
 "^${pattern}$" "\\1${subdir}"
 OUTPUT_VARIABLE x)
message(STATUS "Dynamic transformation approach:\n${x}")
list(TRANSFORM EVOLUTION_DATA_SERVER_CFLAGS REPLACE
 "^-I${pattern}$" "-I\\1${subdir}"
 OUTPUT_VARIABLE y)
endif()

if(EVOLUTION_DATA_SERVER_INCLUDE_DIRS EQUAL x)
message(FATAL_ERROR "An adjustment approach failed for the 
variable “EVOLUTION_DATA_SERVER_INCLUDE_DIRS”.\nPlease check the corresponding 
dependencies once more.")
endif()

if(EVOLUTION_DATA_SERVER_CFLAGS EQUAL y)
message(FATAL_ERROR "An adjustment approach failed for the 
variable “EVOLUTION