Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: exposing headers for libmirsever-internal-dev #3288

Merged
merged 8 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/symbols-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ jobs:
RET=0
cmake --build build --target check-miral-symbols-map || RET=$?
cmake --build build --target check-miroil-symbols-map || RET=$?
cmake --build build --target check-mirserver-symbols-map || RET=$?
exit $RET
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

set(MIR_VERSION_MAJOR 2)
set(MIR_VERSION_MINOR 16)
set(MIR_VERSION_PATCH 4)
set(MIR_VERSION_MINOR 17)
set(MIR_VERSION_PATCH 0)

add_compile_definitions(MIR_VERSION_MAJOR=${MIR_VERSION_MAJOR})
add_compile_definitions(MIR_VERSION_MINOR=${MIR_VERSION_MINOR})
Expand Down
24 changes: 22 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Vcs-Git: https://github.com/MirServer/mir

#TODO: Packaging infrastructure for better dependency generation,
# ala pkg-xorg's xviddriver:Provides and ABI detection.
Package: libmirserver60
Package: libmirserver61
Section: libs
Architecture: linux-any
Multi-Arch: same
Expand Down Expand Up @@ -142,7 +142,7 @@ Section: libdevel
Architecture: linux-any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: libmirserver60 (= ${binary:Version}),
Depends: libmirserver61 (= ${binary:Version}),
libmirplatform-dev (= ${binary:Version}),
libmircommon-dev (= ${binary:Version}),
libglm-dev,
Expand All @@ -154,6 +154,26 @@ Description: Display server for Ubuntu - development headers
.
Contains header files required to build Mir servers.

Package: libmirserver-internal-dev
Section: libdevel
Architecture: linux-any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: libmirserver61 (= ${binary:Version}),
libmirplatform-dev (= ${binary:Version}),
libmircommon-dev (= ${binary:Version}),
libmircore-dev (= ${binary:Version}),
libmirserver-dev (= ${binary:Version}),
libglm-dev,
uuid-dev,
${misc:Depends},
Description: Display server for Ubuntu - internal development headers
Mir is a display server running on linux systems, with a focus on efficiency,
robust operation and a well-defined driver model.
.
This package contains internal headers with no stability guarantee, for servers
that wish to use functionality for which no public API exists yet.

Package: mirtest-dev
Section: libdevel
Architecture: linux-any
Expand Down
2 changes: 2 additions & 0 deletions debian/libmirserver-internal-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/include/mirserver-internal
usr/lib/*/pkgconfig/mirserver-internal.pc
1 change: 0 additions & 1 deletion debian/libmirserver60.install

This file was deleted.

1 change: 1 addition & 0 deletions debian/libmirserver61.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/lib/*/libmirserver.so.61
36 changes: 0 additions & 36 deletions src/include/server/mir/input/legacy_input_dispatchable.h

This file was deleted.

Empty file.
41 changes: 40 additions & 1 deletion src/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ configure_file(
@ONLY
)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/mirserver-internal.pc.in
${CMAKE_CURRENT_BINARY_DIR}/mirserver-internal.pc
@ONLY
)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
${PROJECT_SOURCE_DIR}/include/server/mir/version.h
Expand Down Expand Up @@ -154,8 +160,11 @@ install(DIRECTORY
install(DIRECTORY
${CMAKE_SOURCE_DIR}/include/server/mir DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/mirserver"
)
install(DIRECTORY
${CMAKE_SOURCE_DIR}/src/include/server/mir DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/mirserver-internal"
)

set(MIRSERVER_ABI 60) # Be sure to increment MIR_VERSION_MINOR at the same time
set(MIRSERVER_ABI 61) # Be sure to increment MIR_VERSION_MINOR at the same time
set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)

set_target_properties(
Expand All @@ -170,3 +179,33 @@ set_target_properties(
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mirserver.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mirserver-internal.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)

add_custom_target(
generate-mirserver-symbols-map
COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py
--library-name mir_server
--version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}
--symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map"
--internal-headers-directory="${PROJECT_SOURCE_DIR}/src/include/server"
--include-dirs="$<JOIN:$<TARGET_PROPERTY:mirserver,INCLUDE_DIRECTORIES>,:>"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")

add_custom_target(
check-mirserver-symbols-map
COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py
--library-name mir_server
--version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}
--symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map"
--internal-headers-directory="${PROJECT_SOURCE_DIR}/src/include/server"
--include-dirs "$<JOIN:$<TARGET_PROPERTY:mirserver,INCLUDE_DIRECTORIES>,:>"
--diff
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")

add_custom_target(regenerate-mirserver-internal-debian-symbols
COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/run.sh --library mir_server_internal --version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR} --output_symbols
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
VERBATIM)
8 changes: 8 additions & 0 deletions src/server/mirserver-internal.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
prefix=@CMAKE_INSTALL_PREFIX@
includedir=@PKGCONFIG_INCLUDEDIR@/mirserver-internal

Name: mirserver-internal
Description: Mir server internal headers
Version: @MIR_VERSION@
Requires: mirserver mircommon mirplatform mircore
Cflags: -I${includedir}
Loading
Loading