Skip to content

Commit b98925a

Browse files
committed
basic: build with recent gcc, python and qbasic64
1 parent 25bd3df commit b98925a

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

impls/basic/Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:wily
1+
FROM ubuntu:24.04
22
MAINTAINER Joel Martin <github@martintribe.org>
33

44
##########################################################
@@ -9,10 +9,8 @@ MAINTAINER Joel Martin <github@martintribe.org>
99
RUN apt-get -y update
1010

1111
# Required for running tests
12-
RUN apt-get -y install make python
13-
14-
# Some typical implementation and test requirements
15-
RUN apt-get -y install curl libreadline-dev libedit-dev
12+
RUN apt-get -y install make python3
13+
RUN ln -fs /usr/bin/python3 /usr/local/bin/python
1614

1715
RUN mkdir -p /mal
1816
WORKDIR /mal
@@ -21,26 +19,28 @@ WORKDIR /mal
2119
# Specific implementation requirements
2220
##########################################################
2321

22+
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \
23+
ca-certificates curl gcc g++ libasound2-dev \
24+
libglu1-mesa-dev mesa-common-dev patch unzip wget
25+
2426
# cbmbasic
25-
RUN apt-get install -y gcc unzip patch
27+
# Remove duplicate RAM (https://github.com/mist64/cbmbasic/commit/352a313313dd0a15a47288c8f8031b54ac8c92a2).
2628
RUN cd /tmp && \
2729
curl -L https://github.com/kanaka/cbmbasic/archive/master.zip -o cbmbasic.zip && \
2830
unzip cbmbasic.zip && \
2931
cd cbmbasic-master && \
32+
sed -i '/unsigned char RAM.65536.;/d' runtime.c && \
3033
make && \
31-
cp cbmbasic /usr/bin/cbmbasic && \
34+
mv cbmbasic /usr/local/bin && \
3235
cd .. && \
3336
rm -r cbmbasic*
3437

35-
RUN apt-get install -y g++ mesa-common-dev libglu1-mesa-dev libasound2-dev wget
3638
RUN cd /tmp && \
37-
curl -L http://www.qb64.net/release/official/2017_02_09__02_14_38-1.1-20170120.51/linux/qb64-1.1-20170120.51-lnx.tar.gz | tar xzf - && \
38-
cd qb64 && \
39+
wget https://github.com/QB64Official/qb64/releases/download/v2.1/qb64_dev_2022-09-08-07-14-00_47f5044_lnx.tar.gz -O- | tar xzf - && \
40+
cd qb64_20*_lnx/ && \
3941
find . -name '*.sh' -exec sed -i "s/\r//g" {} \; && \
4042
env EUID=1 ./setup_lnx.sh && \
4143
mkdir -p /usr/share/qb64 && \
4244
cp -a qb64 internal LICENSE programs source /usr/share/qb64/ && \
4345
echo '#!/bin/sh\ncd /usr/share/qb64\n./qb64 "${@}"' > /usr/bin/qb64 && \
4446
chmod +x /usr/bin/qb64
45-
46-

impls/basic/basicpp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def misc_fixups(orig_lines):
111111
text = re.sub(r"\bIF ", "IF", text)
112112
text = re.sub(r"\bPRINT *", "PRINT", text)
113113
text = re.sub(r"\bDIM ", "DIM", text)
114-
text = re.sub(r"\OPEN ", "OPEN", text)
114+
text = re.sub(r"\bOPEN ", "OPEN", text)
115115
text = re.sub(r"\bGET ", "GET", text)
116116
text = re.sub(r"\bPOKE ", "POKE", text)
117117
text = re.sub(r"\bCLOSE ", "CLOSE", text)
@@ -161,7 +161,7 @@ def finalize(lines, args):
161161
if m:
162162
prefix = m.groups(1)[0]
163163
sub = m.groups(1)[1]
164-
if not call_index.has_key(sub):
164+
if sub not in call_index:
165165
call_index[sub] = 0
166166
call_index[sub] += 1
167167
label = sub+"_"+str(call_index[sub])

0 commit comments

Comments
 (0)