aboutsummaryrefslogtreecommitdiff
path: root/Mk/Uses/gnustep.mk
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-04-09 07:44:41 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-04-09 07:44:41 +0000
commit06f79b66f2eb028c4ab81977dcb1e010ef9cf946 (patch)
treeb7aed86ac84412d11603ce23b7893d46f0d7475b /Mk/Uses/gnustep.mk
parent5c3f57fd49a53ee36e7a7bc6263e4dd1fd331c27 (diff)
downloadports-06f79b66f2eb028c4ab81977dcb1e010ef9cf946.tar.gz
ports-06f79b66f2eb028c4ab81977dcb1e010ef9cf946.zip
Convert bsd.gnustep.mk to USES=gnustep
Simplify gnustep ports Hook into the regular ports framework: - LIB_DEPENDS for library dependencies - Use regular USE_LDCONFIG Reuse USES=objc (automatic) USE_GNUSTEP is now a macro to set the dependencies and build feature needed. Accepted arguments: back base build gui Merge deskutils/preferencepanes into deskutils/systempreferences
Notes
Notes: svn path=/head/; revision=383626
Diffstat (limited to 'Mk/Uses/gnustep.mk')
-rw-r--r--Mk/Uses/gnustep.mk79
1 files changed, 79 insertions, 0 deletions
diff --git a/Mk/Uses/gnustep.mk b/Mk/Uses/gnustep.mk
new file mode 100644
index 000000000000..3029171fabfc
--- /dev/null
+++ b/Mk/Uses/gnustep.mk
@@ -0,0 +1,79 @@
+# $FreeBSD$
+#
+# Handle GNUstep related ports
+#
+# Feature: gnustep
+# Usage: USES=gnustep
+#
+# Defined specific dependencies under USE_GNUSTEP
+# Expected arguments for USE_GNUSTEP:
+#
+# base: depends on the gnustep-base port
+# gui: depends on the gnustep-gui port
+# back: depends on the gnustep-back port
+# build: prepare the build dependencies for a regular GNUstep port
+#
+
+.if !defined(_INCLUDE_USES_GNUSTEP_MK)
+_INCLUDE_USES_GNUSTEP_MK= yes
+.include "${USESDIR}/gmake.mk"
+
+GNUSTEP_PREFIX?= ${LOCALBASE}/GNUstep
+DEFAULT_LIBVERSION?= 0.0.1
+
+GNUSTEP_SYSTEM_ROOT= ${GNUSTEP_PREFIX}/System
+GNUSTEP_MAKEFILES= ${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles
+GNUSTEP_SYSTEM_LIBRARIES= ${GNUSTEP_SYSTEM_ROOT}/Library/Libraries
+GNUSTEP_SYSTEM_TOOLS= ${GNUSTEP_SYSTEM_ROOT}/Tools
+
+GNUSTEP_LOCAL_ROOT= ${GNUSTEP_PREFIX}/Local
+GNUSTEP_LOCAL_LIBRARIES= ${GNUSTEP_LOCAL_ROOT}/Library/Libraries
+GNUSTEP_LOCAL_TOOLS= ${GNUSTEP_LOCAL_ROOT}/Tools
+
+LIB_DIRS+= ${GNUSTEP_SYSTEM_LIBRARIES} \
+ ${GNUSTEP_LOCAL_LIBRARIES}
+
+.for a in FLAGS CFLAGS CPPFLAGS OBJCFLAGS INCLUDE_DIRS LDFLAGS LIB_DIRS
+MAKE_ENV+= ADDITIONAL_${a}="${ADDITIONAL_${a}}"
+.endfor
+
+MAKEFILE= GNUmakefile
+#MAKE_ENV+= GNUSTEP_CONFIG_FILE=${PORTSDIR}/devel/gnustep-make/files/GNUstep.conf
+GNU_CONFIGURE_PREFIX= ${GNUSTEP_PREFIX}
+
+.if ${MACHINE_ARCH} == "i386"
+GNU_ARCH= ix86
+.else
+GNU_ARCH= ${MACHINE_ARCH}
+.endif
+
+PLIST_SUB+= GNU_ARCH=${GNU_ARCH} VERSION=${PORTVERSION}
+PLIST_SUB+= MAJORVERSION=${PORTVERSION:C/([0-9]).*/\1/1}
+PLIST_SUB+= LIBVERSION=${DEFAULT_LIBVERSION}
+PLIST_SUB+= MAJORLIBVERSION=${DEFAULT_LIBVERSION:C/([0-9]).*/\1/1}
+
+.if defined(USE_GNUSTEP)
+. if ${USE_GNUSTEP:Mbase}
+LIB_DEPENDS+= libgnustep-base.so:${PORTSDIR}/lang/gnustep-base
+. endif
+
+. if ${USE_GNUSTEP:Mbuild}
+PATH:= ${GNUSTEP_SYSTEM_TOOLS}:${GNUSTEP_LOCAL_TOOLS}:${PATH}
+MAKE_ENV+= PATH="${PATH}" GNUSTEP_MAKEFILES="${GNUSTEP_MAKEFILES}" GNUSTEP_SYSTEM_ROOT="${GNUSTEP_SYSTEM_ROOT}"
+CONFIGURE_ENV+= PATH="${PATH}" GNUSTEP_MAKEFILES="${GNUSTEP_MAKEFILES}" GNUSTEP_SYSTEM_ROOT="${GNUSTEP_SYSTEM_ROOT}"
+BUILD_DEPENDS+= gnustep-make>0:${PORTSDIR}/devel/gnustep-make
+.include "${USESDIR}/objc.mk"
+. endif
+
+. if ${USE_GNUSTEP:Mgui}
+LIB_DEPENDS+= libgnustep-gui.so:${PORTSDIR}/x11-toolkits/gnustep-gui
+. endif
+
+. if ${USE_GNUSTEP:Mback}
+BUILD_DEPENDS+= gnustep-back>0:${PORTSDIR}/x11-toolkits/gnustep-back
+RUN_DEPENDS+= gnustep-back>0:${PORTSDIR}/x11-toolkits/gnustep-back
+. endif
+
+.endif
+
+.endif