Speedata: non-interactive desktop publishing

Hi there,

I'd like to port this software on FreeBSD:


But honestly my skills and knowledge are way below the 1%, and I don't have experience and knowledge to evaluate if a project can be attempt by a total inexpert but willing to learn, or if it requires advanced knowledge cause is too complex.

What's you opinion about it?
 
Hi there,

I'd like to port this software on FreeBSD:


But honestly my skills and knowledge are way below the 1%, and I don't have experience and knowledge to evaluate if a project can be attempt by a total inexpert but willing to learn, or if it requires advanced knowledge cause is too complex.

What's you opinion about it?
Although I use org-mode to build my PDF's, I think it is easier to use deskutils/mindforger if you aren't familiar with org-mode and/or TeX.
 
Last edited by a moderator:
Although I use org-mode to build my PDF's, I think it is easier to use MindForger if you aren't familiar with org-mode and/or TeX.

I am interested in Speedata because I am looking for a way to programming catalogs rather than designing them with software like Adobe inDesign.

The traditional way to realize catalogs is very inconvenient, very few flexible, prone to errors, and occupy 70% of my time.
 
I am interested in Speedata because I am looking for a way to programming catalogs rather than designing them with software like Adobe inDesign.

The traditional way to realize catalogs is very inconvenient, very few flexible, prone to errors, and occupy 70% of my time.
Give deskutils/mindforger a chance, it is a good software. But if you also want to learn how to port a package, stick with Speedata and go for it.
In that regard I want to port GCS as a way to learn the port process.
 
i built it and seems to work
Diff:
diff --git a/src/go/sphelper/buildlib/buildlib.go b/src/go/sphelper/buildlib/buildlib.go
index e9711155..462249cd 100644
--- a/src/go/sphelper/buildlib/buildlib.go
+++ b/src/go/sphelper/buildlib/buildlib.go
@@ -30,7 +30,9 @@ func BuildCLib(cfg *config.Config, goos string, goarch string) error {
         }
         cmd = exec.Command("clang", "-dynamiclib", "-target", triple, "-fPIC", "-undefined", "dynamic_lookup", "-o", filepath.Join(dylibbuild, "luaglue.so"), "luaglue.c", "-I/opt/homebrew/opt/lua@5.3/include/lua")
     case "linux":
-        cmd = exec.Command("cc", "-shared", "-fPIC", "-o", filepath.Join(dylibbuild, "luaglue.so"), "luaglue.c", "-I/usr/include/lua5.3/")
+        cmd = exec.Command("cc", "-shared", "-fPIC", "-o", filepath.Join(dylibbuild, "luaglue.so"), "luaglue.c", "-I/usr/include/lua5.3/")
+    case "freebsd":
+        cmd = exec.Command("cc", "-shared", "-fPIC", "-o", filepath.Join(dylibbuild, "luaglue.so"), "luaglue.c", "-I/usr/local/include/lua53/")
     case "windows":
         cmd = exec.Command("/usr/bin/x86_64-w64-mingw32-gcc", "-shared", "-o", filepath.Join(dylibbuild, "luaglue.dll"), "luaglue.c", "-I/usr/include/lua5.3/", "-L/luatex-bin/luatex/windows/amd64/default/", "-llua53w64", "-llibsplib", "-L"+dylibbuild)
     }
diff --git a/src/lua/sdini.lua b/src/lua/sdini.lua
index 2cb48a82..7b12983b 100644
--- a/src/lua/sdini.lua
+++ b/src/lua/sdini.lua
@@ -15,6 +15,8 @@ if os.name == "windows" then
   libname = "libsplib.dll"
 elseif os.name == "linux" then
   libname = "libsplib.so"
+elseif os.name == "freebsd" then
+  libname = "libsplib.so"
 else
   libname = "libsplib.dylib"
 end
you have to pkg install go rubygem-rake lua53 tex-luatex
besides the crude patch you need
ln -s /usr/local/bin/luatex bin/sdluatex
 
