devel/glib: convert gio modules and glib schemas to triggers
Use trigger to compile glib schemas, and generate gio modules cache PR: 262567 Reviewed by: tcberner Exp-run by: antoine Differential Revision: https://reviews.freebsd.org/D34564
This commit is contained in:
parent
e472de813a
commit
522332dbc7
@ -1,14 +0,0 @@
|
||||
# MAINTAINER: gnome@FreeBSD.org
|
||||
#
|
||||
# Rebuild the glib schema cache.
|
||||
#
|
||||
# Ports installing glib schemas should use the GLIB_SCHEMAS macro
|
||||
# from USE_GNOME instead of calling this keyword directly.
|
||||
|
||||
actions: []
|
||||
post-install: <<EOD
|
||||
glib-compile-schemas %D/share/glib-2.0/schemas > /dev/null || true
|
||||
EOD
|
||||
post-deinstall: <<EOD
|
||||
glib-compile-schemas %D/share/glib-2.0/schemas > /dev/null || true
|
||||
EOD
|
@ -140,9 +140,6 @@ while read -r modtype path extra; do
|
||||
case "${sub_path}" in
|
||||
# gconftool-2 --makefile-uninstall-rule is unpredictable
|
||||
etc/gconf/gconf.xml.defaults/%gconf-tree*.xml) ;;
|
||||
# This is a cache file for gio modules could be modified
|
||||
# for any gio modules
|
||||
lib/gio/modules/giomodule.cache) ;;
|
||||
# removal of info files leaves entry uneasy to cleanup
|
||||
# in info/dir
|
||||
info/dir) ;;
|
||||
|
@ -411,15 +411,12 @@ gnome-post-gconf-schemas:
|
||||
done
|
||||
.endif
|
||||
|
||||
# we put the @glib-schemas behind the plist schema entry, because it compiles files
|
||||
# in the directory. So we should remove the port file first before recompiling.
|
||||
.if defined(GLIB_SCHEMAS)
|
||||
_USES_install+= 690:gnome-post-glib-schemas
|
||||
gnome-post-glib-schemas:
|
||||
@for i in ${GLIB_SCHEMAS}; do \
|
||||
${ECHO_CMD} "share/glib-2.0/schemas/$${i}" >> ${TMPPLIST}; \
|
||||
done
|
||||
@${ECHO_CMD} "@glib-schemas" >> ${TMPPLIST};
|
||||
.endif
|
||||
|
||||
.endif
|
||||
|
@ -1923,14 +1923,12 @@ PKGPOSTDEINSTALL?= ${PKGDIR}/pkg-post-deinstall
|
||||
|
||||
_FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \
|
||||
fonts.dir fonts.scale gtk-update-icon-cache \
|
||||
gio-querymodules \
|
||||
gtk-query-immodules \
|
||||
ldconfig \
|
||||
load-octave-pkg \
|
||||
ocamlfind \
|
||||
update-desktop-database update-mime-database \
|
||||
gdk-pixbuf-query-loaders catalog.ports \
|
||||
glib-compile-schemas \
|
||||
ccache-update-links
|
||||
|
||||
.if defined(USE_LOCAL_MK)
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= dconf
|
||||
PORTVERSION= 0.40.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel gnome
|
||||
MASTER_SITES= GNOME
|
||||
DISTNAME= dconf-${PORTVERSION}
|
||||
|
@ -20,5 +20,3 @@ share/vala/vapi/dconf.deps
|
||||
share/vala/vapi/dconf.vapi
|
||||
@dir %%ETCDIR%%/db
|
||||
@dir %%ETCDIR%%/profile
|
||||
@postexec %D/bin/gio-querymodules %D/lib/gio/modules 2>/dev/null || /usr/bin/true
|
||||
@postunexec %D/bin/gio-querymodules %D/lib/gio/modules 2>/dev/null || /usr/bin/true
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= gconf2
|
||||
PORTVERSION= 3.2.6
|
||||
PORTREVISION= 6
|
||||
PORTREVISION= 7
|
||||
CATEGORIES= devel gnome
|
||||
MASTER_SITES= GNOME/sources/GConf/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
|
||||
DISTNAME= GConf-${PORTVERSION}
|
||||
|
@ -122,5 +122,3 @@ share/sgml/gconf/gconf-1.0.dtd
|
||||
@dir etc/gconf/gconf.xml.defaults
|
||||
@dir etc/gconf/gconf.xml.mandatory
|
||||
@dir etc/gconf/gconf.xml.system
|
||||
@postexec %D/bin/gio-querymodules %D/lib/gio/modules 2>/dev/null || /usr/bin/true
|
||||
@postunexec %D/bin/gio-querymodules %D/lib/gio/modules 2>/dev/null || /usr/bin/true
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= glib
|
||||
DISTVERSION= 2.70.4
|
||||
PORTREVISION= 1
|
||||
PORTEPOCH= 2
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= GNOME
|
||||
@ -18,7 +19,8 @@ LIB_DEPENDS= libffi.so:devel/libffi \
|
||||
# iconv:wchar_t - our iconv in base doesn't support utf-8 -> wchar_t (boooo)
|
||||
# (wchar_t is used by glibmm, rawtherapee triggered this)
|
||||
USES= compiler:c11 cpe gettext gnome iconv:wchar_t localbase:ldflags \
|
||||
meson perl5 pkgconfig python:3.6+ tar:xz
|
||||
meson perl5 pkgconfig python:3.6+ tar:xz trigger
|
||||
TRIGGERS= gio-modules glib-schemas
|
||||
USE_LDCONFIG= yes
|
||||
USE_PERL5= build
|
||||
USE_PYTHON= py3kplist
|
||||
|
16
devel/glib20/files/gio-modules.ucl.in
Normal file
16
devel/glib20/files/gio-modules.ucl.in
Normal file
@ -0,0 +1,16 @@
|
||||
path: "%%PREFIX%%/lib/gio/modules"
|
||||
cleanup: {
|
||||
type: lua
|
||||
sandbox: false
|
||||
script: <<EOS
|
||||
os.remove("%%PREFIX%%/lib/gio/modules/giomodule.cache")
|
||||
EOS
|
||||
}
|
||||
trigger: {
|
||||
type: lua
|
||||
sandbox: false
|
||||
script: <<EOS
|
||||
print("Generating GIO modules cache")
|
||||
pkg.exec({"%%PREFIX%%/bin/gio-querymodules", "%%PREFIX%%/lib/gio/modules"})
|
||||
EOS
|
||||
}
|
16
devel/glib20/files/glib-schemas.ucl.in
Normal file
16
devel/glib20/files/glib-schemas.ucl.in
Normal file
@ -0,0 +1,16 @@
|
||||
path: "%%PREFIX%%/share/glib-2.0/schemas"
|
||||
cleanup: {
|
||||
type: lua
|
||||
sandbox: false
|
||||
script: <<EOS
|
||||
os.remove("%%PREFIX%%/share/glib-2.0/schemas/gschemas.compiled")
|
||||
EOS
|
||||
}
|
||||
trigger: {
|
||||
type: lua
|
||||
sandbox: false
|
||||
script: <<EOS
|
||||
print("Compiling glib schemas")
|
||||
pkg.exec({"%%PREFIX%%/bin/glib-compile-schemas", "%%PREFIX%%/share/glib-2.0/schemas"})
|
||||
EOS
|
||||
}
|
@ -469,6 +469,3 @@ share/gettext/its/gschema.loc
|
||||
%%NLS%%share/locale/zh_TW/LC_MESSAGES/glib20.mo
|
||||
@dir lib/gio/modules
|
||||
@dir share/GConf/gsettings
|
||||
@postexec %D/bin/glib-compile-schemas %D/share/glib-2.0/schemas 2>/dev/null || /usr/bin/true
|
||||
@postunexec /bin/rm -f %D/share/glib-2.0/schemas/gschemas.compiled || /usr/bin/true
|
||||
@postexec %D/bin/gio-querymodules %D/lib/gio/modules 2>/dev/null || /usr/bin/true
|
||||
|
Loading…
Reference in New Issue
Block a user