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

Trying to package qt5ct #16

Closed
ghost opened this issue Nov 25, 2019 · 14 comments
Closed

Trying to package qt5ct #16

ghost opened this issue Nov 25, 2019 · 14 comments

Comments

@ghost
Copy link

ghost commented Nov 25, 2019

Hi folks,
After the great help from @krytarowski packaging molsketch, I've decided to try one on my own.
I'm trying to package qt5ct (https://sourceforge.net/projects/qt5ct), but I can't figure what I'm doing wrong!?
Here's my Makefile so far,


# $NetBSD$

DISTNAME=	qt5ct-0.41
CATEGORIES=	x11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=qt5ct/}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	voidpin@protonmail.com
HOMEPAGE=	https://sourceforge.net/projects/qt5ct/files/qt5ct-0.41.tar.bz2
COMMENT=	Tool for customizing Qt5-apps outside KDE
LICENSE=	2-clause-bsd

TOOL_DEPENDS+=	qt5-qttools-[0-9]*:../../x11/qt5-qttools

USE_CMAKE=	yes
USE_TOOLS=	pkg-config

USE_LANGUAGES=	c c++

.include "../../x11/qt5-qtbase/buildlink3.mk"
.include "../../x11/qt5-qtsvg/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

and here's the error I'm getting,

=> Tool dependency qt5-qttools-[0-9]*: found qt5-qttools-5.13.1nb1
=> Tool dependency glib2-tools-[0-9]*: found glib2-tools-2.62.2
=> Tool dependency pkgconf-[0-9]*: found pkgconf-1.6.0
=> Build dependency x11-links>=1.30: found x11-links-1.30
=> Build dependency cwrappers>=20150314: found cwrappers-20180325
=> Full dependency qt5-qtbase>=5.13.1: found qt5-qtbase-5.13.1
=> Full dependency qt5-qtsvg>=5.13.1: found qt5-qtsvg-5.13.1
===> Overriding tools for qt5ct-0.41
===> Extracting for qt5ct-0.41
bzcat: /usr/pkgsrc/distfiles//qt5ct-0.41.tar.bz2 is not a bzip2 file.
tar: End of archive volume 1 reached
tar: Sorry, unable to determine archive format.
*** Error code 1

Stop.

Why?!
EXTRACT_SUFX= .tar.bz2 and the file is qt5ct-0.41.tar.bz2. Any thoughts or hints?
TIA

@ghost
Copy link
Author

ghost commented Nov 26, 2019

Found the error, just had to look carefully :)

# $NetBSD$
...
EXTRACT_SUFX=	.tar.bz2
...
HOMEPAGE=	https://sourceforge.net/projects/qt5ct/files/
COMMENT=	Tool for customizing Qt5-apps outside KDE
LICENSE=	2-clause-bsd

TOOL_DEPENDS+=	qt5-qttools-[0-9]*:../../x11/qt5-qttools
...

The build starts, but packaging qt5 stuff looks rather complex to me right now :(
I might get back to this once I get more comfortable.

@krytarowski
Copy link
Member

krytarowski commented Nov 27, 2019

EXTRACT_USING=bsdtar

Hmm.. maybe it was fixed differently so please disregard.

@ghost
Copy link
Author

ghost commented Nov 28, 2019

So, I've managed to make it work and it's now installed on my system and I can theme my Qt5-apps with it.

But, I'm still missing something?!!
Here's my current Makefile

# $NetBSD$

DISTNAME=	qt5ct-0.41
PKGNAME=	${DISTNAME}
CATEGORIES=	x11	
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=qt5ct/}	
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	voidpin@protonmail.com	
HOMEPAGE=	https://sourceforge.net/projects/qt5ct/files/
COMMENT=	Tool for customizing Qt5-apps outside KDE	
LICENSE=	2-clause-bsd	

USE_TOOLS=	pkg-config
USE_LANGUAGES=	c c++
QMAKE=		${PREFIX}/qt5/bin/qmake
CMAKE_ENV+=     PATH="$$PATH":${PREFIX}/qt5/bin
CONFIGURE_ENV+= PATH="$$PATH":${PREFIX}/qt5/bin
CONFIGURE_ENV+= QMAKE=${QMAKE}
CMAKE_ENV+=     QMAKE=${QMAKE}
CMAKE_ARGS+=    -D QMAKE:PATH=${QMAKE}
CMAKE_ARGS+=    -D PATH:STRING="$$PATH":${PREFIX}/qt5/bin
CONFIGURE_ARGS+=QMAKE=${QMAKE}

TOOL_DEPENDS+=	qt5-qttools-[0-9]*:../../x11/qt5-qttools

USE_LANGUAGES=	c++

.include "../../x11/qt5-qtbase/buildlink3.mk"
.include "../../x11/qt5-qtsvg/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

When all dependencies are done I have to do the following from /usr/pkgsrc/wip/qt5ct

cd work/qt5ct
/usr/pkg/qt5/bin qmake
cd ..
cd ..
make
doas make install

Obviously, I'd like to skip the manual intervention. Any pro tips from anyone more experienced?
Also, there may be unnecessary lines on my Makefile. Comments?!

@krytarowski
Copy link
Member

grep other packages how to use qmake/QMAKE.

@ghost
Copy link
Author

ghost commented Nov 29, 2019