Well, FreeBSD does have a Porter's Handbook: https://docs.freebsd.org/en/books/porters-handbook/, it's got a LOT of info on how to make a port. covacat 's info does look encouraging - looks like that speedata thing will compile on FreeBSD with minimal modifications/patching. Looks like following the Porter's Handbook should work - provided OP pays attention and doesn't try to do stuff out of order. :)
 
Hello all, I am the author of the speedata Publisher. I don't have FreeBSD, so I can't really help testing, but if you think I can add something to the source code, please tell me.
the patch above will enable it to build/run once the prerequisites are met
i tested a few examples and it worked (fast!)
 
Oh nice!

This is totally unrelated but meanwhile I tried to compile it on Ubuntu ArmV7 (32bit) and it looks like it requires a 64bit integer and therefore failed.
 
Not sure what I should / can do. I used to have 32-bit Intel binaries until recently, so in principle it should or could compile for 32 bit. Do you think it is worth investigating? I don't know if there are a lot of 32 bit platforms that are supposed to run the speedata Publisher.
 
Not sure what I should / can do. I used to have 32-bit Intel binaries until recently, so in principle it should or could compile for 32 bit. Do you think it is worth investigating? I don't know if there are a lot of 32 bit platforms that are supposed to run the speedata Publisher.
I'll open a bug report on Github as soon as I can.
 
Not sure what I should / can do. I used to have 32-bit Intel binaries until recently, so in principle it should or could compile for 32 bit. Do you think it is worth investigating? I don't know if there are a lot of 32 bit platforms that are supposed to run the speedata Publisher.
One use scenario that comes to mind for 32-bit binaries:

When someone wants to play with virtualization, but has not figured out how to enable VT-x in BIOS (or has no access to it). In such cases, typically, FreeBSD is 64-bit, and will definitely support 32-bit virtualization. Concrete examples would include private server rental from an ISP, this is sometimes called a VPS (Virtual Private Server).
 
i built it and seems to work
Diff:
diff --git a/src/go/sphelper/buildlib/buildlib.go b/src/go/sphelper/buildlib/buildlib.go
index e9711155..462249cd 100644
--- a/src/go/sphelper/buildlib/buildlib.go
+++ b/src/go/sphelper/buildlib/buildlib.go
@@ -30,7 +30,9 @@ func BuildCLib(cfg *config.Config, goos string, goarch string) error {
         }
         cmd = exec.Command("clang", "-dynamiclib", "-target", triple, "-fPIC", "-undefined", "dynamic_lookup", "-o", filepath.Join(dylibbuild, "luaglue.so"), "luaglue.c", "-I/opt/homebrew/opt/lua@5.3/include/lua")
     case "linux":
-        cmd = exec.Command("cc", "-shared", "-fPIC", "-o", filepath.Join(dylibbuild, "luaglue.so"), "luaglue.c", "-I/usr/include/lua5.3/")
+        cmd = exec.Command("cc", "-shared", "-fPIC", "-o", filepath.Join(dylibbuild, "luaglue.so"), "luaglue.c", "-I/usr/include/lua5.3/")
+    case "freebsd":
+        cmd = exec.Command("cc", "-shared", "-fPIC", "-o", filepath.Join(dylibbuild, "luaglue.so"), "luaglue.c", "-I/usr/local/include/lua53/")
     case "windows":
         cmd = exec.Command("/usr/bin/x86_64-w64-mingw32-gcc", "-shared", "-o", filepath.Join(dylibbuild, "luaglue.dll"), "luaglue.c", "-I/usr/include/lua5.3/", "-L/luatex-bin/luatex/windows/amd64/default/", "-llua53w64", "-llibsplib", "-L"+dylibbuild)
     }
diff --git a/src/lua/sdini.lua b/src/lua/sdini.lua
index 2cb48a82..7b12983b 100644
--- a/src/lua/sdini.lua
+++ b/src/lua/sdini.lua
@@ -15,6 +15,8 @@ if os.name == "windows" then
   libname = "libsplib.dll"
 elseif os.name == "linux" then
   libname = "libsplib.so"
