Hi;
Trying to build SDL Ada on a Mac Mini with M1 chip, running Ventura 13.4.1...
sudo make DESTDIR=/opt/ext_ada_lib/sdlada SDL_PLATFORM=macosx SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macosx \
-Psdlada.gpr
Compile
[C] version_ttf.c [redacted]/Ada/from_GitHub/sdlada-master/src/ttf/version_ttf.c:27:18: fatal error: SDL2_ttf/SDL_ttf.h: No such file or directory
27 | #include <SDL2_ttf/SDL_ttf.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
gprbuild: *** compilation phase failed
make: *** [lib/libadasdl.a] Error 4
On 28/06/2023 19:38, Kenneth Wolcott wrote:
Hi;
Trying to build SDL Ada on a Mac Mini with M1 chip, running Ventura 13.4.1...
sudo make DESTDIR=/opt/ext_ada_lib/sdlada SDL_PLATFORM=macosx SDL_MODE=releaseHave you installed sdl ttf with brew? I cannot confirm this all works without brew.
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macosx \ -Psdlada.gpr
Compile
[C] version_ttf.c [redacted]/Ada/from_GitHub/sdlada-master/src/ttf/version_ttf.c:27:18: fatal error: SDL2_ttf/SDL_ttf.h: No such file or directory
27 | #include <SDL2_ttf/SDL_ttf.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
gprbuild: *** compilation phase failed
make: *** [lib/libadasdl.a] Error 4
On Wednesday, June 28, 2023 at 2:14:00 PM UTC-7, Luke A. Guest wrote:..I thought that having SDL installed via HomeBrew was optional, not required.
On 28/06/2023 19:38, Kenneth Wolcott wrote:
Hi;
Trying to build SDL Ada on a Mac Mini with M1 chip, running Ventura 13.4.1...
Hi Luke;sudo make DESTDIR=/opt/ext_ada_lib/sdlada SDL_PLATFORM=macosx SDL_MODE=releaseHave you installed sdl ttf with brew? I cannot confirm this all works without brew.
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macosx \ -Psdlada.gpr
Compile
[C] version_ttf.c [redacted]/Ada/from_GitHub/sdlada-master/src/ttf/version_ttf.c:27:18: fatal error: SDL2_ttf/SDL_ttf.h: No such file or directory
27 | #include <SDL2_ttf/SDL_ttf.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
gprbuild: *** compilation phase failed
make: *** [lib/libadasdl.a] Error 4
I heavily use MacPorts. I keep hearing that it is a very bad idea to have MacPorts and HomeBrew concurrently installed on the same machine. Is it at all possible to do this without HomeBrew? Apparently I did not read your documentation carefully enough.
Thanks,
Ken
enough...I thought that having SDL installed via HomeBrew was optional, not required.I heavily use MacPorts. I keep hearing that it is a very bad idea to have MacPorts and HomeBrew concurrently installed on the same machine. Is it at all possible to do this without HomeBrew? Apparently I did not read your documentation carefully
Since I'm not using ALIRE (ALR), but using gnatmake (I'm on a Mac mini with an M1 chip, ALR refuses to get most packages because I don't have a native Ada compiler), I thought that the HomeBrew mention was in regards to using the SDLAda package viaALIRE.
So that's a different problem requiring a different post :-)
On 28/06/2023 22:53, Kenneth Wolcott wrote:enough...I thought that having SDL installed via HomeBrew was optional, not required.
I heavily use MacPorts. I keep hearing that it is a very bad idea to have MacPorts and HomeBrew concurrently installed on the same machine. Is it at all possible to do this without HomeBrew? Apparently I did not read your documentation carefully
I didn't get it working on Mac myself, I originally started to get itALIRE.
going using the downloadable binaries you can just drag n drop.
Others got it working with brew, afaik.
Since I'm not using ALIRE (ALR), but using gnatmake (I'm on a Mac mini with an M1 chip, ALR refuses to get most packages because I don't have a native Ada compiler), I thought that the HomeBrew mention was in regards to using the SDLAda package via
So that's a different problem requiring a different post :-)You're probably better off using git to grab it, then modify the
makefile and gpr's for a specific macos macports port, add a new Platform_Type, macosx_macports and add what you need inside the sdlada.gpr.
Then you can call make SDL_PLATFORM=macosx_macports SDL_MODE=release to build it.
Check whatever sdl2-config --cflags produces on that port.
If the headers are in different directories, you'll need to modify the version*.c files with extra #ifdef's for macports.
Hi Luke;
Thank you for more information.
This looks a little bit deeper than I feel comfortable :-(
I'll think about this a bit more and experiment further, but this is definitely in uncharted territory for me.
I heavily use MacPorts. I keep hearing that it is a very bad idea to
have MacPorts and HomeBrew concurrently installed on the same machine.
Is it at all possible to do this without HomeBrew? Apparently I did
not read your documentation carefully enough...I thought that having
SDL installed via HomeBrew was optional, not required.
Since I'm [...] using gnatmake
I'm on a Mac mini
with an M1 chip, ALR refuses to get most packages because I don't have
a native Ada compiler
Kenneth Wolcott <kennethwolcott@gmail.com> writes:
Since I'm [...] using gnatmake
I don't understand why you'd want to use gnatmake? Most people who
provide packaged libraries (e.g. sdlada) include a GPR file which saves
you a raft of pain if you use it. OK, you have to learn something about gprbuild, but then you have to learn how to drive gnatmake (e.g. the
previous discussion about -I). Also, sdlada includes 3 C source files,
and so far as I know gnatmake doesn't know how to build C files, whereas gprbuild does and build/gnat/sdlada.gpr drives the needed compilations.
Yeah, unfortunately I cannot remove the C files as they turn C macros
into variables and are useful at runtime, see the sdlada repo for
someone who wants to get rid of them.
"Luke A. Guest" writes:
Yeah, unfortunately I cannot remove the C files as they turn C macrosI had exactly this in tcladashell; even better, a Tcl script to generate
into variables and are useful at runtime, see the sdlada repo for
someone who wants to get rid of them.
a C source, compiled against the Tcl/Tk libraries and run to generate
Ada source specifying record sizes/alignments.
"Luke A. Guest" <laguest@archeia.com> writes:
Yeah, unfortunately I cannot remove the C files as they turn C macros
into variables and are useful at runtime, see the sdlada repo for
someone who wants to get rid of them.
I had exactly this in tcladashell; even better, a Tcl script to generate
a C source, compiled against the Tcl/Tk libraries and run to generate
Ada source specifying record sizes/alignments.
1. I'm using gnatmake versus gprbuild because I just haven't gotten used to it yet, not avoiding it specifically. Of course it looks like it makes things easier...
3. I have installed libsdl2 via MacPorts:
port list | grep sdl2
libsdl2_mixer @2.6.3 audio/libsdl2_mixer
libsdl2 @2.28.0 devel/libsdl2 libsdl2-snowleopard @2.0.22 devel/libsdl2-snowleopard libsdl2_gfx @1.0.4 devel/libsdl2_gfx libsdl2_image @2.6.3 devel/libsdl2_image libsdl2_net @2.2.0 devel/libsdl2_net
libsdl2_ttf @2.20.2 devel/libsdl2_ttf
4. Examples of Alire's "get" failure:
alr --no-color get libsdl2_ttf
ERROR: No source release indexed for the requested crate, and cannot use system packages in unknown distribution
alr --no-color get libsdl2
ERROR: No source release indexed for the requested crate, and cannot use system packages in unknown distribution
2. I stopped using Alire because I wanted a native gnat compiler and
Alire didn't provide one and now that I installed and am using Simon's (again, thank you) build, Alire refuses to "get" some interesting
packages. I'll respond later with some specific examples. Perhaps I
have Alire improperly installed or configured...
On 29/06/2023 18:34, Kenneth Wolcott wrote:
1. I'm using gnatmake versus gprbuild because I just haven't gotten used to it yet, not avoiding it specifically. Of course it looks like it makes things easier...gnatmake cannot handle project files anymore, it is for building single applications, e.g. gnatmake my_app.adb, nothing more. You need to use gprbuild with sdlada.
3. I have installed libsdl2 via MacPorts:Right, so the other SDL libs usually install to the same place SDL is,
port list | grep sdl2
libsdl2_mixer @2.6.3 audio/libsdl2_mixer
libsdl2 @2.28.0 devel/libsdl2
libsdl2-snowleopard @2.0.22 devel/libsdl2-snowleopard
libsdl2_gfx @1.0.4 devel/libsdl2_gfx
libsdl2_image @2.6.3 devel/libsdl2_image
libsdl2_net @2.2.0 devel/libsdl2_net
libsdl2_ttf @2.20.2 devel/libsdl2_ttf
so what are the locations? Run these commands and tell me the results:
$ sdl2-config --cflags
$ sdl2-config --libs
4. Examples of Alire's "get" failure:Forget about alire for now, I can update the main repo and you can grab
the source from there and use GPR_PROJECT_PATH=<path to sdlada>/build/gnat:$GPR_PROJECT_PATH to build.
alr --no-color get libsdl2_ttf
ERROR: No source release indexed for the requested crate, and cannot use system packages in unknown distribution
alr --no-color get libsdl2They're probably missing from the mac m1 specific index.
ERROR: No source release indexed for the requested crate, and cannot use system packages in unknown distribution
Kenneth Wolcott writes:
2. I stopped using Alire because I wanted a native gnat compiler andI wrote up something about this[1].
Alire didn't provide one and now that I installed and am using Simon's (again, thank you) build, Alire refuses to "get" some interesting packages. I'll respond later with some specific examples. Perhaps I
have Alire improperly installed or configured...
Alire will download and install external packages (e.g. SDL2) if it
knows how to use the host system's package manager. The "nightly"
builds[2] for macOS know how to install via Homebrew, provided that the external manifest has been updated[3].
If someone wants to upgrade Alire to use MacPorts, I'm sure that would
be welcomed.
Adding aarch64 compilers to the mix makes things somewhat more
complicated.
Does MacPorts provide aarch64 (aka arm64) binary libraries? the object
code and libraries that are linked to produce an executable must be consistent, all x86_64 or all aarch64.
[1] https://forward-in-code.blogspot.com/2023/06/alire-on-macos-revisited.html [2] https://github.com/alire-project/alire/releases
[3] https://github.com/alire-project/alire-index/pull/832
$ sdl2-config --cflags
$ sdl2-config --libs
sdl2-config --cflags
-I/opt/local/include/SDL2 -D_THREAD_SAFE
sdl2-config --libs
-L/opt/local/lib -lSDL2
The /build/gnat gpr's have got a bit confused by the looks of things.
Can you try this patch, it's made from a stash from a diff branch, if it works I'll apply it and push it.
On Friday, June 30, 2023 at 1:04:34 AM UTC-7, Luke A. Guest wrote:...
On 29/06/2023 23:04, Kenneth Wolcott wrote:
That's odd. Can you show me the output of this?$ sdl2-config --cflags
$ sdl2-config --libs
sdl2-config --cflags
-I/opt/local/include/SDL2 -D_THREAD_SAFE
$ ls /opt/local/include/SDL2
ls /opt/local/include/SDL2
SDL.h SDL_joystick.h SDL_opengles2_khrplatform.h SDL_test_crc32.h
On 29/06/2023 23:04, Kenneth Wolcott wrote:
$ sdl2-config --cflags
$ sdl2-config --libs
sdl2-config --cflagsThat's odd. Can you show me the output of this?
-I/opt/local/include/SDL2 -D_THREAD_SAFE
$ ls /opt/local/include/SDL2
sdl2-config --libs
-L/opt/local/lib -lSDL2
On 30/06/2023 12:30, Luke A. Guest wrote:
The /build/gnat gpr's have got a bit confused by the looks of things.
Can you try this patch, it's made from a stash from a diff branch, if
it works I'll apply it and push it.
Ignore that, I forgot something, try this one instead.
On 30/06/2023 14:26, Luke A. Guest wrote:
On 30/06/2023 12:30, Luke A. Guest wrote:
The /build/gnat gpr's have got a bit confused by the looks of things.
Can you try this patch, it's made from a stash from a diff branch, if
it works I'll apply it and push it.
Ignore that, I forgot something, try this one instead.
Hello? Did this work for you?
On Sunday, July 2, 2023 at 12:01:44 AM UTC-7, Luke A. Guest wrote:
On 30/06/2023 14:26, Luke A. Guest wrote:
On 30/06/2023 12:30, Luke A. Guest wrote:
The /build/gnat gpr's have got a bit confused by the looks of things.
Can you try this patch, it's made from a stash from a diff branch, if
it works I'll apply it and push it.
Ignore that, I forgot something, try this one instead.
Hello? Did this work for you?
Hi Luke;
I'm not sure what you want me to try.
I don't see an attachment. I don't see a URL. I don't see a
specific mention of a "patch"? on GitHub. Obviously I'm missing
something. Sorry I appear quite daft :-(
Thanks,
Ken
Kenneth Wolcott writes:
On Sunday, July 2, 2023 at 12:01:44 AM UTC-7, Luke A. Guest wrote:
On 30/06/2023 14:26, Luke A. Guest wrote:
On 30/06/2023 12:30, Luke A. Guest wrote:
The /build/gnat gpr's have got a bit confused by the looks of things. >> >>
Can you try this patch, it's made from a stash from a diff branch, if >> >> it works I'll apply it and push it.
Ignore that, I forgot something, try this one instead.
Hello? Did this work for you?
Hi Luke;
I'm not sure what you want me to try.
I don't see an attachment. I don't see a URL. I don't see a
specific mention of a "patch"? on GitHub. Obviously I'm missing
something. Sorry I appear quite daft :-(
Thanks,Google Groups has suppressed Luke's two posts with attached patches.
Ken
Google Groups has suppressed Luke's two posts with attached patches.
Well, that's a very logical explanation for me not seeing anything to respond to :-)
On 02/07/2023 20:26, Kenneth Wolcott wrote:
Google Groups has suppressed Luke's two posts with attached patches.
Well, that's a very logical explanation for me not seeing anything to respond to :-)Friggin' goggle. It's this (within the source dir - patch --dry-run -p1
< test.patch):
diff --git a/build/gnat/makefile b/build/gnat/makefile
index b13930f..0046490 100644
--- a/build/gnat/makefile
+++ b/build/gnat/makefile
@@ -90,7 +90,7 @@ tests: $(LIB_NAME) tests.gpr $(TESTS_SRCS)
tests.gpr: $(TESTS_SRCS) gen/$(SDL_MODE)/test/libtestmaths.so
$(GPRMAKE) -p -gnat2012 -XSDL_MODE=$(SDL_MODE) -XSDL_PLATFORM=$(SDL_PLATFORM) \
- -Ptests.gpr ${SDL2_CONFIG}
+ -Ptests.gpr # ${SDL2_CONFIG}
# Maths library
@@ -111,7 +111,7 @@ unit_tests: $(LIB_NAME) build_unit_tests/unit_tests
build_unit_tests/unit_tests:
$(GPRMAKE) -p -gnat2012 -XSDL_MODE=$(SDL_MODE) -XSDL_PLATFORM=$(SDL_PLATFORM) \
- -Punit_tests.gpr ${SDL2_CONFIG}
+ -Punit_tests.gpr # ${SDL2_CONFIG}
.PHONY: clean-unit_tests
diff --git a/build/gnat/sdlada.gpr b/build/gnat/sdlada.gpr
index adc77f5..13ef8ee 100644
--- a/build/gnat/sdlada.gpr
+++ b/build/gnat/sdlada.gpr
@@ -1,10 +1,21 @@
library project SDLAda is
- type Platform_Type is ("linux", "bsd", "windows", "macosx", "macos_homebrew", "ios", "android");
+ type Platform_Type is ("linux",
+ "bsd",
+ "windows",
+ "macosx",
+ "macos_homebrew",
+ "macos_ports",
+ "ios",
+ "android");
type Mode_Type is ("debug", "release");
Platform : Platform_Type := external ("SDL_PLATFORM", "linux");
Mode : Mode_Type := external ("SDL_MODE", "debug");
+ package Builder is
+ for Default_Switches ("Ada") use ("-gnat2012", "-gnata");
+ end Builder;
+
Source_Platform := "";
case Platform is
@@ -52,6 +63,11 @@ library project SDLAda is
"-I/usr/local/include",
"-D_REENTRANT");
+ when "macos_ports" =>
+ C_Switches := C_Switches & ("-DSDL_MACPORTS",
+ "-I/opt/local/include",
+ "-D_THREAD_SAFE");
+
when others =>
null;
end case;
@@ -59,4 +75,33 @@ library project SDLAda is
for Default_Switches ("C") use Common_Switches & C_Switches;
for Default_Switches ("Ada") use Common_Switches & Ada_Switches;
end Compiler;
+
+ package Linker is
+ Linker_Switches := ();
+
+ case Platform is
+ when "linux" | "bsd" | "android" | "windows" =>
+ Linker_Switches := Linker_Switches & ("-lSDL2",
+ "-lSDL2_ttf",
+ "-lSDL2_image",
+ "-L/usr/lib64");
+
+ when "macos_homebrew" =>
+ Linker_Switches := Linker_Switches & ("-lSDL2",
+ "-lSDL2_ttf",
+ "-lSDL2_image",
+ "-L/usr/local/lib");
+
+ when "macos_ports" =>
+ Linker_Switches := Linker_Switches & ("-lSDL2",
+ "-lSDL2_ttf",
+ "-lSDL2_image",
+ "-L/opt/local/lib");
+
+ when others =>
+ null;
+ end case;
+
+ for Switches ("Ada") use Linker_Switches;
+ end Linker;
end SDLAda;
diff --git a/build/gnat/sdlada_image.gpr b/build/gnat/sdlada_image.gpr
index 1098095..5a9764f 100644
--- a/build/gnat/sdlada_image.gpr
+++ b/build/gnat/sdlada_image.gpr
@@ -11,4 +11,5 @@ library project SDLAda_Image is
for Library_Version use "libsdlada_image.so." & Version;
package Compiler renames SDLAda.Compiler;
+ package Linker renames SDLAda.Linker;
end SDLAda_Image;
diff --git a/build/gnat/tests.gpr b/build/gnat/tests.gpr
index 70dceff..51ee201 100644
--- a/build/gnat/tests.gpr
+++ b/build/gnat/tests.gpr
@@ -15,24 +15,5 @@ project Tests is
"ttf.adb");
package Compiler renames SDLAda.Compiler;
-
- package Linker is
-
- Linker_Switches := ();
-
- case Sdlada.Platform is
- when "macos_homebrew" =>
- Linker_Switches := Linker_Switches & ("-lSDL2",
- "-lSDL2_ttf",
- "-lSDL2_image",
- "-L/usr/local/lib");
-
- when others =>
- null;
- end case;
-
- for Switches ("Ada") use Linker_Switches;
-
- end Linker;
-
+ package Linker renames SDLAda.Linker;
end Tests;
diff --git a/build/gnat/tests_image.gpr b/build/gnat/tests_image.gpr
index f23be3c..fd68309 100644
--- a/build/gnat/tests_image.gpr
+++ b/build/gnat/tests_image.gpr
@@ -8,6 +8,7 @@ project Tests_Image is
for Main use ("load_surface.adb");
package Compiler renames SDLAda.Compiler;
+ package Linker renames SDLAda.Linker;
-- package Builder is
-- for Default_Switches ("Ada") use ("-gnat2012", "-gnata");
--, "-gnatG");
diff --git a/build/gnat/unit_tests.gpr b/build/gnat/unit_tests.gpr
index c469a34..27dd38f 100644
--- a/build/gnat/unit_tests.gpr
+++ b/build/gnat/unit_tests.gpr
@@ -17,4 +17,5 @@ project Unit_Tests is
-- end Ide;
package Compiler renames SDLAda.Compiler;
+ package Linker renames SDLAda.Linker;
end Unit_Tests;
diff --git a/src/image/version_images.c b/src/image/version_images.c
index ba5be68..47813a1 100644
--- a/src/image/version_images.c
+++ b/src/image/version_images.c
@@ -21,7 +21,7 @@
* distribution.
**********************************************************************************************************************/
#ifdef __APPLE__
- #ifdef SDL_HOMEBREW
+ #if defined (SDL_HOMEBREW) || defined (SDL_MACPORTS)
#include <SDL2/SDL_image.h>
#else
#include <SDL2_image/SDL_image.h>
diff --git a/src/ttf/version_ttf.c b/src/ttf/version_ttf.c
index cedfebc..0819103 100644
--- a/src/ttf/version_ttf.c
+++ b/src/ttf/version_ttf.c
@@ -21,7 +21,7 @@
* distribution.
**********************************************************************************************************************/
#ifdef __APPLE__
- #ifdef SDL_HOMEBREW
+ #if defined (SDL_HOMEBREW) || defined (SDL_MACPORTS)
#include <SDL2/SDL_ttf.h>
#else
#include <SDL2_ttf/SDL_ttf.h>
You posted the output of running patch -p1 --dry-run < patch while inside the build/gnat directory.
On 02/07/2023 21:20, Kenneth Wolcott wrote:
You posted the output of running patch -p1 --dry-run < patch while inside the build/gnat directory.
No, that';s the command to test the patch on the source. To apply it you remove the dry run option.
Just save the email, cut out the crap that's not the patch and then save
it as test.patch as the above command should say (after the "<"), dunno
what happened there.
On Sunday, July 2, 2023 at 12:52:55 PM UTC-7, Luke A. Guest wrote:
On 02/07/2023 20:26, Kenneth Wolcott wrote:
Google Groups has suppressed Luke's two posts with attached patches.
Well, that's a very logical explanation for me not seeing anything to respond to :-)Friggin' goggle. It's this (within the source dir - patch --dry-run -p1
< test.patch):
diff --git a/build/gnat/makefile b/build/gnat/makefile
index b13930f..0046490 100644
--- a/build/gnat/makefile
+++ b/build/gnat/makefile
@@ -90,7 +90,7 @@ tests: $(LIB_NAME) tests.gpr $(TESTS_SRCS)
tests.gpr: $(TESTS_SRCS) gen/$(SDL_MODE)/test/libtestmaths.so
$(GPRMAKE) -p -gnat2012 -XSDL_MODE=$(SDL_MODE) -XSDL_PLATFORM=$(SDL_PLATFORM) \
- -Ptests.gpr ${SDL2_CONFIG}
+ -Ptests.gpr # ${SDL2_CONFIG}
# Maths library
@@ -111,7 +111,7 @@ unit_tests: $(LIB_NAME) build_unit_tests/unit_tests
build_unit_tests/unit_tests:
$(GPRMAKE) -p -gnat2012 -XSDL_MODE=$(SDL_MODE) -XSDL_PLATFORM=$(SDL_PLATFORM) \
- -Punit_tests.gpr ${SDL2_CONFIG}
+ -Punit_tests.gpr # ${SDL2_CONFIG}
.PHONY: clean-unit_tests
diff --git a/build/gnat/sdlada.gpr b/build/gnat/sdlada.gpr
index adc77f5..13ef8ee 100644
--- a/build/gnat/sdlada.gpr
+++ b/build/gnat/sdlada.gpr
@@ -1,10 +1,21 @@
library project SDLAda is
- type Platform_Type is ("linux", "bsd", "windows", "macosx", "macos_homebrew", "ios", "android");
+ type Platform_Type is ("linux",
+ "bsd",
+ "windows",
+ "macosx",
+ "macos_homebrew",
+ "macos_ports",
+ "ios",
+ "android");
type Mode_Type is ("debug", "release");
Platform : Platform_Type := external ("SDL_PLATFORM", "linux");
Mode : Mode_Type := external ("SDL_MODE", "debug");
+ package Builder is
+ for Default_Switches ("Ada") use ("-gnat2012", "-gnata");
+ end Builder;
+
Source_Platform := "";
case Platform is
@@ -52,6 +63,11 @@ library project SDLAda is
"-I/usr/local/include",
"-D_REENTRANT");
+ when "macos_ports" =>
+ C_Switches := C_Switches & ("-DSDL_MACPORTS",
+ "-I/opt/local/include",
+ "-D_THREAD_SAFE");
+
when others =>
null;
end case;
@@ -59,4 +75,33 @@ library project SDLAda is
for Default_Switches ("C") use Common_Switches & C_Switches;
for Default_Switches ("Ada") use Common_Switches & Ada_Switches;
end Compiler;
+
+ package Linker is
+ Linker_Switches := ();
+
+ case Platform is
+ when "linux" | "bsd" | "android" | "windows" =>
+ Linker_Switches := Linker_Switches & ("-lSDL2",
+ "-lSDL2_ttf",
+ "-lSDL2_image",
+ "-L/usr/lib64");
+
+ when "macos_homebrew" =>
+ Linker_Switches := Linker_Switches & ("-lSDL2",
+ "-lSDL2_ttf",
+ "-lSDL2_image",
+ "-L/usr/local/lib");
+
+ when "macos_ports" =>
+ Linker_Switches := Linker_Switches & ("-lSDL2",
+ "-lSDL2_ttf",
+ "-lSDL2_image",
+ "-L/opt/local/lib");
+
+ when others =>
+ null;
+ end case;
+
+ for Switches ("Ada") use Linker_Switches;
+ end Linker;
end SDLAda;
diff --git a/build/gnat/sdlada_image.gpr b/build/gnat/sdlada_image.gpr index 1098095..5a9764f 100644
--- a/build/gnat/sdlada_image.gpr
+++ b/build/gnat/sdlada_image.gpr
@@ -11,4 +11,5 @@ library project SDLAda_Image is
for Library_Version use "libsdlada_image.so." & Version;
package Compiler renames SDLAda.Compiler;
+ package Linker renames SDLAda.Linker;
end SDLAda_Image;
diff --git a/build/gnat/tests.gpr b/build/gnat/tests.gpr
index 70dceff..51ee201 100644
--- a/build/gnat/tests.gpr
+++ b/build/gnat/tests.gpr
@@ -15,24 +15,5 @@ project Tests is
"ttf.adb");
package Compiler renames SDLAda.Compiler;
-
- package Linker is
-
- Linker_Switches := ();
-
- case Sdlada.Platform is
- when "macos_homebrew" =>
- Linker_Switches := Linker_Switches & ("-lSDL2",
- "-lSDL2_ttf",
- "-lSDL2_image",
- "-L/usr/local/lib");
-
- when others =>
- null;
- end case;
-
- for Switches ("Ada") use Linker_Switches;
-
- end Linker;
-
+ package Linker renames SDLAda.Linker;
end Tests;
diff --git a/build/gnat/tests_image.gpr b/build/gnat/tests_image.gpr
index f23be3c..fd68309 100644
--- a/build/gnat/tests_image.gpr
+++ b/build/gnat/tests_image.gpr
@@ -8,6 +8,7 @@ project Tests_Image is
for Main use ("load_surface.adb");
package Compiler renames SDLAda.Compiler;
+ package Linker renames SDLAda.Linker;
-- package Builder is
-- for Default_Switches ("Ada") use ("-gnat2012", "-gnata");
--, "-gnatG");
diff --git a/build/gnat/unit_tests.gpr b/build/gnat/unit_tests.gpr
index c469a34..27dd38f 100644
--- a/build/gnat/unit_tests.gpr
+++ b/build/gnat/unit_tests.gpr
@@ -17,4 +17,5 @@ project Unit_Tests is
-- end Ide;
package Compiler renames SDLAda.Compiler;
+ package Linker renames SDLAda.Linker;
end Unit_Tests;
diff --git a/src/image/version_images.c b/src/image/version_images.c
index ba5be68..47813a1 100644
--- a/src/image/version_images.c
+++ b/src/image/version_images.c
@@ -21,7 +21,7 @@
* distribution.
**********************************************************************************************************************/
#ifdef __APPLE__
- #ifdef SDL_HOMEBREW
+ #if defined (SDL_HOMEBREW) || defined (SDL_MACPORTS)
#include <SDL2/SDL_image.h>
#else
#include <SDL2_image/SDL_image.h>
diff --git a/src/ttf/version_ttf.c b/src/ttf/version_ttf.c
index cedfebc..0819103 100644
--- a/src/ttf/version_ttf.c
+++ b/src/ttf/version_ttf.c
@@ -21,7 +21,7 @@
* distribution.
**********************************************************************************************************************/So, I haven't applied a patch in reverse before :-)
#ifdef __APPLE__
- #ifdef SDL_HOMEBREW
+ #if defined (SDL_HOMEBREW) || defined (SDL_MACPORTS)
#include <SDL2/SDL_ttf.h>
#else
#include <SDL2_ttf/SDL_ttf.h>
You posted the output of running patch -p1 --dry-run < patch while inside the build/gnat directory.
For the simple diffs, I can apply manually, but for the more intensive diffs, I'll probably run into trouble.
So, I need the patch file (?)
I save the output you posted, I manually try to implement the changes and generate a diff and see if my diff matches your diff?
I guess my brain is too old here :-(
Please spoon-feed me here (*SIGH*)
I really appreciate the work you've put in to try to make this SDLAda package work under MacPorts...
Thanks,
Ken
On Sunday, July 2, 2023 at 2:40:15 PM UTC-7, Luke A. Guest wrote:
On 02/07/2023 21:20, Kenneth Wolcott wrote:
You posted the output of running patch -p1 --dry-run < patch while inside the build/gnat directory.No, that';s the command to test the patch on the source. To apply it you
remove the dry run option.
Just save the email, cut out the crap that's not the patch and then save
it as test.patch as the above command should say (after the "<"), dunno
what happened there.
Thank you.
I think saved the contents of the posting where the first diff starts as test.patch.
I downloaded a fresh sdlada package from GitHub, calling it sdlada2.
I then placed the test.patch file there.
Results:
patch -p1 --dry-run < test.patch
patching file 'build/gnat/makefile'
patch: **** malformed patch at line 7: tests.gpr: $(TESTS_SRCS) gen/$(SDL_MODE)/test/libtestmaths.so
Did I do something wrong?
I don't think that downloading the zip file from GitHub would be any different than doing the git clone, butJust clone it.
On 02/07/2023 22:59, Kenneth Wolcott wrote:
On Sunday, July 2, 2023 at 2:40:15 PM UTC-7, Luke A. Guest wrote:
On 02/07/2023 21:20, Kenneth Wolcott wrote:
You posted the output of running patch -p1 --dry-run < patch while inside the build/gnat directory.No, that';s the command to test the patch on the source. To apply it you >> remove the dry run option.
Just save the email, cut out the crap that's not the patch and then save >> it as test.patch as the above command should say (after the "<"), dunno >> what happened there.
Thank you.
I think saved the contents of the posting where the first diff starts as test.patch.
I downloaded a fresh sdlada package from GitHub, calling it sdlada2.
I then placed the test.patch file there.
Results:
patch -p1 --dry-run < test.patch
patching file 'build/gnat/makefile'
patch: **** malformed patch at line 7: tests.gpr: $(TESTS_SRCS) gen/$(SDL_MODE)/test/libtestmaths.so
Did I do something wrong?No idea. This is what I did it with:
$ git clone g...@github.com:Lucretia/sdlada.git
Cloning into 'sdlada'...
remote: Enumerating objects: 3100, done.
remote: Counting objects: 100% (257/257), done.
remote: Compressing objects: 100% (104/104), done.
remote: Total 3100 (delta 156), reused 227 (delta 144), pack-reused 2843 Receiving objects: 100% (3100/3100), 727.62 KiB | 303.00 KiB/s, done. Resolving deltas: 100% (2269/2269), done.
$ cd sdlada/
$ patch -p1 --dry-run < ~/src/mine-new/game-dev/sdl/sdlada/test.patch checking file build/gnat/makefile
checking file build/gnat/sdlada.gpr
checking file build/gnat/sdlada_image.gpr
checking file build/gnat/tests.gpr
checking file build/gnat/tests_image.gpr
checking file build/gnat/unit_tests.gpr
checking file src/image/version_images.c
checking file src/ttf/version_ttf.c
Hi Luke;
I wonder if there was an error introduced by the copy&paste with the mouse and/or with the formatting of the posting/email...I'll try to examine that specific area to see if anything shows up under a closer inspection.
I don't think that downloading the zip file from GitHub would be any different than doing the git clone, but there's another difference that might be a cause, ever so remote.
I'll try to get back to you with results shortly.
Again, thanks for your efforts with regards to porting SDLADA towards MacPorts...
Ken
On Monday, July 3, 2023 at 1:11:29 PM UTC-7, Luke A. Guest wrote:
On 03/07/2023 20:58, Kenneth Wolcott wrote:Hi Luke;
I don't think that downloading the zip file from GitHub would be any different than doing the git clone, butJust clone it.
I've cloned the package.
I've manually applied the patch to the cloned package.
I'm about to build it now (fingers crossed).
Thanks,
Ken
On 03/07/2023 20:58, Kenneth Wolcott wrote:
I don't think that downloading the zip file from GitHub would be any different than doing the git clone, butJust clone it.
On Monday, July 3, 2023 at 3:56:27 PM UTC-7, Kenneth Wolcott wrote:
On Monday, July 3, 2023 at 1:11:29 PM UTC-7, Luke A. Guest wrote:
On 03/07/2023 20:58, Kenneth Wolcott wrote:Hi Luke;
I don't think that downloading the zip file from GitHub would be any different than doing the git clone, butJust clone it.
I've cloned the package.
I've manually applied the patch to the cloned package.
I'm about to build it now (fingers crossed).
Thanks,Well, I must have made one or more mistakes in the manual patching of the files (*SIGH*)
Ken
make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ -Ptools.gpr
Setup
[mkdir] object directory for project Tools
Compile
[Ada] gen_keyboard.adb
[Ada] scancodes.ads
[Ada] utils.adb
Bind
[gprbind] gen_keyboard.bexch
[Ada] gen_keyboard.ali
Link
[link] gen_keyboard.adb
./gen/release/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ -Psdlada.gpr
sdlada.gpr:16:07: undefined attribute "default_swiches"
sdlada.gpr:17:03: ";" after declarative items expected
sdlada.gpr:26:09: a variable cannot be declared for the first time here sdlada.gpr:26:23: unknown variable "C_Switches"
sdlada.gpr:34:08: undefined attribute "languages"
sdlada.gpr:35:08: undefined attribute "source_dirs"
sdlada.gpr:42:08: undefined attribute "library_name"
sdlada.gpr:43:08: undefined attribute "object_dir"
sdlada.gpr:44:08: undefined attribute "library_dir"
sdlada.gpr:45:08: undefined attribute "library_kind"
sdlada.gpr:47:04: a package cannot be declared here
sdlada.gpr:79:04: a package cannot be declared here
sdlada.gpr:108:05: expected "builder"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Ken
Kenneth Wolcott writes:
[...]
After adding a semi-colon at the following line in sdlada.gpr
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");[...]
Unless "-gnat202" requests the version of Ada that was current during
the reign of Septimius Severus, you probably want to use "-gnat2022". (Options can be abbreviated, but "-gnat202" may become ambiguous if
there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest copy-and-pasting any code you post.
--
Keith Thompson
After adding a semi-colon at the following line in sdlada.gpr[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
./gen/release/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \
-Psdlada.gpr
sdlada.gpr:16:07: undefined attribute "default_swiches"
sdlada.gpr:17:03: ";" after declarative items expected
sdlada.gpr:26:09: a variable cannot be declared for the first time here sdlada.gpr:26:23: unknown variable "C_Switches"
sdlada.gpr:34:08: undefined attribute "languages"
sdlada.gpr:35:08: undefined attribute "source_dirs"
sdlada.gpr:42:08: undefined attribute "library_name"
sdlada.gpr:43:08: undefined attribute "object_dir"
sdlada.gpr:44:08: undefined attribute "library_dir"
sdlada.gpr:45:08: undefined attribute "library_kind"
sdlada.gpr:47:04: a package cannot be declared here
sdlada.gpr:79:04: a package cannot be declared here
sdlada.gpr:108:05: expected "builder"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Ken
Kenneth Wolcott <kennethwolcott@gmail.com> writes:
[...]
After adding a semi-colon at the following line in sdlada.gpr[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during
the reign of Septimius Severus, you probably want to use "-gnat2022". (Options can be abbreviated, but "-gnat202" may become ambiguous if
there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest copy-and-pasting any code you post.
On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote:
Kenneth Wolcott writes:
[...]
After adding a semi-colon at the following line in sdlada.gpr[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during
the reign of Septimius Severus, you probably want to use "-gnat2022".
(Options can be abbreviated, but "-gnat202" may become ambiguous if
there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest
copy-and-pasting any code you post.
--
Keith Thompson
Thank you, Keith :-)
Fixed those two typos.
Here's the current output from trying to build:
make SDL_PLATFORM=macos_ports SDL_MODE=debug
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \
-Psdlada.gpr
sdlada.gpr:26:09: a variable cannot be declared for the first time here sdlada.gpr:26:23: unknown variable "C_Switches"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Thanks,
Ken
On 04/07/2023 00:58, Kenneth Wolcott wrote:
On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote:
Kenneth Wolcott writes:
[...]
After adding a semi-colon at the following line in sdlada.gpr[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during
the reign of Septimius Severus, you probably want to use "-gnat2022".
(Options can be abbreviated, but "-gnat202" may become ambiguous if
there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest
copy-and-pasting any code you post.
--
Keith Thompson
Thank you, Keith :-)
Fixed those two typos.
Here's the current output from trying to build:
make SDL_PLATFORM=macos_ports SDL_MODE=debug
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \ -Psdlada.gpr
sdlada.gpr:26:09: a variable cannot be declared for the first time here sdlada.gpr:26:23: unknown variable "C_Switches"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Thanks,This makes no sense, line 26 is this:
Ken
Source_Platform := "../../src/" & Platform;
On Thursday, July 6, 2023 at 12:37:20 PM UTC-7, Kenneth Wolcott wrote:communicating. I can share a different email address which is already being heavily spammed...
On Tuesday, July 4, 2023 at 2:00:11 AM UTC-7, Luke A. Guest wrote:
On 04/07/2023 00:58, Kenneth Wolcott wrote:
On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote:
Kenneth Wolcott writes:
[...]
After adding a semi-colon at the following line in sdlada.gpr[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during >> the reign of Septimius Severus, you probably want to use "-gnat2022". >> (Options can be abbreviated, but "-gnat202" may become ambiguous if >> there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest
copy-and-pasting any code you post.
--
Keith Thompson
Thank you, Keith :-)
Fixed those two typos.
Here's the current output from trying to build:
make SDL_PLATFORM=macos_ports SDL_MODE=debug
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \ -Psdlada.gpr
sdlada.gpr:26:09: a variable cannot be declared for the first time here
sdlada.gpr:26:23: unknown variable "C_Switches"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Hi Luke;Thanks,This makes no sense, line 26 is this:
Ken
Source_Platform := "../../src/" & Platform;
Is it possible for us to arrange a process to send the patch to me in another means? If Google Groups blocks attachments and I'm getting massively confused with the content being pasted inside the posting, we need to derive another means of
Thanks,Hi Luke;
Ken
Please email the patch to me as an attachment using the email address: kwol...@yahoo.com...
Please also provide a checksum of some kind so I know that the file didn't get corrupted en-route.
Thanks,
Ken
On Tuesday, July 4, 2023 at 2:00:11 AM UTC-7, Luke A. Guest wrote:communicating. I can share a different email address which is already being heavily spammed...
On 04/07/2023 00:58, Kenneth Wolcott wrote:
On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote:
Kenneth Wolcott writes:
[...]
After adding a semi-colon at the following line in sdlada.gpr[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during >> the reign of Septimius Severus, you probably want to use "-gnat2022". >> (Options can be abbreviated, but "-gnat202" may become ambiguous if
there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest >> copy-and-pasting any code you post.
--
Keith Thompson
Thank you, Keith :-)
Fixed those two typos.
Here's the current output from trying to build:
make SDL_PLATFORM=macos_ports SDL_MODE=debug
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \ -Psdlada.gpr
sdlada.gpr:26:09: a variable cannot be declared for the first time here sdlada.gpr:26:23: unknown variable "C_Switches"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Hi Luke;Thanks,This makes no sense, line 26 is this:
Ken
Source_Platform := "../../src/" & Platform;
Is it possible for us to arrange a process to send the patch to me in another means? If Google Groups blocks attachments and I'm getting massively confused with the content being pasted inside the posting, we need to derive another means of
Thanks,
Ken
On Thursday, July 6, 2023 at 6:23:51 PM UTC-7, Kenneth Wolcott wrote:communicating. I can share a different email address which is already being heavily spammed...
On Thursday, July 6, 2023 at 12:37:20 PM UTC-7, Kenneth Wolcott wrote:
On Tuesday, July 4, 2023 at 2:00:11 AM UTC-7, Luke A. Guest wrote:
On 04/07/2023 00:58, Kenneth Wolcott wrote:
On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote:
Kenneth Wolcott writes:
[...]
After adding a semi-colon at the following line in sdlada.gpr[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during
the reign of Septimius Severus, you probably want to use "-gnat2022".
(Options can be abbreviated, but "-gnat202" may become ambiguous if >> there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest
copy-and-pasting any code you post.
--
Keith Thompson
Thank you, Keith :-)
Fixed those two typos.
Here's the current output from trying to build:
make SDL_PLATFORM=macos_ports SDL_MODE=debug
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \ -Psdlada.gpr
sdlada.gpr:26:09: a variable cannot be declared for the first time here
sdlada.gpr:26:23: unknown variable "C_Switches"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Hi Luke;Thanks,This makes no sense, line 26 is this:
Ken
Source_Platform := "../../src/" & Platform;
Is it possible for us to arrange a process to send the patch to me in another means? If Google Groups blocks attachments and I'm getting massively confused with the content being pasted inside the posting, we need to derive another means of
Thanks,Hi Luke;
Ken
Please email the patch to me as an attachment using the email address: [redacted :-) ]
Please also provide a checksum of some kind so I know that the file didn't get corrupted en-route.
Thanks,The email address is kwolcott at yahoo dot com.
Ken
On Thursday, July 6, 2023 at 6:25:42 PM UTC-7, Kenneth Wolcott wrote:communicating. I can share a different email address which is already being heavily spammed...
On Thursday, July 6, 2023 at 6:23:51 PM UTC-7, Kenneth Wolcott wrote:
On Thursday, July 6, 2023 at 12:37:20 PM UTC-7, Kenneth Wolcott wrote:
On Tuesday, July 4, 2023 at 2:00:11 AM UTC-7, Luke A. Guest wrote:
On 04/07/2023 00:58, Kenneth Wolcott wrote:
On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote:
Kenneth Wolcott writes:
[...]
After adding a semi-colon at the following line in sdlada.gpr >>>[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during
the reign of Septimius Severus, you probably want to use "-gnat2022".
(Options can be abbreviated, but "-gnat202" may become ambiguous if
there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest
copy-and-pasting any code you post.
--
Keith Thompson
Thank you, Keith :-)
Fixed those two typos.
Here's the current output from trying to build:
make SDL_PLATFORM=macos_ports SDL_MODE=debug
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \
-Psdlada.gpr
sdlada.gpr:26:09: a variable cannot be declared for the first time here
sdlada.gpr:26:23: unknown variable "C_Switches"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Hi Luke;Thanks,This makes no sense, line 26 is this:
Ken
Source_Platform := "../../src/" & Platform;
Is it possible for us to arrange a process to send the patch to me in another means? If Google Groups blocks attachments and I'm getting massively confused with the content being pasted inside the posting, we need to derive another means of
Thanks,Hi Luke;
Ken
Please email the patch to me as an attachment using the email address: [redacted :-) ]
Please also provide a checksum of some kind so I know that the file didn't get corrupted en-route.
Hi Luke;Thanks,The email address is kwolcott at yahoo dot com.
Ken
Thanks for the patch via email.
The md5sum matches...
I ran git restore in the sdlada git clone directory...
I then applied the patch:
patch -p1 < test.patch
patching file 'build/gnat/makefile'
patching file 'build/gnat/sdlada.gpr'
patching file 'build/gnat/sdlada_image.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/tests.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/tests_image.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/unit_tests.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'src/image/version_images.c'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'src/ttf/version_ttf.c'
Reversed (or previously applied) patch detected! Assume -R? [y] y
Attempting to build:
make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ -Psdlada.gpr
Setup
[mkdir] object directory for project SDLAda
sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects
sdlada.gpr:30:39: "../../src/macos_ports" is not a valid directory
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
So, what did I do wrong this time?
Thanks,
Ken
On Tuesday, July 11, 2023 at 10:43:37 PM UTC-7, Kenneth Wolcott wrote:communicating. I can share a different email address which is already being heavily spammed...
On Thursday, July 6, 2023 at 6:25:42 PM UTC-7, Kenneth Wolcott wrote:
On Thursday, July 6, 2023 at 6:23:51 PM UTC-7, Kenneth Wolcott wrote: >>>> On Thursday, July 6, 2023 at 12:37:20 PM UTC-7, Kenneth Wolcott wrote: >>>>> On Tuesday, July 4, 2023 at 2:00:11 AM UTC-7, Luke A. Guest wrote: >>>>>> On 04/07/2023 00:58, Kenneth Wolcott wrote:
Hi Luke;On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote: >>>>>>>> Kenneth Wolcott writes:This makes no sense, line 26 is this:
[...]
After adding a semi-colon at the following line in sdlada.gpr >>>>>>>>>[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during >>>>>>>> the reign of Septimius Severus, you probably want to use "-gnat2022". >>>>>>>> (Options can be abbreviated, but "-gnat202" may become ambiguous if >>>>>>>> there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest >>>>>>>> copy-and-pasting any code you post.
--
Keith Thompson
Thank you, Keith :-)
Fixed those two typos.
Here's the current output from trying to build:
make SDL_PLATFORM=macos_ports SDL_MODE=debug
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \ >>>>>>> -Psdlada.gpr
sdlada.gpr:26:09: a variable cannot be declared for the first time here >>>>>>> sdlada.gpr:26:23: unknown variable "C_Switches"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Thanks,
Ken
Source_Platform := "../../src/" & Platform;
Is it possible for us to arrange a process to send the patch to me in another means? If Google Groups blocks attachments and I'm getting massively confused with the content being pasted inside the posting, we need to derive another means of
Hi Luke;The email address is kwolcott at yahoo dot com.Hi Luke;
Thanks,
Ken
Please email the patch to me as an attachment using the email address: [redacted :-) ]
Please also provide a checksum of some kind so I know that the file didn't get corrupted en-route.
Thanks,
Ken
Thanks for the patch via email.
The md5sum matches...
I ran git restore in the sdlada git clone directory...
I then applied the patch:
patch -p1 < test.patch
patching file 'build/gnat/makefile'
patching file 'build/gnat/sdlada.gpr'
patching file 'build/gnat/sdlada_image.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/tests.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/tests_image.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/unit_tests.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'src/image/version_images.c'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'src/ttf/version_ttf.c'
Reversed (or previously applied) patch detected! Assume -R? [y] y
Attempting to build:
make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \
-Psdlada.gpr
Setup
[mkdir] object directory for project SDLAda
sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects
sdlada.gpr:30:39: "../../src/macos_ports" is not a valid directory
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
So, what did I do wrong this time?
Thanks,
Ken
Ok,
I deleted the contents of the sdlada git clone directory...
then did a git restore .
then applied the patch
then ran make.
Still fails...
*****************************************************************
patch -p1 < test.patch
patching file 'build/gnat/makefile'
patching file 'build/gnat/sdlada.gpr'
patching file 'build/gnat/sdlada_image.gpr'
patching file 'build/gnat/tests.gpr'
patching file 'build/gnat/tests_image.gpr'
patching file 'build/gnat/unit_tests.gpr'
patching file 'src/image/version_images.c'
patching file 'src/ttf/version_ttf.c'
sdlada: cd build/gnat
gnat: make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \
-Ptools.gpr
Setup
[mkdir] object directory for project Tools
Compile
[Ada] gen_keyboard.adb
[Ada] scancodes.ads
[Ada] utils.adb
Bind
[gprbind] gen_keyboard.bexch
[Ada] gen_keyboard.ali
Link
[link] gen_keyboard.adb
./gen/release/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \
-Psdlada.gpr
Setup
[mkdir] object directory for project SDLAda
sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects
sdlada.gpr:30:39: "../../src/macos_ports" is not a valid directory
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5 *****************************************************************
On 12/07/2023 07:01, Kenneth Wolcott wrote:communicating. I can share a different email address which is already being heavily spammed...
On Tuesday, July 11, 2023 at 10:43:37 PM UTC-7, Kenneth Wolcott wrote:
On Thursday, July 6, 2023 at 6:25:42 PM UTC-7, Kenneth Wolcott wrote: >>> On Thursday, July 6, 2023 at 6:23:51 PM UTC-7, Kenneth Wolcott wrote: >>>> On Thursday, July 6, 2023 at 12:37:20 PM UTC-7, Kenneth Wolcott wrote:
On Tuesday, July 4, 2023 at 2:00:11 AM UTC-7, Luke A. Guest wrote: >>>>>> On 04/07/2023 00:58, Kenneth Wolcott wrote:
Hi Luke;On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote: >>>>>>>> Kenneth Wolcott writes:This makes no sense, line 26 is this:
[...]
After adding a semi-colon at the following line in sdlada.gpr >>>>>>>>>[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during
the reign of Septimius Severus, you probably want to use "-gnat2022".
(Options can be abbreviated, but "-gnat202" may become ambiguous if >>>>>>>> there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest
copy-and-pasting any code you post.
--
Keith Thompson
Thank you, Keith :-)
Fixed those two typos.
Here's the current output from trying to build:
make SDL_PLATFORM=macos_ports SDL_MODE=debug
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \ >>>>>>> -Psdlada.gpr
sdlada.gpr:26:09: a variable cannot be declared for the first time here
sdlada.gpr:26:23: unknown variable "C_Switches"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Thanks,
Ken
Source_Platform := "../../src/" & Platform;
Is it possible for us to arrange a process to send the patch to me in another means? If Google Groups blocks attachments and I'm getting massively confused with the content being pasted inside the posting, we need to derive another means of
Hi Luke;The email address is kwolcott at yahoo dot com.Hi Luke;
Thanks,
Ken
Please email the patch to me as an attachment using the email address: [redacted :-) ]
Please also provide a checksum of some kind so I know that the file didn't get corrupted en-route.
Thanks,
Ken
Thanks for the patch via email.
The md5sum matches...
I ran git restore in the sdlada git clone directory...
I then applied the patch:
patch -p1 < test.patch
patching file 'build/gnat/makefile'
patching file 'build/gnat/sdlada.gpr'
patching file 'build/gnat/sdlada_image.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/tests.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/tests_image.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/unit_tests.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'src/image/version_images.c'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'src/ttf/version_ttf.c'
Reversed (or previously applied) patch detected! Assume -R? [y] y
Attempting to build:
make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \
-Psdlada.gpr
Setup
[mkdir] object directory for project SDLAda
sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects
sdlada.gpr:30:39: "../../src/macos_ports" is not a valid directory
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
So, what did I do wrong this time?
Thanks,
Ken
Ok,
I deleted the contents of the sdlada git clone directory...
then did a git restore .
then applied the patch
then ran make.
Still fails...
*****************************************************************Check the sdlada.gpr, it will get the platform name as the src dir too,
patch -p1 < test.patch
patching file 'build/gnat/makefile'
patching file 'build/gnat/sdlada.gpr'
patching file 'build/gnat/sdlada_image.gpr'
patching file 'build/gnat/tests.gpr'
patching file 'build/gnat/tests_image.gpr'
patching file 'build/gnat/unit_tests.gpr'
patching file 'src/image/version_images.c'
patching file 'src/ttf/version_ttf.c'
sdlada: cd build/gnat
gnat: make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ -Ptools.gpr
Setup
[mkdir] object directory for project Tools
Compile
[Ada] gen_keyboard.adb
[Ada] scancodes.ads
[Ada] utils.adb
Bind
[gprbind] gen_keyboard.bexch
[Ada] gen_keyboard.ali
Link
[link] gen_keyboard.adb
./gen/release/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ -Psdlada.gpr
Setup
[mkdir] object directory for project SDLAda
sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects
sdlada.gpr:30:39: "../../src/macos_ports" is not a valid directory gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5 *****************************************************************
I forgot about that. Change:
case Platform is
when "macos_homebrew" =>
to:
case Platform is
when "macos_homebrew" | "macos_ports" | "macosx" =>
On Wednesday, July 12, 2023 at 8:44:20 AM UTC-7, Luke A. Guest wrote:communicating. I can share a different email address which is already being heavily spammed...
On 12/07/2023 07:01, Kenneth Wolcott wrote:
On Tuesday, July 11, 2023 at 10:43:37 PM UTC-7, Kenneth Wolcott wrote:
On Thursday, July 6, 2023 at 6:25:42 PM UTC-7, Kenneth Wolcott wrote: >>> On Thursday, July 6, 2023 at 6:23:51 PM UTC-7, Kenneth Wolcott wrote:
On Thursday, July 6, 2023 at 12:37:20 PM UTC-7, Kenneth Wolcott wrote:
On Tuesday, July 4, 2023 at 2:00:11 AM UTC-7, Luke A. Guest wrote: >>>>>> On 04/07/2023 00:58, Kenneth Wolcott wrote:
Hi Luke;On Monday, July 3, 2023 at 4:24:37 PM UTC-7, Keith Thompson wrote:This makes no sense, line 26 is this:
Kenneth Wolcott writes:
[...]
After adding a semi-colon at the following line in sdlada.gpr >>>>>>>>>[...]
for Default_Swiches ("Ada") use ("-gnat202", "-gnata");
Unless "-gnat202" requests the version of Ada that was current during
the reign of Septimius Severus, you probably want to use "-gnat2022".
(Options can be abbreviated, but "-gnat202" may become ambiguous if
there's a new Ada standard before 2030.)
Also "Default_Swiches" is mispelled.
If the typos are the result of re-typing that line, I strongly suggest
copy-and-pasting any code you post.
--
Keith Thompson
Thank you, Keith :-)
Fixed those two typos.
Here's the current output from trying to build:
make SDL_PLATFORM=macos_ports SDL_MODE=debug
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=debug -XSDL_PLATFORM=macos_ports \
-Psdlada.gpr
sdlada.gpr:26:09: a variable cannot be declared for the first time here
sdlada.gpr:26:23: unknown variable "C_Switches"
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
Thanks,
Ken
Source_Platform := "../../src/" & Platform;
Is it possible for us to arrange a process to send the patch to me in another means? If Google Groups blocks attachments and I'm getting massively confused with the content being pasted inside the posting, we need to derive another means of
Hi Luke;The email address is kwolcott at yahoo dot com.Hi Luke;
Thanks,
Ken
Please email the patch to me as an attachment using the email address: [redacted :-) ]
Please also provide a checksum of some kind so I know that the file didn't get corrupted en-route.
Thanks,
Ken
Thanks for the patch via email.
The md5sum matches...
I ran git restore in the sdlada git clone directory...
I then applied the patch:
patch -p1 < test.patch
patching file 'build/gnat/makefile'
patching file 'build/gnat/sdlada.gpr'
patching file 'build/gnat/sdlada_image.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/tests.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/tests_image.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'build/gnat/unit_tests.gpr'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'src/image/version_images.c'
Reversed (or previously applied) patch detected! Assume -R? [y] y
patching file 'src/ttf/version_ttf.c'
Reversed (or previously applied) patch detected! Assume -R? [y] y
Attempting to build:
make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ >> -Psdlada.gpr
Setup
[mkdir] object directory for project SDLAda
sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects
sdlada.gpr:30:39: "../../src/macos_ports" is not a valid directory
gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5
So, what did I do wrong this time?
Thanks,
Ken
1.5. Running git clone again to obtain fresh sdlada source :-)Ok,
I deleted the contents of the sdlada git clone directory...
then did a git restore .
then applied the patch
then ran make.
Still fails...
*****************************************************************Check the sdlada.gpr, it will get the platform name as the src dir too,
patch -p1 < test.patch
patching file 'build/gnat/makefile'
patching file 'build/gnat/sdlada.gpr'
patching file 'build/gnat/sdlada_image.gpr'
patching file 'build/gnat/tests.gpr'
patching file 'build/gnat/tests_image.gpr'
patching file 'build/gnat/unit_tests.gpr'
patching file 'src/image/version_images.c'
patching file 'src/ttf/version_ttf.c'
sdlada: cd build/gnat
gnat: make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ -Ptools.gpr
Setup
[mkdir] object directory for project Tools
Compile
[Ada] gen_keyboard.adb
[Ada] scancodes.ads
[Ada] utils.adb
Bind
[gprbind] gen_keyboard.bexch
[Ada] gen_keyboard.ali
Link
[link] gen_keyboard.adb
./gen/release/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ -Psdlada.gpr
Setup
[mkdir] object directory for project SDLAda
sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects
sdlada.gpr:30:39: "../../src/macos_ports" is not a valid directory gprbuild: "sdlada.gpr" processing failed
make: *** [lib/libadasdl.a] Error 5 *****************************************************************
I forgot about that. Change:
case Platform is
when "macos_homebrew" =>
to:
case Platform isAfter
when "macos_homebrew" | "macos_ports" | "macosx" =>
1. Completely deleting the cloned instance of sdlada;
2. Applying the patch you provided via email;
3. manually modifying sdlada.gpr as you directed above;
We have the following result:
*********************************************
make SDL_PLATFORM=macos_ports SDL_MODE=release
mkdir -p gen/src/
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ -Ptools.gpr
Setup
[mkdir] object directory for project Tools
Compile
[Ada] gen_keyboard.adb
[Ada] scancodes.ads
[Ada] utils.adb
Bind
[gprbind] gen_keyboard.bexch
[Ada] gen_keyboard.ali
Link
[link] gen_keyboard.adb
./gen/release/tools/gen_keyboard > gen/src/sdl-events-keyboards.ads
gprbuild -p -gnat2012 -XSDL_MODE=release -XSDL_PLATFORM=macos_ports \ -Psdlada.gpr
Setup
[mkdir] object directory for project SDLAda
sdlada.gpr:1:17: warning: Linker switches not taken into account in library projects
Compile
[C] version_ttf.c
[REDACTED]/sdlada/src/ttf/version_ttf.c:25:18: fatal error: SDL2/SDL_ttf.h: No such file or directory
25 | #include <SDL2/SDL_ttf.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
gprbuild: *** compilation phase failed
make: *** [lib/libadasdl.a] Error 4 *********************************************
Can you edit your replies cutting out irrelevant stuff so I don't have
to scroll through pages of stuff?
On 13/7/23 20:59, Luke A. Guest wrote:
Can you edit your replies cutting out irrelevant stuff so I don't have
to scroll through pages of stuff?
Or perhaps open an issue in the sdlada github project.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 399 |
Nodes: | 16 (3 / 13) |
Uptime: | 64:57:17 |
Calls: | 8,355 |
Calls today: | 15 |
Files: | 13,159 |
Messages: | 5,893,946 |
Posted today: | 1 |