Skip to content

Commit

Permalink
basic: build with recent gcc and python
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon committed Nov 16, 2024
1 parent 25bd3df commit 4bf7fc1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions impls/basic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:wily
FROM ubuntu:24.04
MAINTAINER Joel Martin <[email protected]>

##########################################################
Expand All @@ -9,10 +9,8 @@ MAINTAINER Joel Martin <[email protected]>
RUN apt-get -y update

# Required for running tests
RUN apt-get -y install make python

# Some typical implementation and test requirements
RUN apt-get -y install curl libreadline-dev libedit-dev
RUN apt-get -y install make python3
RUN ln -fs /usr/bin/python3 /usr/local/bin/python

RUN mkdir -p /mal
WORKDIR /mal
Expand All @@ -21,18 +19,22 @@ WORKDIR /mal
# Specific implementation requirements
##########################################################

RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \
ca-certificates curl gcc g++ libasound2-dev \
libglu1-mesa-dev mesa-common-dev patch unzip wget

# cbmbasic
RUN apt-get install -y gcc unzip patch
# Remove duplicate RAM (https://github.com/mist64/cbmbasic/commit/352a313313dd0a15a47288c8f8031b54ac8c92a2).
RUN cd /tmp && \
curl -L https://github.com/kanaka/cbmbasic/archive/master.zip -o cbmbasic.zip && \
unzip cbmbasic.zip && \
cd cbmbasic-master && \
sed -i '/unsigned char RAM.65536.;/d' runtime.c && \
make && \
cp cbmbasic /usr/bin/cbmbasic && \
mv cbmbasic /usr/local/bin && \
cd .. && \
rm -r cbmbasic*

RUN apt-get install -y g++ mesa-common-dev libglu1-mesa-dev libasound2-dev wget
RUN cd /tmp && \
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 - && \
cd qb64 && \
Expand All @@ -42,5 +44,3 @@ RUN cd /tmp && \
cp -a qb64 internal LICENSE programs source /usr/share/qb64/ && \
echo '#!/bin/sh\ncd /usr/share/qb64\n./qb64 "${@}"' > /usr/bin/qb64 && \
chmod +x /usr/bin/qb64


4 changes: 2 additions & 2 deletions impls/basic/basicpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def misc_fixups(orig_lines):
text = re.sub(r"\bIF ", "IF", text)
text = re.sub(r"\bPRINT *", "PRINT", text)
text = re.sub(r"\bDIM ", "DIM", text)
text = re.sub(r"\OPEN ", "OPEN", text)
text = re.sub(r"\bOPEN ", "OPEN", text)
text = re.sub(r"\bGET ", "GET", text)
text = re.sub(r"\bPOKE ", "POKE", text)
text = re.sub(r"\bCLOSE ", "CLOSE", text)
Expand Down Expand Up @@ -161,7 +161,7 @@ def finalize(lines, args):
if m:
prefix = m.groups(1)[0]
sub = m.groups(1)[1]
if not call_index.has_key(sub):
if sub not in call_index:
call_index[sub] = 0
call_index[sub] += 1
label = sub+"_"+str(call_index[sub])
Expand Down

0 comments on commit 4bf7fc1

Please sign in to comment.