Problem porting qt5 apps that contain phonon4qt5


#1

Dear all

i try to make recipe for an aplication that use phonon4qt5 (al-anvar)… i have been test it is compile correctly on al-anvar.pro file contain phonon4qt5… but when build from recipe .
throw error…

Project ERROR; unknown modules in QT: phonon4qt5…

how to solve this?


#2

You have 2 options:
1) install libqt4_x86_devel and phonon_x86_devel, and try to build it with that version of Qt.

2) re-port the app to Qt5 (you will have to know how to patch the source code) and remove the " QT: phonon4qt5" part from the al-anvar.pro file.

If you go with option (1) you will have to temporarely remove the qt5_x86_devel package from your system and put it back once you are done, and remove the libqt4_x86_devel package leave only the libqt4_x86 installed so you can run that app with it.
Hope it helps.
Good luck.


#3

Phonon4 for qt5 already ported. install devel package from depot. https://github.com/haikuports/haikuports/blob/master/kde-frameworks/phonon/phonon-4.10.1.recipe


#4

i have been port app to qt5 and can compiled successfully…
problem come when i try to make recipe for it.
i’m fork haikuports and hope later if success i make pr for that… so app can show on depot


#5

You can paste the content of your recipe and the error you are getting here, so we can see what’s wrong and help you fix it.


#6

Or he can use the approriate place: the haikuports issues.


#7

thanks to all, but unfortunately my vm broken again after i forget to pause/shutdown cleanly vm before exit the virtualbox . . i still try to rebuild and redo what i have done and i will reported here when i have some result…


#8

@khallebal
below is the recipe it can be access from https://github.com/mazbrili/haikuports/blob/myport/app-text/alanvar/alanvar-0.5.0.recipe:

SUMMARY="Al-Anvar, a Quran Study Software "
DESCRIPTION="Al-Anvar is a cross-platform Quran Study Software. It uses
Tanzil.net and Zekr.org database as its database,
It has lots of features:
-Text of the Quran
-Adding different translations of the Quran
-Adding interpretation of the Quran
-Direct download and install for translations and interpretations and so on through program \
-Comparison between translations
-Comparison between interpretations
-Putting note in the following of each verse
-Classifying the subject for verses of the Quran (with classifying the subject possibility by user)
-Repeated verses
-Related verses in terms of subject
-Reading online Quran (with storing downloaded files) and offline by different readers of the Quran
from website http://everyayah.com
-Repeat adjustment of reading of verses
-reading verses in the range a chapter (sura) or a division or a component.
-Advanced search
-Presenting chapters or chapters on different tabs
-Saving with Html, PDF and ODF formats
-Changing the font and color and size of the text and translations of the Quran and also font,
style and themes of software separately "

HOMEPAGE=“http://al-anvar.sourceforge.net
COPYRIGHT=“S. Hosein Hoseini”
LICENSE=“GNU GPL v3”
REVISION=“1”
SOURCE_URI=“https://github.com/mazbrili/al-anvar/archive/$portVersion.zip
CHECKSUM_SHA256=“d024a47b0e3ccdd32e9a5a0a12bd133633b7ada564d589845b6fb1b8abc1c4fc”
SOURCE_DIR=“al-anvar-$portVersion”

ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES=“x86”

PROVIDES="
alanvar$secondaryArchSuffix = $portVersion
app:alanvar$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
mesa$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5PrintSupport$secondaryArchSuffix
lib:libQt5Svg$secondaryArchSuffix
lib:libQt5WebKit$secondaryArchSuffix
lib:libQt5WebKitWidgets$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libphonon4qt5$secondaryArchSuffix
lib:libQtSql$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libQt5Xml$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"

BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
mesa$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix
devel:libQt5PrintSupport$secondaryArchSuffix
devel:libQt5Svg$secondaryArchSuffix
devel:libQt5WebKit$secondaryArchSuffix
devel:libQt5WebKitWidgets$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libQtSql$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libQt5Xml$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:unzip
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:qmake$secondaryArchSuffix >= 5
"

BUILD()
{
qmake
make $jobArgs
}

INSTALL()
{
mkdir -p $appsDir
cp -f $sourceDir/bin/al-anvar $appsDir/Al-anvar

local APP_SIGNATURE=“application/x-vnd.al-anvar”
local MAJOR="echo "$portVersion" | cut -d. -f1"
local MIDDLE="echo "$portVersion" | cut -d. -f2"
local LONG_INFO="$SUMMARY"

sed
-e “s|@APP_SIGNATURE@|$APP_SIGNATURE|”
-e “s|@MAJOR@|$MAJOR|”
-e “s|@MIDDLE@|$MIDDLE|”
-e “s|@LONG_INFO@|$LONG_INFO|”
$portDir/additional-files/alanvar.rdef.in > alanvar.rdef

addResourcesToBinaries al-anvar.rdef $appsDir/al-anvar
addAppDeskbarSymlink $appsDir/Al-anvar Al-anvar
}

error message:

Project ERROR: Unknown module(s) in QT: phonon4qt5


#9

You probably need to add devel:libphonon4qt5$secondaryArchSuffix to BUILD_REQUIRES.


#10

As Diver already mentioned, the “devel:libphonon4qt5$secondaryArchSuffix” is missing from the BUILD_REQUIRES section, and you also need to add the following “lib:libphonon4qt5$secondaryArchSuffix” to the REQUIRES section.
It’s also not recommended to add the whole mesa$secondaryArchSuffix pkg, change it to “lib:libGL$secondaryArchSuffix” and “devel:libGL$secondaryArchSuffix” for the REQUIRES and BUILD_REQUIRES respectively.


#11

thanks for @Diver and @khallebal… right now apps compiled successfully…
recipe still not find application and copy to the $appsDir …
still learn and figure out and read again wiki on haikuports…


#12

…how to debug the recipe file?
like detect $portDir
i’m stuck because seem recipe cannot find additional files
$portDir/additional-files/alanvar.rdef.inCapture


#13

I think your recipe misses

ADDITIONAL_FILES=“alanvar.rdef.in”


#14

@humdinger thank you… right now hpkg created.

. next issue…
application create db in the folder same as application folder …in the first running… and it have error cannot find db…
…learn …learn…:joy:


#15

Patch it to use the cache folder.


#16

cache is sound like temporary data only?


#17

thank you @extrowerk… from your hint…its working now…
i need some polish and test to make final pr because i still have issue for hvif icon…


#18

i’ve been send pr for alanvar recipe here…

thanks all for helping