6 # $MCom: ports-experimental/Mk/bsd.mate.mk,v 1.13 2012/09/03 17:02:31 mezz Exp $
8 # Please view me with 4 column tabs!
10 #######################################################
12 # *** WARNING: Disable MARCUSCOM before merge in FreeBSD!
13 # Please also remove this section before merging into FreeBSD.
17 # ======================= USERS =================================
19 # There are no significant user-definable settings in here.
20 # This file is a framework to make it easier to create MATE ports.
22 # ======================= /USERS ================================
24 .if !defined(_POSTMKINCLUDED) && !defined(Mate_Pre_Include)
26 # Please make sure all changes to this file are passed through the maintainer.
27 # Do not commit them yourself (unless of course you're the Port's Wraith ;).
28 Mate_Include_MAINTAINER= gnome@FreeBSD.org
29 Mate_Pre_Include= bsd.mate.mk
31 # This section defines possible names of MATE components and all information
32 # necessary for ports to use those components.
34 # Ports can use this as follows:
36 # USE_MATE= caja common desktop
38 # .include <bsd.port.mk>
40 # As a result proper LIB_DEPENDS/RUN_DEPENDS will be added and CONFIGURE_ENV
41 # and MAKE_ENV defined.
44 # non-version specific components. Do not use :build/:run on those.
45 _USE_MATE_ALL= autogen intlhack intltool ltasneededhack lthack ltverhack
46 # These *hack* tools are the same as in bsd.gnome.mk but are run in
47 # pre-configure because pre-patch is when we run autogen.sh.
49 # MATE components, you can use the :build or :run if need. Without the :build
50 # and :run, it will be added in both build and run dependency. It will check
51 # for the library dependency first. If not exists then do the build/run on
52 # the *.pc file instead.
53 _USE_MATE_ALL+= caja common controlcenter desktop dialogs docutils icontheme \
54 keyring libmatekbd libmatekeyring libmateweather libmatewnck \
55 marco menus mucharmap notificationdaemon panel polkit pluma \
58 SCROLLKEEPER_DIR= /var/db/rarian
60 lthack_PRE_PATCH= ${FIND} ${WRKSRC} -name "configure" -type f | ${XARGS} ${REINPLACE_CMD} -e \
61 '/^LIBTOOL_DEPS="$$ac_aux_dir\/ltmain.sh"$$/s|$$|; $$ac_aux_dir/ltconfig $$LIBTOOL_DEPS;|'
63 caja_DETECT= ${LOCALBASE}/libdata/pkgconfig/libcaja-extension.pc
64 caja_BUILD_DEPENDS= ${caja_DETECT}:${PORTSDIR}/x11-fm/mate-file-manager
65 caja_LIB_DEPENDS= libcaja-extension.so:${PORTSDIR}/x11-fm/mate-file-manager
66 caja_RUN_DEPENDS= ${caja_DETECT}:${PORTSDIR}/x11-fm/mate-file-manager
68 mucharmap_DETECT= ${LOCALBASE}/libdata/pkgconfig/mucharmap-2.pc
69 mucharmap_BUILD_DEPENDS=${mucharmap_DETECT}:${PORTSDIR}/deskutils/mate-character-map
70 mucharmap_LIB_DEPENDS= libmucharmap.so:${PORTSDIR}/deskutils/mate-character-map
71 mucharmap_RUN_DEPENDS= ${mucharmap_DETECT}:${PORTSDIR}/deskutils/mate-character-map
73 common_DETECT= ${LOCALBASE}/bin/mate-autogen
74 common_BUILD_DEPENDS= ${common_DETECT}:${PORTSDIR}/devel/mate-common
75 common_RUN_DEPENDS= ${common_DETECT}:${PORTSDIR}/devel/mate-common
77 controlcenter_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-window-settings-2.0.pc
78 controlcenter_BUILD_DEPENDS= ${controlcenter_DETECT}:${PORTSDIR}/sysutils/mate-control-center
79 controlcenter_LIB_DEPENDS= libmate-window-settings.so:${PORTSDIR}/sysutils/mate-control-center
80 controlcenter_RUN_DEPENDS= ${controlcenter_DETECT}:${PORTSDIR}/sysutils/mate-control-center
82 desktop_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-desktop-2.0.pc
83 desktop_BUILD_DEPENDS= ${desktop_DETECT}:${PORTSDIR}/x11/mate-desktop
84 desktop_LIB_DEPENDS= libmate-desktop-2.so:${PORTSDIR}/x11/mate-desktop
85 desktop_RUN_DEPENDS= ${desktop_DETECT}:${PORTSDIR}/x11/mate-desktop
87 dialogs_DETECT= ${LOCALBASE}/bin/matedialog
88 dialogs_BUILD_DEPENDS= ${dialogs_DETECT}:${PORTSDIR}/x11/mate-dialogs
89 dialogs_RUN_DEPENDS= ${dialogs_DETECT}:${PORTSDIR}/x11/mate-dialogs
91 docutils_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-doc-utils.pc
92 docutils_BUILD_DEPENDS= ${docutils_DETECT}:${PORTSDIR}/textproc/mate-doc-utils
93 docutils_RUN_DEPENDS= ${docutils_DETECT}:${PORTSDIR}/textproc/mate-doc-utils
95 icontheme_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-icon-theme.pc
96 icontheme_BUILD_DEPENDS=${icontheme_DETECT}:${PORTSDIR}/x11-themes/mate-icon-theme
97 icontheme_RUN_DEPENDS= ${icontheme_DETECT}:${PORTSDIR}/x11-themes/mate-icon-theme
99 intltool_DETECT= ${LOCALBASE}/bin/intltool-extract
100 intltool_BUILD_DEPENDS= ${intltool_DETECT}:${PORTSDIR}/textproc/intltool
102 intlhack_PRE_PATCH= ${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${REINPLACE_CMD} -e \
103 's|mkdir $$lang or|mkdir $$lang, 0777 or| ; \
104 s|^push @INC, "/.*|push @INC, "${LOCALBASE}/share/intltool";| ; \
105 s|/usr/bin/iconv|${LOCALBASE}/bin/iconv|g ; \
106 s|unpack *[(]'"'"'U\*'"'"'|unpack ('"'"'C*'"'"'|'
107 .if ${USE_MATE:Mintlhack}!=""
111 keyring_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-gcr-0.pc
112 keyring_BUILD_DEPENDS= ${keyring_DETECT}:${PORTSDIR}/security/mate-keyring
113 keyring_LIB_DEPENDS= libmategcr.so:${PORTSDIR}/security/mate-keyring
114 keyring_RUN_DEPENDS= ${keyring_DETECT}:${PORTSDIR}/security/mate-keyring
116 libmatekbd_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatekbd.pc
117 libmatekbd_BUILD_DEPENDS= ${libmatekbd_DETECT}:${PORTSDIR}/x11/libmatekbd
118 libmatekbd_LIB_DEPENDS= libmatekbd.so:${PORTSDIR}/x11/libmatekbd
119 libmatekbd_RUN_DEPENDS= ${libmatekbd_DETECT}:${PORTSDIR}/x11/libmatekbd
121 libmatekeyring_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-keyring-1.pc
122 libmatekeyring_BUILD_DEPENDS= ${libmatekeyring_DETECT}:${PORTSDIR}/security/libmatekeyring
123 libmatekeyring_LIB_DEPENDS= libmate-keyring.so:${PORTSDIR}/security/libmatekeyring
124 libmatekeyring_RUN_DEPENDS= ${libmatekeyring_DETECT}:${PORTSDIR}/security/libmatekeyring
126 libmateweather_DETECT= ${LOCALBASE}/libdata/pkgconfig/mateweather.pc
127 libmateweather_BUILD_DEPENDS= ${libmateweather_DETECT}:${PORTSDIR}/net/libmateweather
128 libmateweather_LIB_DEPENDS= libmateweather.so:${PORTSDIR}/net/libmateweather
129 libmateweather_RUN_DEPENDS= ${libmateweather_DETECT}:${PORTSDIR}/net/libmateweather
131 libmatewnck_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatewnck.pc
132 libmatewnck_BUILD_DEPENDS= ${libmatewnck_DETECT}:${PORTSDIR}/x11-toolkits/libmatewnck
133 libmatewnck_LIB_DEPENDS= libmatewnck.so:${PORTSDIR}/x11-toolkits/libmatewnck
134 libmatewnck_RUN_DEPENDS= ${libmatewnck_DETECT}:${PORTSDIR}/x11-toolkits/libmatewnck
136 marco_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmarco-private.pc
137 marco_BUILD_DEPENDS= ${marco_DETECT}:${PORTSDIR}/x11-wm/mate-window-manager
138 marco_LIB_DEPENDS= libmarco-private.so:${PORTSDIR}/x11-wm/mate-window-manager
139 marco_RUN_DEPENDS= ${marco_DETECT}:${PORTSDIR}/x11-wm/mate-window-manager
141 menus_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmate-menu.pc
142 menus_BUILD_DEPENDS= ${menus_DETECT}:${PORTSDIR}/x11/mate-menus
143 menus_LIB_DEPENDS= libmate-menu.so:${PORTSDIR}/x11/mate-menus
144 menus_RUN_DEPENDS= ${menus_DETECT}:${PORTSDIR}/x11/mate-menus
146 notificationdaemon_DETECT= ${LOCALBASE}/libexec/mate-notification-daemon
147 notificationdaemon_BUILD_DEPENDS= ${notificationdaemon_DETECT}:${PORTSDIR}/deskutils/mate-notification-daemon
148 notificationdaemon_RUN_DEPENDS= ${notificationdaemon_DETECT}:${PORTSDIR}/deskutils/mate-notification-daemon
150 panel_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatepanelapplet-4.0.pc
151 panel_BUILD_DEPENDS= ${panel_DETECT}:${PORTSDIR}/x11/mate-panel
152 panel_LIB_DEPENDS= libmate-panel-applet-4.so:${PORTSDIR}/x11/mate-panel
153 panel_RUN_DEPENDS= ${panel_DETECT}:${PORTSDIR}/x11/mate-panel
155 polkit_DETECT= ${LOCALBASE}/libdata/pkgconfig/polkit-gtk-mate-1.pc
156 polkit_BUILD_DEPENDS= ${polkit_DETECT}:${PORTSDIR}/sysutils/mate-polkit
157 polkit_LIB_DEPENDS= libpolkit-gtk-mate-1.so:${PORTSDIR}/sysutils/mate-polkit
158 polkit_RUN_DEPENDS= ${polkit_DETECT}:${PORTSDIR}/sysutils/mate-polkit
160 pluma_DETECT= ${LOCALBASE}/libdata/pkgconfig/pluma.pc
161 pluma_BUILD_DEPENDS= ${pluma_DETECT}:${PORTSDIR}/editors/mate-text-editor
162 pluma_RUN_DEPENDS= ${pluma_DETECT}:${PORTSDIR}/editors/mate-text-editor
164 settingsdaemon_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-settings-daemon.pc
165 settingsdaemon_BUILD_DEPENDS= ${settingsdaemon_DETECT}:${PORTSDIR}/sysutils/mate-settings-daemon
166 settingsdaemon_RUN_DEPENDS= ${settingsdaemon_DETECT}:${PORTSDIR}/sysutils/mate-settings-daemon
168 # End component definition section
171 # End of optional part.
173 .if defined(_POSTMKINCLUDED) && !defined(Mate_Post_Include)
175 Mate_Post_Include= bsd.mate.mk
177 .if defined(USE_MATE)
178 # Then handle the ltverhack component (it has to be done here, because
179 # we rely on some bsd.autotools.mk variables, and bsd.autotools.mk is
180 # included in the post-makefile section).
181 .if defined(_AUTOTOOL_libtool)
182 lthacks_CONFIGURE_ENV= ac_cv_path_DOLT_BASH=
183 lthacks_PRE_PATCH= ${CP} -pf ${LTMAIN} ${WRKDIR}/mate-ltmain.sh && \
184 ${CP} -pf ${LIBTOOL} ${WRKDIR}/mate-libtool && \
185 for file in ${LIBTOOLFILES}; do \
186 ${REINPLACE_CMD} -e \
187 '/^ltmain=/!s|$$ac_aux_dir/ltmain\.sh|${LIBTOOLFLAGS} ${WRKDIR}/mate-ltmain.sh|g; \
188 /^LIBTOOL=/s|$$(top_builddir)/libtool|${WRKDIR}/mate-libtool|g' \
189 ${PATCH_WRKSRC}/$$file; \
192 . if ${USE_MATE:Mltverhack*}!="" || ${USE_MATE:Mltasneededhack}!=""
193 IGNORE= cannot install: ${PORTNAME} uses the ltverhack and/or ltasneededhack MATE components but does not use libtool
197 .if ${USE_MATE:Mltverhack\:*:C/^[^:]+:([^:]+).*/\1/}==""
198 ltverhack_LIB_VERSION= major=.`expr $$current - $$age`
200 ltverhack_LIB_VERSION= major=".${USE_MATE:Mltverhack\:*:C/^[^:]+:([^:]+).*/\1/}"
202 ltverhack_PATCH_DEPENDS=${LIBTOOL_DEPENDS}
203 ltverhack_PRE_PATCH= for file in mate-ltmain.sh mate-libtool; do \
204 if [ -f ${WRKDIR}/$$file ]; then \
205 ${REINPLACE_CMD} -e \
206 '/freebsd-elf)/,/;;/ s|major="\.$$current"|${ltverhack_LIB_VERSION}|; \
207 /freebsd-elf)/,/;;/ s|versuffix="\.$$current"|versuffix="$$major"|' \
212 ltasneededhack_PATCH_DEPENDS=${LIBTOOL_DEPENDS}
213 ltasneededhack_PRE_PATCH= if [ -f ${WRKDIR}/mate-libtool ]; then \
214 ${REINPLACE_CMD} -e \
215 '/^archive_cmds=/s/-shared/-shared -Wl,--as-needed/ ; \
216 /^archive_expsym_cmds=/s/-shared/-shared -Wl,--as-needed/' \
217 ${WRKDIR}/mate-libtool; \
221 # Comparing between USE_MATE and _USE_MATE_ALL to make sure the component
222 # exists in _USE_MATE_ALL. If it does not exist then give an error about it.
223 #. for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/}
224 . for component in ${USE_MATE:C/^([^:]+).*/\1/}
225 #. for component in ${USE_GNOME:C/^([^:]+).*/\1/}
226 . if ${_USE_MATE_ALL:M${component}}==""
227 .error cannot install: Unknown component USE_MATE=${component}
231 . if ${USE_MATE:Mltverhack*}!= "" || ${USE_MATE:Mltasneededhack}!= ""
232 MATE_PRE_PATCH+= ${lthacks_PRE_PATCH}
233 CONFIGURE_ENV+= ${lthacks_CONFIGURE_ENV}
236 . for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/}
237 . if defined(${component}_PATCH_DEPENDS)
238 PATCH_DEPENDS+= ${${component}_PATCH_DEPENDS}
241 . if defined(${component}_DETECT)
242 . if ${USE_MATE:M${component}\:build}!=""
243 BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS}
244 . elif ${USE_MATE:M${component}\:run}!=""
245 RUN_DEPENDS+= ${${component}_RUN_DEPENDS}
247 . if defined(${component}_LIB_DEPENDS)
248 LIB_DEPENDS+= ${${component}_LIB_DEPENDS}
250 BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS}
251 RUN_DEPENDS+= ${${component}_RUN_DEPENDS}
256 . if defined(${component}_CONFIGURE_TARGET)
257 CONFIGURE_ARGS+=${${component}_CONFIGURE_ARGS}
260 . if defined(${component}_CONFIGURE_ENV)
261 CONFIGURE_ENV+= ${${component}_CONFIGURE_ENV}
264 . if defined(${component}_MAKE_ENV)
265 MAKE_ENV+= ${${component}_MAKE_ENV}
268 . if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET)
269 CONFIGURE_TARGET= ${${component}_CONFIGURE_TARGET}
272 . if defined(${component}_PRE_PATCH)
273 MATE_PRE_PATCH+= ; ${${component}_PRE_PATCH}
276 .endif # USE_MATE check
278 .if ${USE_MATE:Mautogen}!=""
280 CONFIGURE_ENV+= NOCONFIGURE=yes
282 pre-configure: mate-pre-configure
285 @(cd ${CONFIGURE_WRKSRC} ; ${SETENV} ${CONFIGURE_ENV} ./autogen.sh)
288 .if defined(MATE_PRE_PATCH)
290 pre-configure-script: mate-pre-configure-script
292 mate-pre-configure-script:
293 @${MATE_PRE_PATCH:C/^;//1}
296 .if ${MAINTAINER}=="gnome@FreeBSD.org"
297 CONFIGURE_FAIL_MESSAGE= "Please run the gnomelogalyzer, available from \"http://www.freebsd.org/gnome/gnomelogalyzer.sh\", which will diagnose the problem and suggest a solution. If - and only if - the gnomelogalyzer cannot solve the problem, report the build failure to the FreeBSD MATE team at ${MAINTAINER}, and attach (a) \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\", (b) the output of the failed make command, and (c) the gnomelogalyzer output. Also, it might be a good idea to provide an overview of all packages installed on your system (i.e. an \`ls ${PKG_DBDIR}\`). Put your attachment up on any website, copy-and-paste into http://freebsd-gnome.pastebin.com, or use send-pr(1) with the attachment. Try to avoid sending any attachments to the mailing list (${MAINTAINER}), because attachments sent to FreeBSD mailing lists are usually discarded by the mailing list software."