-
Notifications
You must be signed in to change notification settings - Fork 0
/
emacs.cygport
230 lines (189 loc) · 5.96 KB
/
emacs.cygport
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
NAME="emacs"
VERSION=26.2.90
RELEASE=1
HOMEPAGE="http://www.gnu.org/software/emacs/"
CATEGORY="Editors Interpreters"
PKG_NAMES="${PN} ${PN}-common ${PN}-X11 ${PN}-w32 ${PN}-lucid"
emacs_SUMMARY="The extensible, customizable, self-documenting real-time display editor"
emacs_common_SUMMARY="Common files needed for all Emacs packages"
emacs_common_OBSOLETES="emacs-el"
emacs_X11_SUMMARY="Emacs binaries using the X11 GUI with the GTK+ toolkit"
emacs_lucid_SUMMARY="Emacs binaries using the X11 GUI with the Lucid toolkit"
emacs_w32_SUMMARY="Emacs binaries using the native Windows GUI"
DESCRIPTION="Emacs is a powerful, customizable, self-documenting, modeless text
editor. Emacs contains special code editing features, a scripting
language (elisp), and the capability to read mail, news, and more
without leaving the editor."
emacs_DESCRIPTION="${DESCRIPTION}
This package provides binaries for a non-GUI emacs."
emacs_common_DESCRIPTION="${DESCRIPTION}
This package contains elisp source files and documentation for emacs,
emacs-X11, emacs-lucid, and emacs-w32."
emacs_X11_DESCRIPTION="${DESCRIPTION}
This package provides binaries for an X11 emacs with the GTK+ toolkit.
Install it if you want to run emacs using the X window system and GTK+
for display. The binaries also can be used in non-X11 mode."
emacs_lucid_DESCRIPTION="${DESCRIPTION}
This package provides binaries for an X11 emacs with the Lucid
toolkit. Install it if you want to run emacs using the X window
system and Lucid for display. The binaries also can be used in
non-X11 mode."
emacs_w32_DESCRIPTION="${DESCRIPTION}
This package provides emacs binaries that use the native Windows GUI
for display."
emacs_common_REQUIRES="terminfo-extra mailutils"
emacs_REQUIRES="emacs-common"
emacs_X11_REQUIRES="emacs-common bitstream-vera-fonts"
emacs_lucid_REQUIRES="emacs-common bitstream-vera-fonts"
emacs_w32_REQUIRES="emacs-common"
# SRC_URI="mirror://gnu/emacs/emacs-${VERSION}.tar.xz"
SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/emacs-${VERSION}.tar.xz"
# SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/emacs-${VERSION}-rc1.tar.xz"
# Can generate a source tarball by running './make-dist --snapshot
# --xz --tests' in git repo. Note: It’s possible to have an
# outdated loaddefs.el in this way. See admin/make-tarball.txt for
# more careful instructions on making the tarball. It might suffice
# to run ’make -C lisp autoloads’ first.
# GIT_URI="git://git.savannah.gnu.org/emacs.git"
# GIT_BRANCH="emacs-25"
# inherit git
SRC_URI+="
make-emacs-shortcut
set-emacs-default-nox.sh
README.Cygwin
postinstall.sh
preremove.sh
postinstall-X11.sh
preremove-X11.sh
postinstall-lucid.sh
preremove-lucid.sh
postinstall-w32.sh
preremove-w32.sh
"
PATCH_URI="nonbootstrap_static_heap.patch"
PATCH_URI+=" bt.patch"
PATCH_URI+=" 0001-Add-battery-support-to-all-Cygwin-builds.patch"
PATCH_URI+=" 0001-Use-a-runtime-test-for-timerfd-on-Cygwin-Bug-34618.patch"
DOCS="README.Cygwin"
DEPEND="libtiff-devel
libgif-devel
libiconv-devel
libjpeg-devel
pkgconfig(dbus-1)
pkgconfig(fontconfig)
pkgconfig(freetype2)
pkgconfig(gio-2.0)
pkgconfig(glib-2.0)
pkgconfig(gnutls)
pkgconfig(gtk+-3.0)
pkgconfig(lcms2)
pkgconfig(libotf)
pkgconfig(libpng)
pkgconfig(librsvg-2.0)
pkgconfig(libxml-2.0)
pkgconfig(m17n-flt)
pkgconfig(ncursesw)
pkgconfig(sm)
pkgconfig(Wand)
pkgconfig(x11)
pkgconfig(xaw3d)
pkgconfig(xft)
pkgconfig(xpm)
pkgconfig(xpm-nox)
pkgconfig(xrender)"
emacs_common_CONTENTS="
usr/bin/ebrowse.exe
usr/bin/emacs.ico
usr/bin/make-emacs-shortcut
usr/bin/set-emacs-default-nox.sh
usr/include/
usr/lib/systemd/
usr/libexec/
usr/share/"
emacs_CONTENTS="
etc/postinstall/emacs.sh
etc/preremove/emacs.sh
usr/bin/emacs-nox.exe
usr/bin/emacsclient-nox.exe"
emacs_X11_CONTENTS="
usr/bin/emacs-X11.exe
usr/bin/emacsclient-X11.exe
usr/bin/set-emacs-default-X11.sh
etc/postinstall/emacs-X11.sh
etc/preremove/emacs-X11.sh"
emacs_lucid_CONTENTS="
usr/bin/emacs-lucid.exe
usr/bin/emacsclient-lucid.exe
usr/bin/set-emacs-default-lucid.sh
etc/postinstall/emacs-lucid.sh
etc/preremove/emacs-lucid.sh"
emacs_w32_CONTENTS="
usr/bin/emacs-w32.exe
usr/bin/emacsclient-w32.exe
usr/bin/set-emacs-default-w32.sh
etc/postinstall/emacs-w32.sh
etc/preremove/emacs-w32.sh"
DIFF_EXCLUDES="loaddefs.el config.in *.elc loaddefs.el~ subdirs.el~ config.in~ emacs.1 *.info"
ACLOCAL_FLAGS='-I m4'
src_compile() {
cd ${S}
cygautoreconf
cd ${B}
cygconf --with-x=no
cygmake
mkdir build-w32 build-lucid build-gtk
cd build-w32
cygconf --with-w32
cygmake
cd ../build-lucid
cygconf --with-x-toolkit=lucid
cygmake
cd ../build-gtk
cygconf
cygmake
}
src_install() {
cd ${B}
cyginstall
newbin src/emacs.exe emacs-nox.exe
newbin build-w32/src/emacs.exe emacs-w32.exe
newbin build-lucid/src/emacs.exe emacs-lucid.exe
newbin build-gtk/src/emacs.exe emacs-X11.exe
newbin lib-src/emacsclient.exe emacsclient-nox.exe
newbin build-w32/lib-src/emacsclient.exe emacsclient-w32.exe
newbin build-lucid/lib-src/emacsclient.exe emacsclient-lucid.exe
newbin build-gtk/lib-src/emacsclient.exe emacsclient-X11.exe
cd ${S}
dobin make-emacs-shortcut
dobin set-emacs-default-nox.sh
insinto /usr/bin
doins nt/icons/emacs.ico
insinto /usr/share/${PN}/${PV}/etc
doins src/.gdbinit
exeinto /etc/postinstall
newexe postinstall.sh emacs.sh
newexe postinstall-X11.sh emacs-X11.sh
newexe postinstall-lucid.sh emacs-lucid.sh
newexe postinstall-w32.sh emacs-w32.sh
exeinto /etc/preremove
newexe preremove.sh emacs.sh
newexe preremove-X11.sh emacs-X11.sh
newexe preremove-lucid.sh emacs-lucid.sh
newexe preremove-w32.sh emacs-w32.sh
cd ${D}
rm -fv \
usr/bin/${P}.exe \
usr/bin/emacs.exe \
usr/bin/emacsclient.exe \
usr/bin/ctags.exe \
usr/bin/etags.exe \
usr/share/man/man1/ctags* \
usr/share/man/man1/etags*
dosym set-emacs-default-nox.sh /usr/bin/set-emacs-default-w32.sh
dosym set-emacs-default-nox.sh /usr/bin/set-emacs-default-X11.sh
dosym set-emacs-default-nox.sh /usr/bin/set-emacs-default-lucid.sh
}
src_test() {
cd ${B}
make check
}