ports/100497: [PATCH] add include to support EFL-related ports
Stanislav Sedov
ssedov at mbsd.msk.ru
Tue Jul 18 21:20:05 UTC 2006
>Number: 100497
>Category: ports
>Synopsis: [PATCH] add include to support EFL-related ports
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 18 21:20:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Stanislav Sedov
>Release: FreeBSD 7.0-CURRENT i386
>Organization:
MBSD labs, Inc.
>Environment:
System: FreeBSD fonon.realnet 7.0-CURRENT FreeBSD 7.0-CURRENT #7: Sun Jun 18 20:51:36 MSD 2006 root at fonon.realnet:/work/src/fbsd-cur/src/sys/i386/compile/FONON i386
>Description:
Add include for simplify creation of enlightenment-related ports
like entice, enlightenment-devel, elicit, ruby-edje etc.
Currently it handles shared libraries dependencies and CONFIGURE_ENV,
I'll add additional features later as needed.
>How-To-Repeat:
>Fix:
--- Mk.diff begins here ---
diff -ruN Mk.orig/bsd.efl.mk Mk/bsd.efl.mk
--- Mk.orig/bsd.efl.mk Thu Jan 1 03:00:00 1970
+++ Mk/bsd.efl.mk Wed Jul 19 01:03:47 2006
@@ -0,0 +1,190 @@
+#
+# $MBSDlabs: portmk/bsd.efl.mk,v 1.5 2006/07/18 21:03:39 stas Exp $
+# $FreeBSD$
+#
+# bsd.efl.mk - Support for Enlightenment Foundation Libraries (EFL)
+#
+# Author: Stanislav Sedov <ssedov at mbsd.msk.ru>
+# Inspired by bsd.sdl.mk by Edwin Groothuis <edwin at freebsd.org>
+#
+# You can specify EFL-related library dependency using "USE_EFL=" statement,
+# e.g. "USE_EFL= ecore evas" will add x11/ecore and graphics/evas as dependency
+# for your port.
+# You can check existency of certain library throught "WANT_EFL/HAVE_EFL" pair.
+# Note: WANT_EFL should be defined before including <bsd.port.pre.mk>, and
+# HAVE_EFL variable could be tested after it. For example:
+#
+# WANT_EFL= yes
+# .include <bsd.port.pre.mk>
+# .if ${HAVE_EFL:Mesmart}
+# USE_EFL+= esmart
+# .endif
+#
+# Feel free to send any comments and suggestion to maintainer.
+#
+
+EFL_Include_MAINTAINER= ssedov at mbsd.msk.ru
+
+#
+# Define all supported libraries
+#
+_USE_EFL_ALL= ecore edb edje eet embryo emotion engrave epeg epsilon \
+ esmart etox evas ewl exml Imlib2
+
+# For each library supported we define the following variables:
+# _%%LIB%%_CATEGORY - category the port belongs to
+# _%%LIB%%_DEPENDS - other EFL libraries the library
+# itself depends on. We'll define them explicitly
+# to handle unwanted deinstalls.
+# _%%LIB%%_PREFIX - where the library is installed
+# _%%LIB%%_VERSION - version of the shared library
+# _%%LIB%%_SLIB - name of the shared library
+#
+
+_ecore_CATEGORY= x11
+_ecore_DEPENDS= evas
+_ecore_PREFIX= ${X11BASE}
+_ecore_VERSION= 1
+
+_edb_CATEGORY= databases
+_edb_PREFIX= ${LOCALBASE}
+_edb_VERSION= 1
+
+_edje_CATEGORY= graphics
+_edje_DEPENDS= embryo eet imlib2 evas ecore
+_edje_PREFIX= ${LOCALBASE}
+_edje_VERSION= 5
+
+_embryo_CATEGORY= lang
+_embryo_PREFIX= ${LOCALBASE}
+_embryo_VERSION= 9
+
+_emotion_CATEGORY= multimedia
+_emotion_DEPENDS= ecore edje eet embryo evas
+_emotion_PREFIX= ${LOCALBASE}
+_emotion_VERSION= 0
+
+_engrave_CATEGORY= devel
+_engrave_DEPENDS= ecore evas
+_engrave_PREFIX= ${LOCALBASE}
+_engrave_VERSION= 1
+
+_epeg_CATEGORY= graphics
+_epeg_PREFIX= ${LOCALBASE}
+_epeg_VERSION= 9
+
+_epsilon_CATEGORY= graphics
+_epsilon_DEPENDS= epeg edje imlib2 ecore
+_epsilon_PREFIX= ${LOCALBASE}
+_epsilon_VERSION= 0
+
+_esmart_CATEGORY= graphics
+_esmart_DEPENDS= epsilon evas ecore imlib2 edje
+_esmart_PREFIX= ${X11BASE}
+_esmart_VERSION= 0
+
+_etox_CATEGORY= x11-toolkits
+_etox_DEPENDS= edb evas ecore
+_etox_PREFIX= ${X11BASE}
+_etox_VERSION= 0
+
+_evas_CATEGORY= graphics
+_evas_DEPENDS= eet edb
+_evas_PREFIX= ${X11BASE}
+_evas_VERSION= 1
+
+_ewl_CATEGORY= x11-toolkits
+_ewl_DEPENDS= evas ecore edje emotion epsilon
+_ewl_PREFIX= ${X11BASE}
+_ewl_VERSION= 0
+
+_exml_CATEGORY= textproc
+_exml_DEPENDS= ecore
+_exml_PREFIX= ${LOCALBASE}
+_exml_VERSION= 1
+
+_imlib2_CATEGORY= graphics
+_imlib2_PREFIX= ${LOCALBASE}
+_imlib2_VERSION= 3
+_imlib2_SLIB= Imlib2
+
+#
+# Assign values for variables which were not defined explicitly
+#
+.for LIB in ${_USE_EFL_ALL}
+. if !defined(_${LIB}_DEPENDS)
+_${LIB}_DEPENDS=
+. endif
+. if !defined(_${LIB}_SLIB)
+_${LIB}_SLIB=${LIB}
+. endif
+.endfor
+
+#
+# Handle WANT_EFL feature
+#
+.if !defined(AFTERPORTMK)
+.if !defined(EFL_Include_pre)
+
+EFL_Include_pre= bsd.efl.mk
+
+HAVE_EFL?=
+.if defined(WANT_EFL)
+. for LIB in ${_USE_EFL_ALL}
+. if exists(${_${LIB}_PREFIX}/lib/lib${_${LIB}_SLIB}.so.${_${LIB}_VERSION})
+HAVE_EFL+= ${LIB}
+. endif
+. endfor
+.endif
+
+.endif #EFL_Include_pre
+.endif #AFTERPORTMK
+
+#
+# Handle USE_EFL feature
+#
+.if !defined(BEFOREPORTMK)
+.if !defined(EFL_Include_post)
+
+.if defined(USE_EFL)
+
+EFL_Include_post= bsd.efl.mk
+
+#
+# Check if we have all libraries requiested and build depends list
+#
+_USE_EFL=
+.for LIB in ${USE_EFL}
+. if ${_USE_EFL_ALL:M${LIB}}==""
+IGNORE= cannot install: unknown library ${LIB}
+. endif
+_USE_EFL+= ${_${LIB}_DEPENDS} ${LIB}
+.endfor
+
+#
+# Get rid of duplicates
+#
+_USE_EFL_UQ=
+.for LIB in ${_USE_EFL}
+. if ${_USE_EFL_UQ:M${LIB}}==""
+_USE_EFL_UQ+= ${LIB}
+. endif
+.endfor
+
+#
+# define dependencies
+#
+.for LIB in ${_USE_EFL_UQ}
+LIB_DEPENDS+= ${_${LIB}_SLIB}.${_${LIB}_VERSION}:${PORTSDIR}/${_${LIB}_CATEGORY}/${LIB}
+.endfor
+
+#
+# Initialize configure enviropment
+#
+CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
+ CFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
+
+.endif #USE_EFL
+.endif #EFL_Include_post
+.endif #BEFOREPORTMK
diff -ruN Mk.orig/bsd.port.mk Mk/bsd.port.mk
--- Mk.orig/bsd.port.mk Wed Jul 19 01:05:12 2006
+++ Mk/bsd.port.mk Wed Jul 19 00:47:45 2006
@@ -403,6 +403,9 @@
# USE_SCONS - If set, this port uses the Python-based SCons build system
# See bsd.scons.mk for more details.
##
+# USE_EFL - If set, this port use EFL libraries.
+# Implies inclusion of bsd.efl.mk. (Also see
+# that file for more information on USE_EFL_*).
# USE_JAVA - If set, this port relies on the Java language.
# Implies inclusion of bsd.java.mk. (Also see
# that file for more information on USE_JAVA_*).
@@ -1386,6 +1389,10 @@
.include "${PORTSDIR}/Mk/bsd.python.mk"
.endif
+.if defined(USE_EFL) || defined(WANT_EFL)
+.include "${PORTSDIR}/Mk/bsd.efl.mk"
+.endif
+
.if defined(USE_JAVA)
.include "${PORTSDIR}/Mk/bsd.java.mk"
.endif
@@ -1852,6 +1859,10 @@
.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER80)
.include "${PORTSDIR}/Mk/bsd.gstreamer.mk"
+.endif
+
+.if defined(USE_EFL) || defined(WANT_EFL)
+.include "${PORTSDIR}/Mk/bsd.efl.mk"
.endif
.if defined(USE_JAVA)
--- Mk.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list