haiku: fix Mesa build

1. The hgl.c file is a read-only file versus read-write.
Ref: src/gallium/state_trackers/hgl/hgl.c

2.  I've included the Haiku-specific patches I used to get a successful
build of Mesa 19.1.7 on Haiku using the meson/ninja build procedure.
Shows "[764/764] linking target ... libswpipe.so" at build completion.

v2:
Remove autotools files (Eric)

v3:
Update the patch

Reported-by: Ken Mays <kmays2000@gmail.com>
Tested-by: Ken Mays <kmays2000@gmail.com>
CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
40 jobs for master in 19 minutes (queued for 4 seconds)
Status Job ID Name Coverage
  Containers
passed #684005
debian-10

00:00:23

passed #684006
debian-9

00:00:20

passed #684007
aarch64
test-container:arm64

00:00:20

 
  Build
passed #684010
meson-arm64

00:09:02

passed #684009
meson-armhf

00:06:33

passed #684012
meson-clang

00:08:09

passed #684015
meson-clover

00:06:17

passed #684016
meson-clover-old-llvm

00:07:21

passed #684018
meson-i386

00:03:47

passed #684008
meson-main

00:14:45

passed #684011
meson-swr-glvnd

00:05:06

passed #684017
meson-vulkan

00:02:14

passed #684019
scons

00:08:55

passed #684020
scons-old-llvm

00:11:14

passed #684013
scons-swr

00:06:10

passed #684014
scons-win64

00:04:55

 
  Test
passed #684041
db410c
arm64_a306_gles2 1/4

00:04:11

passed #684042
db410c
arm64_a306_gles2 2/4

00:05:54

passed #684043
db410c
arm64_a306_gles2 3/4

00:04:08

passed #684044
db410c
arm64_a306_gles2 4/4

00:04:25

passed #684030
mesa-cheza
arm64_a630_gles2

00:04:58

passed #684031
mesa-cheza
arm64_a630_gles31 1/4

00:06:45

passed #684032
mesa-cheza
arm64_a630_gles31 2/4

00:07:36

passed #684033
mesa-cheza
arm64_a630_gles31 3/4

00:07:56

passed #684034
mesa-cheza
arm64_a630_gles31 4/4

00:07:12

passed #684035
mesa-cheza
arm64_a630_gles3 1/6

00:04:20

passed #684036
mesa-cheza
arm64_a630_gles3 2/6

00:04:15

passed #684037
mesa-cheza
arm64_a630_gles3 3/6

00:04:05

passed #684038
mesa-cheza
arm64_a630_gles3 4/6

00:04:24

passed #684039
mesa-cheza
arm64_a630_gles3 5/6

00:04:32

passed #684040
mesa-cheza
arm64_a630_gles3 6/6

00:04:18

passed #684021
test-llvmpipe-gles2 1/4

00:03:28

passed #684022
test-llvmpipe-gles2 2/4

00:03:43

passed #684023
test-llvmpipe-gles2 3/4

00:03:19

passed #684024
test-llvmpipe-gles2 4/4

00:03:34

passed #684025
test-softpipe-gles2 1/4

00:01:25

passed #684026
test-softpipe-gles2 2/4

00:01:37

passed #684027
test-softpipe-gles2 3/4

00:01:24

passed #684028
test-softpipe-gles2 4/4

00:01:36

passed #684029
test-softpipe-gles3-limited

00:03:48