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
47 # MATE components, you can use the :build or :run if need. Without the :build
48 # and :run, it will be added in both build and run dependency. It will check
49 # for the library dependency first. If not exists then do the build/run on
50 # the *.pc file instead.
51 _USE_MATE_ALL+= caja common controlcenter desktop dialogs docutils icontheme \
52 libmatekbd libmateweather \
53 marco menus mucharmap notificationdaemon panel polkit pluma \
56 SCROLLKEEPER_DIR= /var/db/rarian
58 caja_DETECT= ${LOCALBASE}/libdata/pkgconfig/libcaja-extension.pc
59 caja_BUILD_DEPENDS= ${caja_DETECT}:${PORTSDIR}/x11-fm/caja
60 caja_LIB_DEPENDS= libcaja-extension.so:${PORTSDIR}/x11-fm/caja
61 caja_RUN_DEPENDS= ${caja_DETECT}:${PORTSDIR}/x11-fm/caja
63 mucharmap_DETECT= ${LOCALBASE}/libdata/pkgconfig/mucharmap-2.pc
64 mucharmap_BUILD_DEPENDS=${mucharmap_DETECT}:${PORTSDIR}/deskutils/mate-character-map
65 mucharmap_LIB_DEPENDS= libmucharmap.so:${PORTSDIR}/deskutils/mate-character-map
66 mucharmap_RUN_DEPENDS= ${mucharmap_DETECT}:${PORTSDIR}/deskutils/mate-character-map
68 common_DETECT= ${LOCALBASE}/bin/mate-autogen
69 common_BUILD_DEPENDS= ${common_DETECT}:${PORTSDIR}/devel/mate-common
70 common_RUN_DEPENDS= ${common_DETECT}:${PORTSDIR}/devel/mate-common
72 controlcenter_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-window-settings-2.0.pc
73 controlcenter_BUILD_DEPENDS= ${controlcenter_DETECT}:${PORTSDIR}/sysutils/mate-control-center
74 controlcenter_LIB_DEPENDS= libmate-window-settings.so:${PORTSDIR}/sysutils/mate-control-center
75 controlcenter_RUN_DEPENDS= ${controlcenter_DETECT}:${PORTSDIR}/sysutils/mate-control-center
77 desktop_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-desktop-2.0.pc
78 desktop_BUILD_DEPENDS= ${desktop_DETECT}:${PORTSDIR}/x11/mate-desktop
79 desktop_LIB_DEPENDS= libmate-desktop-2.so:${PORTSDIR}/x11/mate-desktop
80 desktop_RUN_DEPENDS= ${desktop_DETECT}:${PORTSDIR}/x11/mate-desktop
82 dialogs_DETECT= ${LOCALBASE}/bin/matedialog
83 dialogs_BUILD_DEPENDS= ${dialogs_DETECT}:${PORTSDIR}/x11/mate-dialogs
84 dialogs_RUN_DEPENDS= ${dialogs_DETECT}:${PORTSDIR}/x11/mate-dialogs
86 docutils_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-doc-utils.pc
87 docutils_BUILD_DEPENDS= ${docutils_DETECT}:${PORTSDIR}/textproc/mate-doc-utils
88 docutils_RUN_DEPENDS= ${docutils_DETECT}:${PORTSDIR}/textproc/mate-doc-utils
90 icontheme_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-icon-theme.pc
91 icontheme_BUILD_DEPENDS=${icontheme_DETECT}:${PORTSDIR}/x11-themes/mate-icon-theme
92 icontheme_RUN_DEPENDS= ${icontheme_DETECT}:${PORTSDIR}/x11-themes/mate-icon-theme
94 intltool_DETECT= ${LOCALBASE}/bin/intltool-extract
95 intltool_BUILD_DEPENDS= ${intltool_DETECT}:${PORTSDIR}/textproc/intltool
97 intlhack_PRE_PATCH= ${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${REINPLACE_CMD} -e \
98 's|mkdir $$lang or|mkdir $$lang, 0777 or| ; \
99 s|^push @INC, "/.*|push @INC, "${LOCALBASE}/share/intltool";| ; \
100 s|/usr/bin/iconv|${LOCALBASE}/bin/iconv|g ; \
101 s|unpack *[(]'"'"'U\*'"'"'|unpack ('"'"'C*'"'"'|'
102 .if ${USE_MATE:Mintlhack}!=""
106 libmatekbd_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatekbd.pc
107 libmatekbd_BUILD_DEPENDS= ${libmatekbd_DETECT}:${PORTSDIR}/x11/libmatekbd
108 libmatekbd_LIB_DEPENDS= libmatekbd.so:${PORTSDIR}/x11/libmatekbd
109 libmatekbd_RUN_DEPENDS= ${libmatekbd_DETECT}:${PORTSDIR}/x11/libmatekbd
111 libmateweather_DETECT= ${LOCALBASE}/libdata/pkgconfig/mateweather.pc
112 libmateweather_BUILD_DEPENDS= ${libmateweather_DETECT}:${PORTSDIR}/net/libmateweather
113 libmateweather_LIB_DEPENDS= libmateweather.so:${PORTSDIR}/net/libmateweather
114 libmateweather_RUN_DEPENDS= ${libmateweather_DETECT}:${PORTSDIR}/net/libmateweather
116 marco_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmarco-private.pc
117 marco_BUILD_DEPENDS= ${marco_DETECT}:${PORTSDIR}/x11-wm/marco
118 marco_LIB_DEPENDS= libmarco-private.so:${PORTSDIR}/x11-wm/marco
119 marco_RUN_DEPENDS= ${marco_DETECT}:${PORTSDIR}/x11-wm/marco
121 menus_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmate-menu.pc
122 menus_BUILD_DEPENDS= ${menus_DETECT}:${PORTSDIR}/x11/mate-menus
123 menus_LIB_DEPENDS= libmate-menu.so:${PORTSDIR}/x11/mate-menus
124 menus_RUN_DEPENDS= ${menus_DETECT}:${PORTSDIR}/x11/mate-menus
126 notificationdaemon_DETECT= ${LOCALBASE}/libexec/mate-notification-daemon
127 notificationdaemon_BUILD_DEPENDS= ${notificationdaemon_DETECT}:${PORTSDIR}/deskutils/mate-notification-daemon
128 notificationdaemon_RUN_DEPENDS= ${notificationdaemon_DETECT}:${PORTSDIR}/deskutils/mate-notification-daemon
130 panel_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatepanelapplet-4.0.pc
131 panel_BUILD_DEPENDS= ${panel_DETECT}:${PORTSDIR}/x11/mate-panel
132 panel_LIB_DEPENDS= libmate-panel-applet-4.so:${PORTSDIR}/x11/mate-panel
133 panel_RUN_DEPENDS= ${panel_DETECT}:${PORTSDIR}/x11/mate-panel
135 polkit_DETECT= ${LOCALBASE}/libdata/pkgconfig/polkit-gtk-mate-1.pc
136 polkit_BUILD_DEPENDS= ${polkit_DETECT}:${PORTSDIR}/sysutils/mate-polkit
137 polkit_LIB_DEPENDS= libpolkit-gtk-mate-1.so:${PORTSDIR}/sysutils/mate-polkit
138 polkit_RUN_DEPENDS= ${polkit_DETECT}:${PORTSDIR}/sysutils/mate-polkit
140 pluma_DETECT= ${LOCALBASE}/libdata/pkgconfig/pluma.pc
141 pluma_BUILD_DEPENDS= ${pluma_DETECT}:${PORTSDIR}/editors/pluma
142 pluma_RUN_DEPENDS= ${pluma_DETECT}:${PORTSDIR}/editors/pluma
144 settingsdaemon_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-settings-daemon.pc
145 settingsdaemon_BUILD_DEPENDS= ${settingsdaemon_DETECT}:${PORTSDIR}/sysutils/mate-settings-daemon
146 settingsdaemon_RUN_DEPENDS= ${settingsdaemon_DETECT}:${PORTSDIR}/sysutils/mate-settings-daemon
148 # End component definition section
151 # End of optional part.
153 .if defined(_POSTMKINCLUDED) && !defined(Mate_Post_Include)
155 Mate_Post_Include= bsd.mate.mk
157 .if defined(USE_MATE)
158 # Comparing between USE_MATE and _USE_MATE_ALL to make sure the component
159 # exists in _USE_MATE_ALL. If it does not exist then give an error about it.
160 #. for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/}
161 . for component in ${USE_MATE:C/^([^:]+).*/\1/}
162 #. for component in ${USE_GNOME:C/^([^:]+).*/\1/}
163 . if ${_USE_MATE_ALL:M${component}}==""
164 .error cannot install: Unknown component USE_MATE=${component}
168 . for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/}
169 . if defined(${component}_PATCH_DEPENDS)
170 PATCH_DEPENDS+= ${${component}_PATCH_DEPENDS}
173 . if defined(${component}_DETECT)
174 . if ${USE_MATE:M${component}\:build}!=""
175 BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS}
176 . elif ${USE_MATE:M${component}\:run}!=""
177 RUN_DEPENDS+= ${${component}_RUN_DEPENDS}
179 . if defined(${component}_LIB_DEPENDS)
180 LIB_DEPENDS+= ${${component}_LIB_DEPENDS}
182 BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS}
183 RUN_DEPENDS+= ${${component}_RUN_DEPENDS}
188 . if defined(${component}_CONFIGURE_TARGET)
189 CONFIGURE_ARGS+=${${component}_CONFIGURE_ARGS}
192 . if defined(${component}_CONFIGURE_ENV)
193 CONFIGURE_ENV+= ${${component}_CONFIGURE_ENV}
196 . if defined(${component}_MAKE_ENV)
197 MAKE_ENV+= ${${component}_MAKE_ENV}
200 . if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET)
201 CONFIGURE_TARGET= ${${component}_CONFIGURE_TARGET}
204 . if defined(${component}_PRE_PATCH)
205 MATE_PRE_PATCH+= ; ${${component}_PRE_PATCH}
208 .endif # USE_MATE check
210 .if ${USE_MATE:Mautogen}!=""
212 CONFIGURE_ENV+= NOCONFIGURE=yes
214 pre-configure: mate-pre-configure
217 @(cd ${CONFIGURE_WRKSRC} ; ${SETENV} ${CONFIGURE_ENV} ./autogen.sh)
220 .if defined(MATE_PRE_PATCH)
222 pre-configure-script: mate-pre-configure-script
224 mate-pre-configure-script:
225 @${MATE_PRE_PATCH:C/^;//1}
228 .if ${MAINTAINER}=="gnome@FreeBSD.org"
229 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."