+elseif os.name == "freebsd" then
+  libname = "libsplib.so"
 else
   libname = "libsplib.dylib"
 end
you have to pkg install go rubygem-rake lua53 tex-luatex
besides the crude patch you need
ln -s /usr/local/bin/luatex bin/sdluatex

Sorry this is really beyond my ability but how can I apply this patch locally? I am trying to compile it by myself on my workstation.

I would really like to be a maintainer for this software but I believe I lack the skills and the knowledge... 😔
 
covacat

Thanks to your advice I compiled the software and it looks like is working fine:

```
./sp --version
Version: 4.15.12
```

Now I can use it in FreeBSD and for me it is great benefit!

Thank you very much for having submitted the patch upstream!
I am really excited! Don't need to go on Linux for working on it!

🙏
 
Hi Guys, new problems compiling Speedata Publisher

Code:
SDPRO=yes rake buildlib
go install -ldflags "-X main.basedir=/usr/home/freezr/Git/publisher -s"  speedatapublisher/sphelper/sphelper
/usr/home/freezr/Git/publisher/bin/sphelper buildlib
Building dynamic library for freebsd
logging.go:9:2: package log/slog is not in GOROOT (/usr/local/go120/src/log/slog)
note: imported by a module that requires go 1.21

exit status 1
rake aborted!
Command failed with status (255): [/usr/home/freezr/Git/publisher/bin/sphelper buildlib]
/usr/home/freezr/Git/publisher/Rakefile:42:in `block in <top (required)>'
Tasks: TOP => buildlib
(See full trace by running task with --trace)

For what I understood it is required an higher version of GO, so I downloaded go121-1.21.5 but I am still on 1.20. 😩

Code:
go version
go version go1.20.12 freebsd/amd64

How can I run the compilation with 1.21?

Thanks 🙏

P.s. Assuming I am right..😓
 
Use lang/go121 (it's 1.21.7) or lang/go122 (1.22.0). Then recompile your project against that.

Stick to ports or packages, don't go outside of that, for best results.

If you download a version of golang that is not integrated into ports, you're kind of on your own to deal with error messages (if you're stubborn enough).
 
Use lang/go121 (it's 1.21.7) or lang/go122 (1.22.0). Then recompile your project against that.

Stick to ports or packages, don't go outside of that, for best results.

If you download a version of golang that is not integrated into ports, you're kind of on your own to deal with error messages (if you're stubborn enough).

Thanks, sorry for my late reply, but I am experiencing one of the worst period of my life... 😭

I downloaded the go binary 121 but I don't know how to compile against it... 🤷‍♂️
 
I downloaded the go binary 121 but I don't know how to compile against it...
Is that binary a port/package or not? Is it properly installed, or is the downloaded installer file just sitting there not doing anything?

Compiling against a specific version of golang should not vary wildly from one version of golang to the next. If you figured out how to use version 1.20, later versions should not be that different. This is just an educated guess, but maybe pay attention to $PATH in context of golang configuration?
 
try to symlink /usr/local/bin/go to go121 or go122 if its still linked to go120

Actually that seems the practical solution:

Code:
lrwxr-xr-x    1 root wheel        5 Nov 18 07:04 go -> go120
lrwxr-xr-x    1 root wheel       15 Dec 18 20:21 go120 -> ../go120/bin/go
lrwxr-xr-x    1 root wheel       15 Mar  6 20:15 go121 -> ../go121/bin/go
lrwxr-xr-x    1 root wheel        8 Nov 18 07:04 gofmt -> gofmt120
lrwxr-xr-x    1 root wheel       18 Dec 18 20:21 gofmt120 -> ../go120/bin/gofmt
lrwxr-xr-x    1 root wheel       18 Mar  6 20:15 gofmt121 -> ../go121/bin/gofmt

Doesn't have FreeBSD any command like DebianAlternatives? That allows to select as default a different version of package available on your system?

Thanks!
 
Back
Top