TeXLive on x86_64?

Package is disabled by default (due to it’s size), so far I (and others) have been able to build it on both 32bit and 64bit, would be nice ad @Diver mentioned what the error is you are receiving :slight_smile:

If there are still problems with the package I can take another look and hopefully fix it.

Rebuilding atm on 64bit to have a look … will take some time though :slight_smile:

Ok. At least, I know it should work.
I’ve updated haikuporter (did not update Haiku for a while) and now I’m getting (after downloading-extracting, after autoreconf, after applying patches, last messages):
`Committing changes done in patch function for texlive-20210325-source.tar.xz

Patch function hasn’t changed anything for texlive-20210325-texmf.tar.xz
Patch function hasn’t changed anything for install-tl-unx.tar.gz
Patch function hasn’t changed anything for texlive-20210325-extra.tar.xz
[Errno -2147459069] No such file or directory: ‘/boot/home/Desktop/haikuports/repository/texlive-2021.DependencyInfo’`
Probably problem is not related to texlive recipe itself, but to my outdated installation. But… Will resulted packages appear on HaikuDepot?

Sorry for a dumb question, but (on another machine) after update to the latest nightly, after removing haikuports.conf and reinstalling haikuporter - I am still getting the same error :"[Errno -2147459069] No such file or directory: ‘/boot/home/haikuports/repository/texlive-2021.DependencyInfo’". I understand that it is something that should be created automatically at very beginning, as for plenty of another recipes. I understand, that it looks like some dumb minor problem, but… How can I create that .DependencyInfo file?

Maybe you need to uncomment ALLOW_UNTESTED="yes"?

I have it. Without it haikuporter would not even try to build the package.

Finally, I was able to build TexLive too. Removing “packages” and “repository” folders from haikuports tree solved the previous issue, where haikuporter did not produce .DependencyInfo file for no reason.
However, there are definitively issues in recipe itself.
I needed to comment out “rm -v tlpkg/{texlive.tlpdb,tlpostcode,README} readme-{html,txt}.dir README{,.usergroups} {index,doc}.html || true” command at line 713 in current recipe, because it tried to remove files before they are actually created. Also “cp -v $sourceDir4/tlpkg/README tlpkg” at line 716 should be commented out too, @jmairboeck already mentioned it.
I would not create neigther issue, nor pull request for it because I know @jmairboeck keep working on spliting of recipe. So, I just mention it here for someone else, who will try to built TexLive themself from the current recipe.

Indeed I am still working on that recipe. I have added one more pull request to split the texmf part into its own recipe, so that it can be a real “any” architecture package without having to deal with secondary architecture stuff. That should also fix the remaining problems of the existing recipe.

I have also started to think about how to split the texmf up into individual packages for the different “collections” in TeXLive, keeping the individual packages at a sane size. I have started writing a few scripts to generate the necessary parts for recipe (see Haiku texlive packaging scripts · GitHub), but I still have to put them together into the recipe and test it.

I am currently wondering whether haikuporter recipes can be “dynamic” enough to generate parts of them that depend on extracted sources. Theoretically it could be possible, because the build packages are only activated after the PATCH part but in practice, it is probably not so easy. Maybe we should just commit the generated part also in the haikuports Git repo if it doesn’t work otherwise.

This probably won’t be accepted.

Would something like $(perl -I $sourceDir3/tlpkg getpackageinfos.pl $sourceDir) even work? If I read haikuporter’s source correctly, it doesn’t use the actual shell to determine which packages to build but parses the variables from the recipe directly. So the generated output must be put directly into the recipe it seems.

I hope you don’t mind the ca. 1500 lines of package metadata (mostly SUMMARY, DESCRIPTION, REQUIRES and PROVIDES) in the recipe … :wink:

If you are curious, the output of getpackageinfos.pl currently looks like this: http://0x0.st/-tPg.txt

I would keep everything the subpackage, its docs and sources in the same subpackage. No need to make things more complicated.

It’s indeed OK to generate a recipe file locally and push it in a pull request. At the moment, dynamic recipes involve only bash scripts.
I had a look at the subpackages at Arch Linux and they seem equivalent, not too big also.

The reason I used perl for these scripts is because I use the API provided by TeXLive to extract information from the TeXLive package database (texlive.tlpdb). Using a shell script for that would have been significantly more complicated. I hope my perl code makes somewhat sense, because I’m not really an expert in perl :wink:

About the source and documentation parts: for typesetting documents they are not really required, for this, the runtime files would be enough. In fact @Begasus has questioned before whether we should install them at all. I am not really sure what to do with them.

