Line 0
Link Here
|
|
|
1 |
# |
2 |
# $MBSDlabs: portmk/bsd.efl.mk,v 1.5 2006/07/18 21:03:39 stas Exp $ |
3 |
# $FreeBSD$ |
4 |
# |
5 |
# bsd.efl.mk - Support for Enlightenment Foundation Libraries (EFL) |
6 |
# |
7 |
# Author: Stanislav Sedov <ssedov@mbsd.msk.ru> |
8 |
# Inspired by bsd.sdl.mk by Edwin Groothuis <edwin@freebsd.org> |
9 |
# |
10 |
# You can specify EFL-related library dependency using "USE_EFL=" statement, |
11 |
# e.g. "USE_EFL= ecore evas" will add x11/ecore and graphics/evas as dependency |
12 |
# for your port. |
13 |
# You can check existency of certain library throught "WANT_EFL/HAVE_EFL" pair. |
14 |
# Note: WANT_EFL should be defined before including <bsd.port.pre.mk>, and |
15 |
# HAVE_EFL variable could be tested after it. For example: |
16 |
# |
17 |
# WANT_EFL= yes |
18 |
# .include <bsd.port.pre.mk> |
19 |
# .if ${HAVE_EFL:Mesmart} |
20 |
# USE_EFL+= esmart |
21 |
# .endif |
22 |
# |
23 |
# Feel free to send any comments and suggestion to maintainer. |
24 |
# |
25 |
|
26 |
EFL_Include_MAINTAINER= ssedov@mbsd.msk.ru |
27 |
|
28 |
# |
29 |
# Define all supported libraries |
30 |
# |
31 |
_USE_EFL_ALL= ecore edb edje eet embryo emotion engrave epeg epsilon \ |
32 |
esmart etox evas ewl exml Imlib2 |
33 |
|
34 |
# For each library supported we define the following variables: |
35 |
# _%%LIB%%_CATEGORY - category the port belongs to |
36 |
# _%%LIB%%_DEPENDS - other EFL libraries the library |
37 |
# itself depends on. We'll define them explicitly |
38 |
# to handle unwanted deinstalls. |
39 |
# _%%LIB%%_PREFIX - where the library is installed |
40 |
# _%%LIB%%_VERSION - version of the shared library |
41 |
# _%%LIB%%_SLIB - name of the shared library |
42 |
# |
43 |
|
44 |
_ecore_CATEGORY= x11 |
45 |
_ecore_DEPENDS= evas |
46 |
_ecore_PREFIX= ${X11BASE} |
47 |
_ecore_VERSION= 1 |
48 |
|
49 |
_edb_CATEGORY= databases |
50 |
_edb_PREFIX= ${LOCALBASE} |
51 |
_edb_VERSION= 1 |
52 |
|
53 |
_edje_CATEGORY= graphics |
54 |
_edje_DEPENDS= embryo eet imlib2 evas ecore |
55 |
_edje_PREFIX= ${LOCALBASE} |
56 |
_edje_VERSION= 5 |
57 |
|
58 |
_embryo_CATEGORY= lang |
59 |
_embryo_PREFIX= ${LOCALBASE} |
60 |
_embryo_VERSION= 9 |
61 |
|
62 |
_emotion_CATEGORY= multimedia |
63 |
_emotion_DEPENDS= ecore edje eet embryo evas |
64 |
_emotion_PREFIX= ${LOCALBASE} |
65 |
_emotion_VERSION= 0 |
66 |
|
67 |
_engrave_CATEGORY= devel |
68 |
_engrave_DEPENDS= ecore evas |
69 |
_engrave_PREFIX= ${LOCALBASE} |
70 |
_engrave_VERSION= 1 |
71 |
|
72 |
_epeg_CATEGORY= graphics |
73 |
_epeg_PREFIX= ${LOCALBASE} |
74 |
_epeg_VERSION= 9 |
75 |
|
76 |
_epsilon_CATEGORY= graphics |
77 |
_epsilon_DEPENDS= epeg edje imlib2 ecore |
78 |
_epsilon_PREFIX= ${LOCALBASE} |
79 |
_epsilon_VERSION= 0 |
80 |
|
81 |
_esmart_CATEGORY= graphics |
82 |
_esmart_DEPENDS= epsilon evas ecore imlib2 edje |
83 |
_esmart_PREFIX= ${X11BASE} |
84 |
_esmart_VERSION= 0 |
85 |
|
86 |
_etox_CATEGORY= x11-toolkits |
87 |
_etox_DEPENDS= edb evas ecore |
88 |
_etox_PREFIX= ${X11BASE} |
89 |
_etox_VERSION= 0 |
90 |
|
91 |
_evas_CATEGORY= graphics |
92 |
_evas_DEPENDS= eet edb |
93 |
_evas_PREFIX= ${X11BASE} |
94 |
_evas_VERSION= 1 |
95 |
|
96 |
_ewl_CATEGORY= x11-toolkits |
97 |
_ewl_DEPENDS= evas ecore edje emotion epsilon |
98 |
_ewl_PREFIX= ${X11BASE} |
99 |
_ewl_VERSION= 0 |
100 |
|
101 |
_exml_CATEGORY= textproc |
102 |
_exml_DEPENDS= ecore |
103 |
_exml_PREFIX= ${LOCALBASE} |
104 |
_exml_VERSION= 1 |
105 |
|
106 |
_imlib2_CATEGORY= graphics |
107 |
_imlib2_PREFIX= ${LOCALBASE} |
108 |
_imlib2_VERSION= 3 |
109 |
_imlib2_SLIB= Imlib2 |
110 |
|
111 |
# |
112 |
# Assign values for variables which were not defined explicitly |
113 |
# |
114 |
.for LIB in ${_USE_EFL_ALL} |
115 |
. if !defined(_${LIB}_DEPENDS) |
116 |
_${LIB}_DEPENDS= |
117 |
. endif |
118 |
. if !defined(_${LIB}_SLIB) |
119 |
_${LIB}_SLIB=${LIB} |
120 |
. endif |
121 |
.endfor |
122 |
|
123 |
# |
124 |
# Handle WANT_EFL feature |
125 |
# |
126 |
.if !defined(AFTERPORTMK) |
127 |
.if !defined(EFL_Include_pre) |
128 |
|
129 |
EFL_Include_pre= bsd.efl.mk |
130 |
|
131 |
HAVE_EFL?= |
132 |
.if defined(WANT_EFL) |
133 |
. for LIB in ${_USE_EFL_ALL} |
134 |
. if exists(${_${LIB}_PREFIX}/lib/lib${_${LIB}_SLIB}.so.${_${LIB}_VERSION}) |
135 |
HAVE_EFL+= ${LIB} |
136 |
. endif |
137 |
. endfor |
138 |
.endif |
139 |
|
140 |
.endif #EFL_Include_pre |
141 |
.endif #AFTERPORTMK |
142 |
|
143 |
# |
144 |
# Handle USE_EFL feature |
145 |
# |
146 |
.if !defined(BEFOREPORTMK) |
147 |
.if !defined(EFL_Include_post) |
148 |
|
149 |
.if defined(USE_EFL) |
150 |
|
151 |
EFL_Include_post= bsd.efl.mk |
152 |
|
153 |
# |
154 |
# Check if we have all libraries requiested and build depends list |
155 |
# |
156 |
_USE_EFL= |
157 |
.for LIB in ${USE_EFL} |
158 |
. if ${_USE_EFL_ALL:M${LIB}}=="" |
159 |
IGNORE= cannot install: unknown library ${LIB} |
160 |
. endif |
161 |
_USE_EFL+= ${_${LIB}_DEPENDS} ${LIB} |
162 |
.endfor |
163 |
|
164 |
# |
165 |
# Get rid of duplicates |
166 |
# |
167 |
_USE_EFL_UQ= |
168 |
.for LIB in ${_USE_EFL} |
169 |
. if ${_USE_EFL_UQ:M${LIB}}=="" |
170 |
_USE_EFL_UQ+= ${LIB} |
171 |
. endif |
172 |
.endfor |
173 |
|
174 |
# |
175 |
# define dependencies |
176 |
# |
177 |
.for LIB in ${_USE_EFL_UQ} |
178 |
LIB_DEPENDS+= ${_${LIB}_SLIB}.${_${LIB}_VERSION}:${PORTSDIR}/${_${LIB}_CATEGORY}/${LIB} |
179 |
.endfor |
180 |
|
181 |
# |
182 |
# Initialize configure enviropment |
183 |
# |
184 |
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \ |
185 |
CFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \ |
186 |
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" |
187 |
|
188 |
.endif #USE_EFL |
189 |
.endif #EFL_Include_post |
190 |
.endif #BEFOREPORTMK |