Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added recipe for sqlitebrowser #969

Merged
merged 1 commit into from
Dec 30, 2016
Merged

Conversation

tudor-nazarie
Copy link
Contributor

My take on the SQLite Browser task, not related to @vanishakesswani 's PR.

The recipe builds SQLiteBrowser and adds it to the Applications bar. It is noted as broken on x86_gcc2 as libqt4 is broken on that arch and QT 4 is a core dependency.

The only problem I could find was that the compilation seems to fail the first time it is run because of some missing translation files, but has no problems the second time it is run. I'm guessing that could be a problem on my system and might not appear on a fresh environment.

Other than that, I think Icon-O-Matic might have messed up the SVG file I used as an icon when exporting to HVIF.

Copy link
Member

@fbrosson fbrosson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @xdizzaster for your PR.
Here are a few recommended changes.

resource app_version {
major = 3,
middle = 9,
minor = 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although useing jhard-coded values in the rdef file is perfectly correct, we often rename the rdef file to rdef.in and use this:

	major  = @MAJOR@,
	middle = @MIDDLE@,
	minor  = @MINOR@,

and later use sed to produce a rdef from the rdef.in.
I would recommend doing so for this recipe.
This has the advantage of not having to updated the rdef file (or the rdef.in file, since we rename it to make it clean that it has patterns.)

middle = 9,
minor = 1,

variety = B_APPV_ALPHA,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be wroing, but I think that for the variety parameter we should use B_APPV_FINAL instead of B_APPV_ALPHA.

minor = 1,

variety = B_APPV_ALPHA,
internal = 5,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be wroing, but I think that for the "internal" parameter we should use 0 instead of 5.

COPYRIGHT="2012-2016 Martin Kleusberg"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/sqlitebrowser/sqlitebrowser/archive/v3.9.1.tar.gz"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please replace

SOURCE_URI="https://github.com/sqlitebrowser/sqlitebrowser/archive/v3.9.1.tar.gz"

by

SOURCE_URI="https://github.com/sqlitebrowser/sqlitebrowser/archive/v$portVersion.tar.gz"

SOURCE_URI="https://github.com/sqlitebrowser/sqlitebrowser/archive/v3.9.1.tar.gz"
CHECKSUM_SHA256="d0d2e06a69927ba1d0b955f3261ce70c61befc5bd5ddaa06752dae8bb4219ed8"
PATCHES="sqlitebrowser-3.9.1.patchset"
ADDITIONAL_FILES="sqlitebrowser.rdef"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please replace

PATCHES="sqlitebrowser-3.9.1.patchset"
ADDITIONAL_FILES="sqlitebrowser.rdef"

by

SOURCE_FILENAME="sqlitebrowser-$portVersion.tar.gz"
PATCHES="sqlitebrowser-$portVersion.patchset"
ADDITIONAL_FILES="sqlitebrowser.rdef.in"

Of course, this assumes you also

git mv sqlitebrowser.rdef sqlitebrowser.rdef.in
git commit sqlitebrowser.rdef sqlitebrowser.rdef.in

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't I also change the name of sqlitebrowser.rdef when rc is called in BUILD()?

cmd:qmake
cmd:make
cmd:g++$secondaryArchSuffix
"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please insert a tab before the closing double quotes.

BTW, it is recommentded to sort alphabetically the lines in BUILD_REQUIRES.

{
make $jobArgs install
mkdir -p $appsDir
mv $sourceDir/src/sqlitebrowser $appsDir/SQLiteBrowser
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use cp instead of mv,because the latter would break haikuporter -F.

Hmm, it would be even better to pass some flags that wlould make sqlitebrowser get installed directly to $appsDir.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure how to change the install directory. I think it would require tinkering with qmake and I'm not very familiar with it. I think this suffices for now since SQLite Browser only has an executable (no icons or other files).

sqlitebrowser$secondaryArchSuffix = $portVersion
app:sqlitebrowser$secondaryArchSuffix = $portVersion
"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the empty line between PROVIDES and REQUIRES.

libqt4${secondaryArchSuffix}_devel
devel:libsqlite3$secondaryArchSuffix
"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the empty line between BUILD_REQUIRES and BUILD_PREREQUIRES .

@tudor-nazarie
Copy link
Contributor Author

Hi! I updated the recipe and .rdef file according to your requests. Please see #969 (comment) regarding the call of rc and the resource file. Should I also rename it there?

minor = @MINOR@,

variety = B_APPV_FINAL,
internal = 0 ,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the space after 0

mkdir -p $appsDir
cp $sourceDir/src/sqlitebrowser $appsDir/SQLiteBrowser
addAppDeskbarSymlink $appsDir/SQLiteBrowser SQLiteBrowser
fixPkgconfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessary ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean fixPkgconfig? I guess not since sqlitebrowser does not provide any dev libraries.

@tudor-nazarie
Copy link
Contributor Author

Hi! I updated the PR with @korli 's requests, namely removed a stray whitespace and fixPkgconfig since it is not useful here.

@korli korli merged commit 3ffe609 into haikuports:master Dec 30, 2016
@tudor-nazarie
Copy link
Contributor Author

tudor-nazarie commented Dec 30, 2016

@korli I'm afraid you merged a broken recipe. Right now it will fail while trying to add the resource file to the binary because of a wrong filename. If you would have waited 60 more seconds, I would've pushed an updated that corrected this. Should I open a new PR to address this issue or how should I proceed?

@korli
Copy link
Contributor

korli commented Dec 30, 2016

As you wish. If you've another gci task, don't spend too much time on this. Thanks!

dacianf pushed a commit to dacianf/haikuports that referenced this pull request Jan 9, 2017
korli pushed a commit to korli/haikuports that referenced this pull request Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants