Skip to content

Commit

Permalink
Add ringfastpro patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ysdragon committed Nov 4, 2024
1 parent a201bc4 commit 98a202f
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,14 @@ RUN mkdir -p /opt/ring
WORKDIR /opt/ring
RUN git clone --depth 1 --branch v1.21.2 https://github.com/ring-lang/ring .

COPY patches/pdfgen.patch .
RUN git apply pdfgen.patch
COPY patches/ringpdfgen.patch .
RUN git apply ringpdfgen.patch

COPY patches/ringfastpro.patch .
RUN git apply ringfastpro.patch

RUN find . -type f -name "*.sh" -exec sed -i 's/\bsudo\b//g' {} + \
&& find . -type f -name "*.sh" -exec sed -i 's/-L \/usr\/lib\/i386-linux-gnu//g' {} + \
&& find extensions/ringqt -name "*.sh" -exec sed -i 's/\bmake\b/make -j$(nproc)/g' {} + \
&& rm -rf extensions/ringraylib5/src/inux_raylib-5 \
&& rm -rf extensions/ringtilengine/linux_tilengine \
Expand All @@ -122,6 +126,7 @@ RUN find . -type f -name "*.sh" -exec sed -i 's/\bsudo\b//g' {} + \
&& sed -i '/extensions\/ringtilengine/d' bin/install.sh \
&& sed -i 's/ -I linux//g; s/ -L \$PWD\/linux//g' extensions/ringlibui/buildgcc.sh \
&& sed -i '/extensions\/ringlibui\/linux/d' bin/install.sh \
&& sed -i 's/-L \/usr\/local\/pgsql\/lib//g' extensions/ringpostgresql/buildgcc.sh \
&& cd build \
&& bash buildgcc.sh

Expand Down
41 changes: 41 additions & 0 deletions patches/ringfastpro.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From e23a29909cfca320e9aec807a6312649f1d346b8 Mon Sep 17 00:00:00 2001
From: ysdragon <[email protected]>
Date: Mon, 4 Nov 2024 19:29:41 +0200
Subject: [PATCH] Fix the `extensions/ringfastpro` build script so that it
outputs the library to the lib directory

---
extensions/ringfastpro/buildclang.sh | 6 +-----
extensions/ringfastpro/buildgcc.sh | 7 +------
2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/extensions/ringfastpro/buildclang.sh b/extensions/ringfastpro/buildclang.sh
index cf01e013..7f6d4b17 100755
--- a/extensions/ringfastpro/buildclang.sh
+++ b/extensions/ringfastpro/buildclang.sh
@@ -1,6 +1,2 @@
clang -c -fpic -O2 fastpro.c -I $PWD/../../language/include
-clang -dynamiclib -o libring_fastpro.dylib fastpro.o -L $PWD/../../lib -lring
-cp libring_fastpro.dylib /usr/local/lib
-
-
-
+clang -dynamiclib -o $PWD/../../lib/libring_fastpro.dylib fastpro.o -L $PWD/../../lib -lring
\ No newline at end of file
diff --git a/extensions/ringfastpro/buildgcc.sh b/extensions/ringfastpro/buildgcc.sh
index bcd1b49b..0d1a30a0 100755
--- a/extensions/ringfastpro/buildgcc.sh
+++ b/extensions/ringfastpro/buildgcc.sh
@@ -1,8 +1,3 @@
gcc -c -fpic -O2 fastpro.c -I $PWD/../../language/include
-gcc -shared -o libring_fastpro.so fastpro.o -L $PWD/../../lib -lring
-sudo cp libring_fastpro.so /usr/lib
-sudo cp libring_fastpro.so /usr/lib64
-
-
-
+gcc -shared -o $PWD/../../lib/libring_fastpro.so fastpro.o -L $PWD/../../lib -lring

--
2.47.0

File renamed without changes.

0 comments on commit 98a202f

Please sign in to comment.