Still no luck :(
I can still cd into work/qt5ct, run /usr/pkg/qt5/bin/qmake to generate the Makefile, return to /usr/pkgsrc/wip/qt5ct and run make. Then it works, but not without doing this.

#Makefile

# $NetBSD$

DISTNAME=	qt5ct-0.41
CATEGORIES=	x11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=qt5ct/}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	voidpin@protonmail.com
HOMEPAGE=	https://sourceforge.net/projects/qt5ct/files/
COMMENT=	Tool for customizing Qt5-apps outside KDE
LICENSE=	2-clause-bsd

USE_TOOLS=	pkg-config
USE_LANGUAGES=	c c++

MAKE_ENV=	QTPREFIX=${QTPREFIX:Q}
QMAKE=		${QTPREFIX}/bin/qmake
CONFIGURE_ENV+=	QMAKE=${QMAKE}
CONFIGURE_ARGS+=QMAKE=${QMAKE}

TOOL_DEPENDS+=	qt5-qttools-[0-9]*:../../x11/qt5-qttools

.include "../../x11/qt5-qtbase/buildlink3.mk"
.include "../../x11/qt5-qtsvg/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

@krytarowski
Copy link
Member

Keep grepping, there should be a pre-configure: step or similar.

@ghost
Copy link
Author

ghost commented Dec 5, 2019

@krytarowski
Thx for believing and sorry for the delay, I've been busy at work!!
Success!!

# $NetBSD$

DISTNAME=		qt5ct-0.41
CATEGORIES=		x11
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=qt5ct/}
EXTRACT_SUFX=		.tar.bz2

MAINTAINER=		voidpin@protonmail.com
HOMEPAGE=		https://sourceforge.net/projects/qt5ct/files/
COMMENT=		Tool for customizing Qt5-apps outside KDE
LICENSE=		2-clause-bsd

USE_TOOLS=		pkg-config
USE_LANGUAGES=		c c++

WRKSRC=         	${WRKDIR}/${DISTNAME}

QTDIR=			/usr/pkg/qt5
MAKE_ENV+=		QTPREFIX=${QTDIR}
QMAKE=			${QTPREFIX}/bin/qmake
CONFIGURE_ENV+=		QMAKE=${QMAKE}
CONFIGURE_ARGS+= 	QMAKE

do-configure:
	(cd ${WRKSRC} && ${QTDIR}/bin/qmake -o Makefile)

TOOL_DEPENDS+=		qt5-qttools-[0-9]*:../../x11/qt5-qttools

.include "../../x11/qt5-qtbase/buildlink3.mk"
.include "../../x11/qt5-qtsvg/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

Only one but...
It installs the package into /usr/bin and not into /usr/pkg/bin as it should on NetBSD.

Should I push it into wip?! Or, can you give me a hint on how to fix the install path!?

@krytarowski
Copy link
Member

Just commit it and I can have a look.

@ghost
Copy link
Author

ghost commented Dec 6, 2019

Done, https://mail-index.netbsd.org/pkgsrc-wip-changes/2019/12/06/msg015002.html
@krytarowski
Sorry to bother you again! I've managed to fix all the issues with qt5ct, but there're some ugly hacks in the fixes :(
I'd like to understand/learn the proper way to do this.
Regards.

@ghost ghost closed this as completed Dec 6, 2019
@krytarowski
Copy link
Member

This patch fixes build for me:

http://netbsd.org/~kamil/patch-00205-qt5ct.txt

Please apply to pkgsrc-wip.

@ghost
Copy link
Author

ghost commented Dec 12, 2019

Thanks!
I'll build the package once again tomorrow and commit the changes.
Still have a lot to learn, but all your changes made sense now and I won't give up.
Although, this might be the last thing I will commit for some time to come.
I'm curious about the work from @Niacat on wayland and I might try to build a wayland-NetBSD desktop during the coming week :)

@ghost
Copy link
Author

ghost commented Dec 13, 2019

@krytarowski
Fixed! Everything works as fine.
Feel free to import the package to pkgsrc main branch.
Thx!

@krytarowski
Copy link
Member

Imported to pkgsrc/x11/qt5ct.

@ghost
Copy link
Author

ghost commented Dec 16, 2019

@krytarowski
Thank you!

wip-sync pushed a commit that referenced this issue Jul 27, 2022
This updates to upstream 2.2.0 and as a notable local change does not hack
both shared and static libs into the build anymore. This is an unloved
endeavour and if we insist on static libs, we'd need to builds. But do we?

Tests are enabled now.

Upstream changes since 2.1.0:

New features:

    Allow compilation in ILP64 mode, PR #19

Major bug fixes:

    Use pointer macro to prevent integer overflow, PR #16

    Fix argument mismatches for implicitly defined functions (for gcc-10+ compatibility), PR #26

    No memory leaks on blacs_exit, PR #37
wip-sync pushed a commit that referenced this issue Sep 25, 2023
1.2.2
* Update mail address and welcome to 2023
* Update license text

1.2.1
* Fix InkscapeConverter is_available handling due to changed function
  call order in sphinx 3.x and above
* Fix typo
* Fix version bump where half of the commit got lost somehow

1.2.0
* Merge pull request #17 from sephalon/inkscape-version
* Merge pull request #16 from lukeprince20/patch-cairosvgconverter
* Match Inkscape version number only
* Fix CairSVGConverter::convert for usage on Windows
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant