View | Details | Raw Unified | Return to bug 50479
Collapse All | Expand All

(-)bsd.gnustep.mk (+185 lines)
Added Link Here
1
#
2
# $FreeBSD$
3
#
4
# This file contains some variable definitions that are supposed to
5
# make your life easier when dealing with ports related to the GNUstep.
6
#
7
#
8
# Options for user to customize in /etc/make.conf:
9
# ================================================
10
#
11
# WANT_GNUSTEP_XDPS=yes
12
#	use xdps as backend instead of xlib.
13
#
14
# WANT_GNUSTEP_LIBART=yes
15
#	use libart as backend instead of xlib.
16
#
17
#
18
# Options for a port before include this file:
19
# ============================================
20
#
21
# USE_GNUSTEP_BASE=yes
22
#	your port depends on the gnustep-base port.
23
#
24
# USE_GNUSTEP_GUI=yes
25
#	your port depends on the gnustep-gui port.
26
#
27
# USE_GNUSTEP_BACK=yes
28
#	your port depends on teh gnustep-back port.
29
#
30
# USE_GNUSTEP_CONFIGURE=yes
31
#	call configure script with GNUstep.sh sourced in the current shell
32
#
33
# USE_GNUSTEP_BUILD=yes
34
#	call build target with GNUstep.sh sourced in the current shell
35
#
36
# USE_GNUSTEP_INSTALL=yes
37
#	call install target with GNUstep.sh sourced in the current shell
38
# 
39
40
# ---------------------------------------------------------------------------
41
.if !defined(_POSTMKINCLUDED)
42
43
GNUstep_Include_MAINTAINER=	dinoex@FreeBSD.org
44
45
BUILD_DEPENDS+=	${LOCALBASE}/lib/libcallback.a:${PORTSDIR}/devel/ffcall
46
LIB_DEPENDS+=	objc:${PORTSDIR}/${GNUSTEP_OBJC_PORT}
47
48
GNUSTEP_MAKE_PORT?=	devel/gnustep-make
49
GNUSTEP_OBJC_PORT?=	lang/gnustep-objc
50
GNUSTEP_BASE_PORT?=	lang/gnustep-base
51
GNUSTEP_GUI_PORT?=	x11-toolkits/gnustep-gui
52
GNUSTEP_BACK_PORT?=	x11-toolkits/gnustep-back
53
GNUSTEP_XDPS_PORT?=	x11-toolkits/gnustep-xdps
54
GNUSTEP_ART_PORT?=	x11-toolkits/gnustep-art
55
56
.if ${MACHINE_ARCH} == "i386"
57
GNU_ARCH=	ix86
58
.else
59
GNU_ARCH=	${MACHINE_ARCH}
60
.endif
61
62
PLIST_SUB+=	GNU_ARCH=${GNU_ARCH} OPSYS=${OPSYS:L} VERSION=${PORTVERSION}
63
PLIST_SUB+=	MAJORVERSION=${PORTVERSION:C/([0-9]).*/\1/1}
64
65
SYSTEMDIR=	${PREFIX}/System
66
SYSMAKEDIR=	${SYSTEMDIR}/Makefiles
67
SYSLIBDIR=	${SYSTEMDIR}/Libraries/${GNU_ARCH}/${OPSYS:L}
68
COMBOLIBDIR=	${SYSTEMDIR}/Libraries/${GNU_ARCH}/${OPSYS:L}/gnu-gnu-gnu
69
BUNDLEDIR=	${SYSTEMDIR}/Library/Bundles
70
COMBOPATH=	${GNU_ARCH}/${OPSYS:L}/gnu-gnu-gnu
71
LOCALLIBDIR=	${PREFIX}/Local/Libraries/${COMBOPATH}
72
CC=		gcc32
73
CXX=		g++32
74
75
# ---------------------------------------------------------------------------
76
# using base
77
#
78
.if defined(USE_GNUSTEP_BASE)
79
BUILD_DEPENDS+=	${COMBOLIBDIR}/libgnustep-base.so:${PORTSDIR}/${GNUSTEP_BASE_PORT}
80
RUN_DEPENDS+=	${COMBOLIBDIR}/libgnustep-base.so:${PORTSDIR}/${GNUSTEP_BASE_PORT}
81
.endif
82
83
# ---------------------------------------------------------------------------
84
# using gui
85
#
86
.if defined(USE_GNUSTEP_GUI)
87
BUILD_DEPENDS+=	${COMBOLIBDIR}/libgnustep-gui.so:${PORTSDIR}/${GNUSTEP_GUI_PORT}
88
RUN_DEPENDS+=	${COMBOLIBDIR}/libgnustep-gui.so:${PORTSDIR}/${GNUSTEP_GUI_PORT}
89
.endif
90
91
# ---------------------------------------------------------------------------
92
# using any backend
93
#
94
.if defined(USE_GNUSTEP_BACK)
95
.if defined(WANT_GNUSTEP_XDPS)
96
GNUSTEP_WITH_XDPS=yes
97
.else
98
.if defined(WANT_GNUSTEP_LIBART)
99
USE_GNUSTEP_LIBART=yes
100
.else
101
USE_GNUSTEP_XLIB=yes
102
.endif
103
.endif
104
.endif
105
106
# ---------------------------------------------------------------------------
107
# Backend using xlib
108
#
109
.if defined(USE_GNUSTEP_XLIB)
110
BUILD_DEPENDS+=	${BACKBUNDLEDIR}/libgnustep-back:${PORTSDIR}/${GNUSTEP_BACK_PORT}
111
RUN_DEPENDS+=	${BACKBUNDLEDIR}/libgnustep-back:${PORTSDIR}/${GNUSTEP_BACK_PORT}
112
113
BACKBUNDLEDIR=	${BUNDLEDIR}/libgnustep-back.bundle/${COMBOPATH}
114
MAKE_FLAGS+=	GUI_BACKEND_LIB=back
115
.endif
116
117
# ---------------------------------------------------------------------------
118
# Backend using xdps
119
#
120
.if defined(USE_GNUSTEP_XDPS)
121
BUILD_DEPENDS+=	${BACKBUNDLEDIR}/libgnustep-xdps:${PORTSDIR}/${GNUSTEP_XDPS_PORT}
122
RUN_DEPENDS+=	${BACKBUNDLEDIR}/libgnustep-xdps:${PORTSDIR}/${GNUSTEP_XDPS_PORT}
123
124
BACKBUNDLEDIR=	${BUNDLEDIR}/libgnustep-xdps.bundle/${COMBOPATH}
125
MAKE_FLAGS+=	GUI_BACKEND_LIB=xdps
126
.endif
127
128
# ---------------------------------------------------------------------------
129
# Backend using libart
130
#
131
.if defined(USE_GNUSTEP_LIBART)
132
BUILD_DEPENDS+=	${BACKBUNDLEDIR}/libgnustep-art:${PORTSDIR}/${GNUSTEP_ART_PORT}
133
RUN_DEPENDS+=	${BACKBUNDLEDIR}/libgnustep-art:${PORTSDIR}/${GNUSTEP_ART_PORT}
134
135
BACKBUNDLEDIR=	${BUNDLEDIR}/libgnustep-art.bundle/${COMBOPATH}
136
MAKE_FLAGS+=	GUI_BACKEND_LIB=art
137
.endif
138
139
# ---------------------------------------------------------------------------
140
# source GNUstep.sh
141
#
142
.if defined(USE_GNUSTEP_CONFIGURE)
143
do-configure:
144
	@(cd ${CONFIGURE_WRKSRC}; . ${SYSMAKEDIR}/GNUstep.sh; \
145
	    if ! ${SETENV} CC="${CC}" CXX="${CXX}" \
146
		CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
147
		INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \
148
		INSTALL_DATA="${INSTALL} -c" \
149
		INSTALL_PROGRAM="${INSTALL} -c" \
150
		INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
151
		${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}; then \
152
		    ${ECHO} "===>  Script \"${CONFIGURE_SCRIPT}\" failed: here are the contents of \"${CONFIGURE_LOG}\""; \
153
		    ${CAT} ${CONFIGURE_LOG}; \
154
		    ${ECHO} "(end of \"${CONFIGURE_LOG}\")"; \
155
		    ${FALSE}; \
156
	    fi)
