/[gentoo-x86]/eclass/gnustep.eclass
Gentoo

Contents of /eclass/gnustep.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Jul 15 16:22:21 2003 UTC (16 years, 11 months ago) by brain
Branch: MAIN
Branch point for: RELEASE-1_4
Changes since 1.3: +2 -2 lines
Little fix

1 ECLASS=gnustep
2 INHERITED="$INHERITED $ECLASS"
3
4 DESCRIPTION="Based on the gnustep eclass."
5
6 newdepend /c
7 newdepend dev-util/gnustep-make
8 newdepend dev-util/gnustep-base
9
10 getsourcedir() {
11 if [ ! -d "${S}" ] ; then
12 if [ -d "${WORKDIR}/${PN}" ] ; then
13 S="${WORKDIR}/${PN}"
14 elif [ -d "${WORKDIR}/${P}" ] ; then
15 S="${WORKDIR}/${P}"
16 else
17 die "Cannot find source directory!"
18 fi
19 fi
20 }
21
22 need-gnustep-gui() {
23 if [ "$1" ] ; then
24 newdepend ">=dev-util/gnustep-gui-$1"
25 RDEPEND="${RDEPEND} >=dev-util/gnustep-back-$1"
26 else
27 newdepend "dev-util/gnustep-gui"
28 RDEPEND="${RDEPEND} dev-util/gnustep-back"
29 fi
30 }
31
32 egnustepmake() {
33 getsourcedir
34
35 addwrite ~/GNUstep/Defaults/.GNUstepDefaults.lck
36 addpredict ~/GNUstep
37
38 cd ${S}
39
40 unset CFLAGS
41 unset CC
42
43 if [ -f /usr/GNUstep/System/Makefiles/GNUstep.sh ] ; then
44 . /usr/GNUstep/System/Makefiles/GNUstep.sh
45 else
46 die "gnustep-make not installed!"
47 fi
48
49 mkdir -p $TMP/fakehome/GNUstep
50
51 if [ -x configure ] ; then
52 if [ -z "$*" ] ; then
53 ./configure \
54 HOME=$TMP/fakehome \
55 GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
56 || die "configure failed"
57 else
58 ./configure \
59 HOME=$TMP/fakehome \
60 GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
61 $* || die "configure failed (options: $*)"
62 fi
63 fi
64
65 if [ ! "${GNUSTEPBACK_XFT}" -eq 2 ] ; then
66 if [ "${PN}" = "gnustep-back" ] ; then
67 if [ ! -f "/usr/X11R6/include/X11/Xft1/Xft.h" ]; then
68 sed "s,^#define HAVE_XFT.*,#undef HAVE_XFT,g" config.h > config.h.new
69 sed "s,^#define HAVE_UTF8.*,#undef HAVE_UTF8,g" config.h.new > config.h
70 sed "s,^WITH_XFT=.*,WITH_XFT=no," config.make > config.make.new
71 sed "s,-lXft,," config.make.new > config.make
72 fi
73 fi
74 fi
75
76 if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
77 make \
78 HOME=$TMP/fakehome \
79 GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
80 || die "emake failed"
81 else
82 die "no Makefile found"
83 fi
84 return 0
85 }
86
87 egnustepinstall() {
88 getsourcedir
89
90 addwrite ~/GNUstep/Defaults/.GNUstepDefaults.lck
91 addpredict ~/GNUstep
92
93 cd ${S}
94
95 if [ -f /usr/GNUstep/System/Makefiles/GNUstep.sh ] ; then
96 source /usr/GNUstep/System/Makefiles/GNUstep.sh
97 else
98 die "gnustep-make not installed!"
99 fi
100
101 mkdir -p $TMP/fakehome/GNUstep
102
103 if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
104 # To be or not to be evil?
105 # Should all the roots point at GNUSTEP_SYSTEM_ROOT to force
106 # install?
107 # GNUSTEP_USER_ROOT must be GNUSTEP_SYSTEM_ROOT, some malformed
108 # Makefiles install there.
109 if [ "${PN}" = "gnustep-base" ] || [ "${PN}" = "gnustep-gui" ] || [ "${PN}" = "gnustep-back" ] ; then
110 # for some reason, they need less tending to...
111 make \
112 GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
113 HOME=$TMP/fakehome \
114 GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \
115 INSTALL_ROOT_DIR=${D} \
116 install || die "einstall failed"
117 else
118 make \
119 GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \
120 HOME=$TMP/fakehome \
121 GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \
122 INSTALL_ROOT_DIR=${D} \
123 GNUSTEP_LOCAL_ROOT=${D}${GNUSTEP_LOCAL_ROOT} \
124 GNUSTEP_NETWORK_ROOT=${D}${GNUSTEP_NETWORK_ROOT} \
125 GNUSTEP_SYSTEM_ROOT=${D}${GNUSTEP_SYSTEM_ROOT} \
126 GNUSTEP_USER_ROOT=${D}${GNUSTEP_SYSTEM_ROOT} \
127 install || die "einstall failed"
128 fi
129 else
130 die "no Makefile found"
131 fi
132 return 0
133 }
134
135 gnustep_src_compile() {
136 egnustepmake || die
137 }
138
139 gnustep_src_install() {
140 egnustepinstall || die
141 }
142
143 EXPORT_FUNCTIONS src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20