Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 54773 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/eclass/gnustep.eclass (-86 / +70 lines)
Lines 1-45 Link Here
1
# Copyright 1999-2004 Gentoo Foundation
1
# Copyright 1999-2004 Gentoo Technologies, Inc.
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep.eclass,v 1.8 2004/06/25 00:39:48 vapier Exp $
3
# $Header: $
4
4
5
ECLASS=gnustep
5
ECLASS=gnustep
6
INHERITED="$INHERITED $ECLASS"
6
INHERITED="$INHERITED $ECLASS"
7
7
8
DESCRIPTION="Based on the gnustep eclass."
8
DESCRIPTION="EClass designed to facilitate building GNUstep Apps, Frameworks, and Bundles on Gentoo."
9
9
10
DEPEND="dev-util/gnustep-make
10
DEPEND="virtual/glibc
11
	dev-util/gnustep-base
11
	>=sys-devel/gcc-3.0.4
12
	sys-devel/gcc
12
	gnustep-base/gnustep-make
13
	virtual/glibc"
13
	gnustep-base/gnustep-base
14
RDEPEND="virtual/glibc"
14
	gnustep-base/gnustep-gui
15
15
	virtual/gnustep-back"
16
getsourcedir() {
16
RDEPEND="${DEPEND}
17
	if [ ! -d "${S}" ] ; then
17
	gnustep-base/gnustep-env"
18
		if [ -d "${WORKDIR}/${PN}" ] ; then
19
			S="${WORKDIR}/${PN}"
20
		elif [ -d "${WORKDIR}/${P}" ] ; then
21
			S="${WORKDIR}/${P}"
22
		else
23
			die "Cannot find source directory!"
24
		fi
25
	fi
26
}
27
28
need-gnustep-gui() {
29
	if [ "$1" ] ; then
30
		DEPEND="${DEPEND} >=dev-util/gnustep-gui-$1"
31
		RDEPEND="${RDEPEND} >=dev-util/gnustep-back-$1"
32
	else
33
		DEPEND="${DEPEND} dev-util/gnustep-gui"
34
		RDEPEND="${RDEPEND} dev-util/gnustep-back"
35
	fi
36
}
37
18
38
egnustepmake() {
19
egnustepmake() {
39
	getsourcedir
20
#	einfo "*^%*%*(&^&^*^&^(*&^(*^"
40
21
#	einfo "HOME: ${HOME}"
41
	addwrite /root/GNUstep/Defaults/.GNUstepDefaults.lck
22
#	einfo "whoami: `whoami`"
42
	addpredict /root/GNUstep	
23
#	einfo "*^%*%*(&^&^*^&^(*&^(*^"
24
#	einfo "where? ${HOME}/GNUstep/Defaults/.GNUstepDefaults.lck"
25
	addwrite ${HOME}/GNUstep
26
	addwrite ${HOME}/GNUstep/Library
27
	addwrite ${HOME}/GNUstep/Defaults/.GNUstepDefaults.lck
28
	addwrite ${HOME}/GNUstep/Library/Services/.GNUstepServices
29
	addwrite ${HOME}/GNUstep/Library/Services/.GNUstepAppList
43
30
44
	cd ${S}
31
	cd ${S}
45
32
Lines 55-89 Link Here
55
	mkdir -p $TMP/fakehome/GNUstep
42
	mkdir -p $TMP/fakehome/GNUstep
56
43
57
	if [ -x configure ] ; then
44
	if [ -x configure ] ; then
58
		if [ -z "$*" ] ; then
45
		./configure \
59
			./configure \
46
		HOME=$TMP/fakehome \
60
				HOME=$TMP/fakehome \
47
		GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
61
				GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
48
		$* || die "configure failed"
62
				|| die "configure failed"
63
		else
64
			./configure \
65
				HOME=$TMP/fakehome \
66
				GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
67
				$* || die "configure failed (options: $*)"
68
		fi
69
	fi
49
	fi
70
50
71
	if [ "${GNUSTEPBACK_XFT}" != "2" ] ; then
72
		if [ "${PN}" = "gnustep-back" ] ; then
73
			if [ ! -f "/usr/X11R6/include/X11/Xft1/Xft.h" ]; then
74
				sed "s,^#define HAVE_XFT.*,#undef HAVE_XFT,g" config.h > config.h.new
75
				sed "s,^#define HAVE_UTF8.*,#undef HAVE_UTF8,g" config.h.new > config.h
76
				sed "s,^WITH_XFT=.*,WITH_XFT=no," config.make > config.make.new
77
				sed "s,-lXft,," config.make.new > config.make
78
			fi
79
		fi
80
	fi
81
	
82
	if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
51
	if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
83
		make \
52
		make \
84
			HOME=$TMP/fakehome \
53
			HOME=$TMP/fakehome \
85
			GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
54
			GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
86
			|| die "emake failed"
55
			messages=yes \
56
			all || die "emake failed"
87
	else
57
	else
88
		die "no Makefile found"
58
		die "no Makefile found"
89
	fi
59
	fi
Lines 91-100 Link Here
91
}
61
}
92
62
93
egnustepinstall() {
63
egnustepinstall() {
94
	getsourcedir
64
#	einfo "*^%*%*(&^&^*^&^(*&^(*^"
95
65
#	einfo "HOME: ${HOME}"
66
#	einfo "whoami: `whoami`"
67
#	einfo "where? ${HOME}/GNUstep/Defaults/.GNUstepDefaults.lck"
68
#	einfo "*^%*%*(&^&^*^&^(*&^(*^"
69
	addwrite /root/GNUstep
70
	addwrite /root/GNUstep/Library
96
	addwrite /root/GNUstep/Defaults/.GNUstepDefaults.lck
71
	addwrite /root/GNUstep/Defaults/.GNUstepDefaults.lck
97
	addpredict /root/GNUstep	
72
	addwrite /root/GNUstep/Library/Services/.GNUstepServices
73
	addwrite /root/GNUstep/Library/Services/.GNUstepAppList
98
74
99
	cd ${S}
75
	cd ${S}
100
	
76
	
Lines 106-143 Link Here
106
82
107
	mkdir -p $TMP/fakehome/GNUstep
83
	mkdir -p $TMP/fakehome/GNUstep
108
84
85
	# Install packages into GNUSTEP_SYSTEM_ROOT
86
	# Why?
87
	# According to filesystem.ps, SYSTEM is for specific
88
	#  system apps and packages installed by the distributor,
89
	#  i.e. Gentoo.
109
	if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
90
	if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
110
		# To be or not to be evil?
91
		make \
111
		# Should all the roots point at GNUSTEP_SYSTEM_ROOT to force
92
			GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
112
		# install?
93
			HOME=$TMP/fakehome \
113
		# GNUSTEP_USER_ROOT must be GNUSTEP_SYSTEM_ROOT, some malformed
94
			INSTALL_ROOT_DIR=${D} \
114
		# Makefiles install there. 
95
			GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \
115
		if [ "${PN}" = "gnustep-base" ] || [ "${PN}" = "gnustep-gui" ] || [ "${PN}" = "gnustep-back" ] ; then
96
			GNUSTEP_LOCAL_ROOT=${GNUSTEP_SYSTEM_ROOT} \
116
			# for some reason, they need less tending to...
97
			GNUSTEP_NETWORK_ROOT=${GNUSTEP_SYSTEM_ROOT} \
117
			make \
98
			GNUSTEP_SYSTEM_ROOT=${GNUSTEP_SYSTEM_ROOT} \
118
				GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
99
			GNUSTEP_MAKEFILES=${GNUSTEP_SYSTEM_ROOT}/Makefiles \
119
				HOME=$TMP/fakehome \
100
			TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \
120
				GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \
101
			messages=yes \
121
				INSTALL_ROOT_DIR=${D} \
102
		 	install || die "einstall failed"
122
				install || die "einstall failed"
123
		else 
124
			make \
125
				GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
126
				HOME=$TMP/fakehome \
127
        	        	GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \
128
                		INSTALL_ROOT_DIR=${D} \
129
				GNUSTEP_LOCAL_ROOT=${D}${GNUSTEP_LOCAL_ROOT} \
130
				GNUSTEP_NETWORK_ROOT=${D}${GNUSTEP_NETWORK_ROOT} \
131
				GNUSTEP_SYSTEM_ROOT=${D}${GNUSTEP_SYSTEM_ROOT} \
132
				GNUSTEP_USER_ROOT=${D}${GNUSTEP_SYSTEM_ROOT} \
133
		 		install || die "einstall failed"
134
		fi
135
	else
103
	else
136
		die "no Makefile found" 
104
		die "no Makefile found" 
137
	fi
105
	fi
138
	return 0
106
	return 0
139
}
107
}
140
108
109
egnusteppostinst() {
110
	ewarn "Make sure to check handy scripts to ease your GNUstep setup;"
111
	ewarn "you can find them in /usr/GNUstep/System/Tools/Gentoo"
112
}
113
114
info_config_file() {
115
	ewarn ""
116
	ewarn "You will need to (inspect -- cause why not? -- and) execute:"
117
	ewarn " /usr/GNUstep/System/Tools/Gentoo/$1"
118
	ewarn "as the -user- you will run GNUstep applications as."
119
}
120
141
gnustep_src_compile() {
121
gnustep_src_compile() {
142
	egnustepmake || die
122
	egnustepmake || die
143
}
123
}
Lines 146-149 Link Here
146
	egnustepinstall || die
126
	egnustepinstall || die
147
}
127
}
148
128
149
EXPORT_FUNCTIONS src_compile src_install
129
gnustep_pkg_postinst() {
130
	egnusteppostinst || die
131
}
132
133
EXPORT_FUNCTIONS src_compile src_install pkg_postinst

Return to bug 54773