Skip to content

Commit 4bf7fc1

Browse files
committed
basic: build with recent gcc and python
1 parent 25bd3df commit 4bf7fc1

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

impls/basic/Dockerfile

Lines changed: 10 additions & 10 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 <[email protected]>
33

44
##########################################################
@@ -9,10 +9,8 @@ MAINTAINER Joel Martin <[email protected]>
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,18 +19,22 @@ 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 && \
3739
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 - && \
3840
cd qb64 && \
@@ -42,5 +44,3 @@ RUN cd /tmp && \
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)