1 Like

I understand the choice to generate with perl. For subpackages, it’s indeed possible to generate subpackages for every part, but the point was splitting in correctly sized hpkg files. 15 subpackages for instance make already a long recipe, enough information to pull in a repository…

1 Like

Hello all!
I’m new to this forum (although lurking and reading for some time) and I wanted to share a full guide on how to install the latest texlive onto Haiku. I had a tough time to piece everything together and wanted to post a step by step guide here, for all the newbies who are trying to find information on the net and are not so familiar with Haiku like myself.

Feel free to move this post to another area if this is not the appropriate thread!

I would suggest to use haikuporter from the git repositories since it is the most recent version and I didn’t succed in building texlive with the version from HaikuDepot.

  1. Clone HaikuPorter from the git repo

Open a Terminal and type the following:

git clone https://github.com/haikuports/haikuporter.git
git clone https://github.com/haikuports/haikuports.git --depth=10
cd haikuporter
cp haikuports-sample.conf /boot/home/config/settings/haikuports.conf # Copy the config file
lpe ~/config/settings/haikuports.conf # and edit it

These steps are from the official GitHub Page (GitHub - haikuports/haikuporter: The tool that builds HaikuPorts recipes.)

  1. Edit the haikuports.conf file

Uncomment ALLOW_UNTESTED → It is needed to build texlive since the package is still marked as untested.

ALLOW_UNTESTED="yes"

Write your name + Email in the Packager section of the configuration file.

PACKAGER="My Name <myname@gmail.com>"

Now we have set all the necessary options and can save the file and close the editor.

  1. Create an alias for HaikuPorter

To do this, we create the file “profile” under /boot/home/config:

lpe ~/config/settings/profile

edit-profile
and paste the following in:

function inpatch () { grep -rni $1 /boot/home/haikuports/*/*/patches/*; }
function inrecipe { find /boot/home/haikuports -maxdepth 3 \
            -name "*.recipe" | xargs grep -ni --col $1; }

alias hp="haikuporter -S -j8 --no-source-packages --get-dependencies"
  1. Build the ports

Now we continue to build the ports with the command from GitHub.
First change into the HaikuPorter folder again (cd ~/haikuporter) if you’re not already inside it.
Then use the following command:

ln -s /boot/home/haikuporter/haikuporter /boot/home/config/non-packaged/bin/

This is needed so haikuporters binary can be used from everywhere.
Now we update our dependencies

./haikuporter mesa --all-dependencies -j4

I used the “–all-dependencies” command just in case there are some old packages which are needed (I did not test if texlive builds without this option!)

Steps 1,3,4 are from the wiki: Home · haikuports/haikuports Wiki · GitHub

  1. Install texlive
    After all dependencies are updated, we can install texlive with the following command:
hp texlive

HP now starts to install texlive.

First it will download all the necessary files: thats around 3.6GB for texlive (screenshot on the bottom). This takes some time! (download about 45minutes, depending on your connection)

After everything is downloaded, it will take some time to unpack all the files! (Be patient, on my ryzen build this took ~35minutes)

Once everything is unpacked, the install is finished.

To verify that building of the packages succeeded we need to check that the folder under /boot/home/haikuports/packages contains all the .hpkg files:

cd ~/haikuports/packages
ls

If the folder is full with .hpkg files, we can use pkgman to install everything:

pkgman install *

pkgman install

pkgman now installs all the packages to our Haiku system and we are now ready to use them!

  1. Install Latex IDE / Environment
    You can use one of the many ides provided in the HaikuDepot. I personally use Emacs with the auctex package (works fine!). For an easy to use setup, the BeTeX editor is a good choise.

Hope this helps you building texlive on Haiku from scratch!

A big thank you to @jmairboeck for building the reciepe and also for helping me out with all the questions I asked via email.

10 Likes

A lot of thanks for the time and work you have spwnt to create this tutorial!
Thanks alot!

I tried many times to learn how to use LaTex but could not start because the Latex files where missing.

I could use only the editors but could not sstart to learn anything without the LaTex core files!

If I have time I will try to follow your steps to install LaTex to start learning!

There should be a subtheme for tutorials here, but I am not sure the admins will add one.

BeSly is a not so nice to look for tutorials best leave it here for now.

3 Likes

BeTex is Haiku’s native TeX editor, there are a few others around also for Latex like TeXstudio and TeXmaker) :slight_smile:

Hello Begasus,

can you make TeXLive available on HaikuDepot?
Or do I have to follow the

tutorial to get it working?