Nice job, mate!
It was expected
Let’s see, how can we solve this problem:
As you can see, prefsDir not declared. Maybe it is a bug with the source code, i’m not really sure, but we have to fix it.
Open the app-office/scribus fodler, where your recipe resides right now. There will be one or more work folder too. We have to open the one with the current version number in the folder name, so 1.5.3.
There you can see, where all the magic happens, you can explore later, now navigate further into the sources fodler, it must have a scribus folder inside it, and inside the scribus folder you can actually find all the sources. Now go further into the scribus folder and search for scpaths.cpp file.
This is the file, about what the compiler complains. Open it with a text editor, and search for the following line:
#include “scribusapp.h”
after that line you have to insert the following lines:
#ifndef prefsDir
QString prefsDir;
#endif
If you are ready, save the file.
Keep your Tracker window open what shows the folder, where scpaths.cpp located. Now open a terminal, and copy the path from the Tracker window and jump there with your terminal like:
cd /this/is/the/path/what/jou/just/copied
After pressing enter the Terminal will jump into that folder. Now you have to know, that haikuporter creates a git repository for the extracted sources automatically, so we can use the following command to commit the change what you just done:
git commit -a
It will open a terminal based text editor and it will show some text. You just need to add a commit message at the beginning the file, like:
Scribus: build fix
Then press and keep down the Ctrl key on your keyboard and press the O key.
Nano (the text editor) will ask you if you want to save the file. Press Enter.
Then to exit you have to press and keep down Ctrl key and press the X.
Nano will disapear, and you will get back your terminal. You can close this terminal now.
Go back to the other terminal where you tried to build scribus, and let the haikuporter extract your change from the sources like:
haikuporter -e scribus
In some seconds haikuporter wil lcreate a new file in the patches folder with the follwing name:
scribus-1.5.3.patchset
Super!
Now open your recipe, and add the following line after the CHECKSUM section
PATCHES=“scribus-$portVersion.patchset”
(maybe you just commented it out earlier, then remove the # symbol at the beginning of the line.)
Now your recipe is really ready to rock.
Try to build your sources again with:
haikuporter scribus
During the build processyou could open a new terminal or tab, navigate to the folder where your haikuports tree located and use the following commands:
git add (pull your recipe from the Tracker window here)
and
git add (pull your patchset file from Tracker here)
With thoose 2 last command you just added your new recipe to your local git haikuports repository.
You have to commit your changes like:
git commit -a
It will open again the text editor, what you have seen before. Type your commit message like:
Scribus : bump version
Press Ctrl and O, then Ctrl and X to save and exit.
Now you just committed your changes into your local git repository, into the scribus_update branch.
But hey, it is your local git repo, so only you have access to it. Why don’t share your work with the whole world?
We can push your commit to your remote repository like:
git push origin
I assume you already set git up for the following stuff, if not, then use the following commands:
git config --global user.name “Your Name”
and
git config --global user.email your@email.com
It is possible, that git will complain about not knowing, what the remote branch should be and prints you a command, in this case just copy that and paste it into your terminal, and press enter. Then you can try your push again.
git will ask your github username and password, type it and press enter, if everything goes ok, then git will publish your change on your remote github repo.
Then, wait the build to finish, to make sure your recipe works ok, and then you can create a pull-request on the official haikuports github page.
For that open your web-browser, navigate to github,log in, open the official haikuports github repo, and you will see a new notification at the top in yellow box, that you can create your pull-request.
A pull request is required to send your changes to the haikuports mainline repository, to make your changes available for everybody.
It is really straightforward to do it.
Then you have still stuff to do:
your local github repository linked to your github remote repository, but maybe you want to get the updated recipes from the official haikuports repository. For that we have to change the settings of your github repo like the following:
open a terminal
navigate into the folder where all the recipes located, like:
cd /boot/home/haikuports
and add the official repository to your local repository like:
git remote add haikuports GitHub - haikuports/haikuports: Software ports for the Haiku operating system.
Now your local repository have 2 different remote repository too, and you can get the latest recipes easily:
If your build finished, just switch back to the master branch like:
git checkout master
(I know, i told you should not change your master, but it is an exception. You should pull the latest recipes always into your master branch! Be careful to switch to the master before you use the following command.
Everytime if you want to have the latest recipes, use the following command to pull them into your master branch:
git pull haikuports
That’s all mate, i wat to see your pull-request at the haikuports github site.
Have fun!