updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / xorg-server-ubuntu / PKGBUILD
blob037df23e656e2cd6afbf298a062b682a12b99319
1 # Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
3 pkgbase=xorg-server-ubuntu
4 pkgname=xorg-server-ubuntu
5 true && pkgname=('xorg-server-ubuntu' 'xorg-server-xephyr-ubuntu' 'xorg-server-xdmx-ubuntu' 'xorg-server-xvfb-ubuntu' 'xorg-server-xnest-ubuntu' 'xorg-server-common-ubuntu' 'xorg-server-devel-ubuntu')
6 _ubuntu_rel=1ubuntu6
7 pkgver=1.10.4.${_ubuntu_rel}
8 pkgrel=100
9 arch=('i686' 'x86_64')
10 license=('custom')
11 url="http://xorg.freedesktop.org"
12 makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto-ubuntu' 'fontsproto' 'videoproto' 'compositeproto' 'recordproto' 'scrnsaverproto' 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont' 'renderproto' 'libpciaccess' 'libxv' 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres' 'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util' 'glproto' 'dri2proto')
13 options=('!libtool')
14 source=(${url}/releases/individual/xserver/${pkgbase%-*}-${pkgver%.*}.tar.bz2
15         http://archive.ubuntu.com/ubuntu/pool/main/x/${pkgbase%-*}/${pkgbase%-*}_${pkgver%.*}-${_ubuntu_rel}.diff.gz
16         xvfb-run
17         xvfb-run.1
18         10-quirks.conf)
19 sha512sums=('8e3391c78e7d5e52041efe35badf04be49bbb8b7940c7694faadd1f6f555edc5afda554cb8f3524b3ae7cfe8d5e63b80ca715cf3855565820efff46641ecc9b5'
20             'dc30cb653f7cd2485e9136848042f80fe7ce209955ebcdbb898a924824066e5d7cd0b65cf52483faf60d01a6250a575d0a21b8741262880d7ad2e3e581a27019'
21             'ca1cda27016f7c269cbdecc45da36255afeef5c1973cc484544f9dfbf56ed1868365c93a4c7f93e3a23e5322f084ec0cdd137e15b43872aae7f0c03040028ce6'
22             'de5e2cb3c6825e6cf1f07ca0d52423e17f34d70ec7935e9dd24be5fb9883bf1e03b50ff584931bd3b41095c510ab2aa44d2573fd5feaebdcb59363b65607ff22'
23             '9a1a5568be751435daea720cfc4bad209d62545cc10ea2f49113c41669c8130809a680492256ef331757fe8539d2e0e5e9e67a36f7c48c8d92d9b3e957d28fa2')
25 #AUR fix
26 pkgdesc="Xorg X server with Ubuntu's patches"
28 build() {
29   cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}"
31   #Apply Ubuntu patches
32   patch -Np1 -i "${srcdir}/${pkgbase%-*}_${pkgver%.*}-${_ubuntu_rel}.diff"
34   for i in $(cat debian/patches/series | grep -v '#'); do
35     patch -Np1 -i "debian/patches/${i}"
36   done
38   ./autogen.sh \
39     --prefix=/usr \
40     --enable-ipv6 \
41     --enable-dri \
42     --enable-dmx \
43     --enable-xvfb \
44     --enable-xnest \
45     --enable-composite \
46     --enable-xorg \
47     --enable-xephyr \
48     --enable-glx-tls \
49     --enable-kdrive \
50     --enable-config-udev \
51     --disable-config-dbus \
52     --enable-record \
53     --enable-xfbdev \
54     --disable-xfake \
55     --disable-static \
56     --sysconfdir=/etc/X11 \
57     --localstatedir=/var \
58     --with-xkb-path=/usr/share/X11/xkb \
59     --with-xkb-output=/var/lib/xkb \
60     --with-fontrootdir=/usr/share/fonts \
61     --enable-gestures \
62     --disable-dtrace \
63     --disable-strict-compilation \
64     --disable-debug \
65     --with-int10=x86emu \
66     --disable-devel-docs \
67     --disable-install-libxf86config \
68     --enable-mitshm \
69     --enable-xres \
70     --enable-xcsecurity \
71     --disable-xcalibrate \
72     --disable-tslib \
73     --enable-dbe \
74     --disable-xf86bigfont \
75     --enable-dpms \
76     --disable-xquartz \
77     --disable-xwin \
78     --disable-install-setuid \
79     --enable-aiglx \
80     --enable-registry \
81     --enable-xv \
82     --enable-xvmc \
83     --enable-dga \
84     --enable-screensaver \
85     --enable-xdmcp \
86     --enable-xdm-auth-1 \
87     --enable-glx \
88     --enable-xinerama \
89     --enable-xf86vidmode \
90     --enable-xace \
91     --enable-xfree86-utils \
92     --with-sha1=libgcrypt \
93     --enable-dri2 \
94     --with-fop=no `# build fix` \
95     --disable-xselinux \
96     --with-default-xkb-rules=evdev \
97     --disable-config-hal
99   # Build fix
100   find . -name Makefile -exec \
101     sed -i \
102       -e 's/-Werror=int-to-pointer-cast//g' \
103       -e 's/-Werror=address//g' \
104       -e 's/-Werror=array-bounds//g' \
105       -e 's/-Werror=attributes//g' \
106       -e 's/-Werror=clobbered//g' \
107       -e 's/-Werror=format-security//g' \
108       -e 's/-Werror=implicit//g' \
109       -e 's/-Werror=incompatible-pointer-types//g' \
110       -e 's/-Werror=init-self//g' \
111       -e 's/-Werror=int-to-pointer-cast//g' \
112       -e 's/-Werror=main//g' \
113       -e 's/-Werror=missing-braces//g' \
114       -e 's/-Werror=nonnull//g' \
115       -e 's/-Werror=return-type//g' \
116       -e 's/-Werror=sequence-point//g' \
117       -e 's/-Werror=trigraphs//g' \
118       -e 's/-Werror=unknown-warning-option//g' \
119       -e 's/-Werror=unused-command-line-argument//g' \
120       -e 's/-Wformat-nonliteral//g' \
121       -e 's/-Wimplicit-function-declaration//g' \
122       -e 's/-Wparentheses//g' \
123       -e 's/-Werror=write-strings//g' \
124       -e 's/-Werror=pointer-to-int-cast//g' \
125       {} \;
126     
127   make
129   # Disable subdirs for make install rule to make splitting easier
130   sed -e 's/^DMX_SUBDIRS =.*/DMX_SUBDIRS =/' \
131       -e 's/^XVFB_SUBDIRS =.*/XVFB_SUBDIRS =/' \
132       -e 's/^XNEST_SUBDIRS =.*/XNEST_SUBDIRS = /' \
133       -e 's/^KDRIVE_SUBDIRS =.*/KDRIVE_SUBDIRS =/' \
134       -i hw/Makefile
137 package_xorg-server-common-ubuntu() {
138   pkgdesc="Xorg server common files"
139   depends=('xkeyboard-config' 'xorg-xkbcomp' 'xorg-setxkbmap' 'xorg-fonts-misc')
140   provides=('xorg-server-common')
141   conflicts=('xorg-server-common')
143   cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}"
144   install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-common"
145   install -m644 COPYING "${pkgdir}/usr/share/licenses/xorg-server-common"
146   
147   make -C xkb DESTDIR="${pkgdir}" install-data
149   install -m755 -d "${pkgdir}/usr/share/man/man1"
150   install -m644 doc/man/Xserver.1 "${pkgdir}/usr/share/man/man1/"
152   install -m755 -d "${pkgdir}/usr/lib/xorg"
153   install -m644 dix/protocol.txt "${pkgdir}/usr/lib/xorg/"
156 package_xorg-server-ubuntu() {
157   pkgdesc="Xorg X server"
158   depends=(libxdmcp libxfont udev libpciaccess libdrm pixman libgcrypt libxau xorg-server-common-ubuntu)
159   #Cannot put xf86-input-evdev-ubuntu in the dependencies - the AUR will
160   # cause a dependency loop due to the order the packages are installed
161   backup=('etc/X11/xorg.conf.d/10-evdev.conf' 'etc/X11/xorg.conf.d/10-quirks.conf')
162   provides=('x-server' 'xorg-server')
163   conflicts=('xorg-server')
164   groups=('xorg')
166   cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}"
167   make DESTDIR="${pkgdir}" install
169   install -m755 -d "${pkgdir}/etc/X11"
170   mv "${pkgdir}/usr/share/X11/xorg.conf.d" "${pkgdir}/etc/X11/"
171   install -m644 "${srcdir}/10-quirks.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
173   #Some debian stuff
174     #This should be done by evdev
175   #install -m644 "debian/local/10-kbd.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
176   #install -m644 "debian/local/10-mouse.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
177   install -dm755 "${pkgdir}/lib/udev/"
178   install -m644 'debian/local/64-xorg-xkb.rules' "${pkgdir}/lib/udev/"
180   rmdir "${pkgdir}/usr/share/X11"
182   # Needed for non-mesa drivers, libgl will restore it
183   mv "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" \
184      "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.xorg"
186   rm -rf "${pkgdir}/var"
188   rm -f "${pkgdir}/usr/share/man/man1/Xserver.1"
189   rm -f "${pkgdir}/usr/lib/xorg/protocol.txt"
191   install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server"
192   ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server/COPYING"
194   rm -rf "${pkgdir}/usr/lib/pkgconfig"
195   rm -rf "${pkgdir}/usr/include"
196   rm -rf "${pkgdir}/usr/share/aclocal"
199 package_xorg-server-xephyr-ubuntu() {
200   pkgdesc="A nested X server that runs as an X application"
201   depends=(libxfont libgl libgcrypt libxv pixman xorg-server-common-ubuntu)
202   provides=('xorg-server-xephyr')
203   conflicts=('xorg-server-xephyr')
205   cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}/hw/kdrive"
206   make DESTDIR="${pkgdir}" install
208   install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xephyr"
209   ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xephyr/COPYING"
212 package_xorg-server-xvfb-ubuntu() {
213   pkgdesc="Virtual framebuffer X server"
214   depends=(libxfont libxdmcp libxau libgcrypt pixman xorg-server-common-ubuntu)
215   provides=('xorg-server-xvfb')
216   conflicts=('xorg-server-xvfb')
218   cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}/hw/vfb"
219   make DESTDIR="${pkgdir}" install
221   install -m755 "${srcdir}/xvfb-run" "${pkgdir}/usr/bin/"
222   install -m644 "${srcdir}/xvfb-run.1" "${pkgdir}/usr/share/man/man1/"
224   install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xvfb"
225   ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xvfb/COPYING"
228 package_xorg-server-xnest-ubuntu() {
229   pkgdesc="A nested X server that runs as an X application"
230   depends=(libxfont libxext libgcrypt pixman xorg-server-common-ubuntu)
231   provides=('xorg-server-xnest')
232   conflicts=('xorg-server-xnest')
234   cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}/hw/xnest"
235   make DESTDIR="${pkgdir}" install
237   install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xnest"
238   ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xnest/COPYING"
241 package_xorg-server-xdmx-ubuntu() {
242   pkgdesc="Distributed Multihead X Server and utilities"
243   depends=(libxfont libxi libgcrypt libxaw libxrender libdmx libxfixes pixman xorg-server-common-ubuntu)
244   provides=('xorg-server-xdmx')
245   conflicts=('xorg-server-xdmx')
247   cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}/hw/dmx"
248   make DESTDIR="${pkgdir}" install
250   install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xdmx"
251   ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xdmx/COPYING"
254 package_xorg-server-devel-ubuntu() {
255   pkgdesc="Development files for the X.Org X server"
256   depends=(xproto randrproto renderproto xextproto inputproto-ubuntu kbproto fontsproto videoproto dri2proto xineramaproto xorg-util-macros pixman libpciaccess)
257   provides=('xorg-server-devel')
258   conflicts=('xorg-server-devel')
260   cd "${srcdir}/${pkgbase%-*}-${pkgver%.*}"
261   make DESTDIR="${pkgdir}" install
263   rm -rf "${pkgdir}/usr/bin"
264   rm -rf "${pkgdir}/usr/share/man"
265   rm -rf "${pkgdir}/usr/share/doc"
266   rm -rf "${pkgdir}/usr/share/X11"
267   rm -rf "${pkgdir}/usr/lib/xorg"
268   rm -rf "${pkgdir}/var"
270   install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-devel"
271   ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-devel/COPYING"