mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 13:10:33 +01:00
Build -uninstalled.pc files
This commit is contained in:
parent
a18c75c3e9
commit
4a01b1d9c9
4 changed files with 43 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -26,3 +26,4 @@ stamp-h.in
|
|||
*.lo
|
||||
*.orig
|
||||
*.rej
|
||||
*-uninstalled.pc
|
||||
|
|
|
|||
|
|
@ -326,12 +326,14 @@ m4_pattern_allow(^CAIRO_HAS_)
|
|||
|
||||
|
||||
dnl
|
||||
dnl Define cr_feature_pc_modname and cr_feature_pc ala other cr_feature_* macros
|
||||
dnl Define cr_feature_pc and friends ala other cr_feature_* macros
|
||||
dnl
|
||||
m4_define([cr_feature_pc_modname],
|
||||
[[cairo-]m4_translit(cr_feature,_,-)])
|
||||
m4_define([cr_feature_pc],
|
||||
[cr_feature_pc_modname[.pc]])
|
||||
m4_define([cr_feature_uninstalled_pc],
|
||||
[cr_feature_pc_modname[-uninstalled.pc]])
|
||||
|
||||
|
||||
dnl ===========================================================================
|
||||
|
|
@ -478,6 +480,7 @@ dnl
|
|||
|
||||
dnl All .pc files are generated automatically except for this one
|
||||
AC_CONFIG_FILES([src/cairo.pc])
|
||||
AC_CONFIG_FILES([cairo-uninstalled.pc:src/cairo-uninstalled.pc.in])
|
||||
|
||||
dnl pkg-config requires, non-pkgconfig cflags and libs, and total cflags and libs
|
||||
CAIRO_FEATURE_VARS_REGISTER([REQUIRES BASE])
|
||||
|
|
@ -507,6 +510,29 @@ CAIRO_FEATURE_HOOK_REGISTER(yes,*,!,
|
|||
])
|
||||
])
|
||||
|
||||
dnl Generate -uninstalled.pc files for enabled public features
|
||||
CAIRO_FEATURE_HOOK_REGISTER(yes,*,!,
|
||||
[
|
||||
AC_CONFIG_FILES(cr_feature_uninstalled_pc:src/cairo-features-uninstalled.pc.in,
|
||||
[
|
||||
$SED -i -e "
|
||||
s%@FEATURE_PC@%]cr_feature_pc_modname[%g;
|
||||
s%@FEATURE_NAME@%]cr_feature_name[%g;
|
||||
s%@FEATURE_BASE@%$$1_BASE%g;
|
||||
s%@FEATURE_REQUIRES@%$$1_REQUIRES%g;
|
||||
s%@FEATURE_NONPKGCONFIG_LIBS@%$$1_NONPKGCONFIG_LIBS%g;
|
||||
s%@FEATURE_NONPKGCONFIG_CFLAGS@%$$1_NONPKGCONFIG_CFLAGS%g;
|
||||
" "]src/cr_feature_pc[" ||
|
||||
AC_MSG_ERROR(failed to update ]src/cr_feature_pc[)
|
||||
],[
|
||||
SED='$SED'
|
||||
$1_BASE='$$1_BASE'
|
||||
$1_REQUIRES='$$1_REQUIRES'
|
||||
$1_NONPKGCONFIG_LIBS='$$1_NONPKGCONFIG_LIBS'
|
||||
$1_NONPKGCONFIG_CFLAGS='$$1_NONPKGCONFIG_CFLAGS'
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl ===========================================================================
|
||||
dnl
|
||||
|
|
|
|||
7
src/cairo-features-uninstalled.pc.in
Normal file
7
src/cairo-features-uninstalled.pc.in
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Name: @FEATURE_PC@
|
||||
Description: @FEATURE_NAME@ for cairo graphics library
|
||||
Version: @VERSION@
|
||||
|
||||
Requires: @FEATURE_BASE@ @FEATURE_REQUIRES@
|
||||
Libs: @FEATURE_NONPKGCONFIG_LIBS@
|
||||
Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/src @FEATURE_NONPKGCONFIG_CFLAGS@
|
||||
8
src/cairo-uninstalled.pc.in
Normal file
8
src/cairo-uninstalled.pc.in
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Name: cairo
|
||||
Description: Multi-platform 2D graphics library
|
||||
Version: @VERSION@
|
||||
|
||||
@PKGCONFIG_REQUIRES@: @CAIRO_REQUIRES@
|
||||
Libs: ${pc_top_builddir}/${pcfiledir}/src/libcairo.la
|
||||
Libs.private: @CAIRO_NONPKGCONFIG_LIBS@
|
||||
Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/src
|
||||
Loading…
Add table
Reference in a new issue