157
.endif
158
159
# ---------------------------------------------------------------------------
160
# source GNUstep.sh
161
#
162
.if defined(USE_GNUSTEP_BUILD)
163
BUILD_DEPENDS+=	${SYSMAKEDIR}/GNUstep.sh:${PORTSDIR}/${GNUSTEP_MAKE_PORT}
164
165
do-build:
166
	@(cd ${WRKSRC}; . ${SYSMAKEDIR}/GNUstep.sh; \
167
		${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
168
169
.endif
170
171
# ---------------------------------------------------------------------------
172
# source GNUstep.sh
173
#
174
.if defined(USE_GNUSTEP_INSTALL)
175
RUN_DEPENDS+=	${SYSMAKEDIR}/GNUstep.sh:${PORTSDIR}/${GNUSTEP_MAKE_PORT}
176
177
do-install:
178
	@(cd ${WRKSRC}; . ${SYSMAKEDIR}/GNUstep.sh; \
179
		${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
180
181
.endif
182
183
.endif
184
185
# eof
(-)bsd.port.mk (-41 / +13 lines)
Lines 927-971 Link Here
927
.endif # !defined(PERL_LEVEL) && defined(PERL_VERSION)
927
.endif # !defined(PERL_LEVEL) && defined(PERL_VERSION)
928
928
929
.if defined(USE_OPENSSL)
929
.if defined(USE_OPENSSL)
930
.if ${OSVERSION} >= 400014
930
.include "${PORTSDIR}/security/openssl/Makefile.ssl"
931
.if !exists(/usr/lib/libcrypto.so)
932
.BEGIN:
933
	@${ECHO_CMD} "This port requires the OpenSSL library, which is part of"
934
	@${ECHO_CMD} "the FreeBSD crypto distribution but not installed on your"
935
	@${ECHO_CMD} "machine. Please see the \"OpenSSL\" section in the handbook"
936
	@${ECHO_CMD} "(at \"http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/openssl.html\", for instance)"
937
	@${ECHO_CMD} "for instructions on how to obtain and install the FreeBSD"
938
	@${ECHO_CMD} "OpenSSL distribution."
939
	@${FALSE}
940
.else
941
OPENSSLBASE=	/usr
942
OPENSSLDIR=		/etc/ssl
943
# OpenSSL in the base system may not include IDEA for patent licensing reasons.
944
.if defined(MAKE_IDEA) && !defined(OPENSSL_IDEA)
945
OPENSSL_IDEA=	${MAKE_IDEA}
946
.else
947
OPENSSL_IDEA?=	NO
948
.endif
949
.if ${OPENSSL_IDEA} == "NO"
950
# XXX This is a hack to work around the fact that /etc/make.conf clobbers
951
#     our CFLAGS. It might not be enough for all future ports.
952
.if defined(HAS_CONFIGURE)
953
CFLAGS+=		-DNO_IDEA
954
.else
955
OPENSSL_CFLAGS+=-DNO_IDEA
956
.endif
957
MAKE_ARGS+=		OPENSSL_CFLAGS="${OPENSSL_CFLAGS}"
958
.endif
959
.endif
960
.else
961
LIB_DEPENDS+=	crypto.2:${PORTSDIR}/security/openssl
962
OPENSSLBASE?=	${LOCALBASE}
963
OPENSSLDIR?=	${OPENSSLBASE}/openssl
964
.endif
965
OPENSSLLIB=		${OPENSSLBASE}/lib
966
OPENSSLINC=		${OPENSSLBASE}/include
967
MAKE_ENV+=		OPENSSLLIB=${OPENSSLLIB} OPENSSLINC=${OPENSSLINC} \
968
				OPENSSLBASE=${OPENSSLBASE} OPENSSLDIR=${OPENSSLDIR}
969
.endif
931
.endif
970
932
971
.if defined(EMACS_PORT_NAME)
933
.if defined(EMACS_PORT_NAME)
Lines 3496-3502 Link Here
3496
			else \
3458
			else \
3497
				if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
3459
				if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
3498
					subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
3460
					subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
3499
					if [ -r "$${subpkgfile}" ]; then \
3461
					if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
3500
						${ECHO_MSG} "===>   Installing existing package $${subpkgfile}"; \
3462
						${ECHO_MSG} "===>   Installing existing package $${subpkgfile}"; \
3501
						${PKG_ADD} $${subpkgfile}; \
3463
						${PKG_ADD} $${subpkgfile}; \
3502
					else \
3464
					else \
Lines 3550-3556 Link Here
3550
			if [ ! -d "$$dir" ]; then \
3512
			if [ ! -d "$$dir" ]; then \
3551
				${ECHO_MSG} "     >> No directory for $$lib.  Skipping.."; \
3513
				${ECHO_MSG} "     >> No directory for $$lib.  Skipping.."; \
3552
			else \
3514
			else \
3553
				(cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
3515
				if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
3516
					subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
3517
					if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
3518
						${ECHO_MSG} "===>   Installing existing package $${subpkgfile}"; \
3519
						${PKG_ADD} $${subpkgfile}; \
3520
					else \
3521
					  (cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
3522
					fi; \
3523
				else \
3524
					(cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
3525
				fi ; \
3554
				${ECHO_MSG} "===>   Returning to build of ${PKGNAME}"; \
3526
				${ECHO_MSG} "===>   Returning to build of ${PKGNAME}"; \
3555
				if ! ${LDCONFIG} -r | ${GREP} -qwE -e "-l$$pattern"; then \
3527
				if ! ${LDCONFIG} -r | ${GREP} -qwE -e "-l$$pattern"; then \
3556
					${ECHO_MSG} "Error: shared library \"$$lib\" does not exist"; \
3528
					${ECHO_MSG} "Error: shared library \"$$lib\" does not exist"; \

Return to bug 50479