Index | Thread | Search

From:
yaydn@protonmail.com
Subject:
Re: Switch xpdf-4.05 to Qt6
To:
Rafael Sadowski <rafael@sizeofvoid.org>
Cc:
"ports@openbsd.org" <ports@openbsd.org>
Date:
Mon, 04 Aug 2025 06:00:02 +0000

Download raw body.

Thread
På søndag 3. august 2025 kl. 21:37, Rafael Sadowski
<rafael@sizeofvoid.org> skrev:

> On Sun Aug 03, 2025 at 09:18:32PM +0200, Rafael Sadowski wrote:
>
> > Simple diff to switch xpdf to Qt6. Tested on amd64. OK?
> >
> > Cheers Rafael
>
>
> Now with the complete diff, pointed out by phessler
>


Tested on current/amd64.

Did:

cd /usr/ports/ && patch -l -p1 -E < /tmp/xpdf-4.05.patch
cd /usr/ports/textproc/xpdf/ && make update clean && make distclean

Used on sway:

xpdf
xpdf --platform xcb

In light testing, xpdf preformed well natively and in xwayland.

Looks good.

Hope this helps.

Thanks and well wishes. Happy porting!


> diff --git a/textproc/xpdf/Makefile b/textproc/xpdf/Makefile
> index 9a7b4d6af84..d8c50dd278b 100644
> --- a/textproc/xpdf/Makefile
> +++ b/textproc/xpdf/Makefile
> @@ -2,6 +2,7 @@ COMMENT = PDF viewer for X11
> DISTNAME = xpdf-4.05
> CATEGORIES = textproc x11
> EPOCH = 0
> +REVISION = 0
>
> HOMEPAGE = https://www.xpdfreader.com/
> SITES = https://dl.xpdfreader.com/
> @@ -9,11 +10,12 @@ SITES = https://dl.xpdfreader.com/
> # GPLv2 only or GPLv3 only or both (at our choice)
> PERMIT_PACKAGE = Yes
>
> -WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Network Qt5PrintSupport
> -WANTLIB += Qt5Widgets c cups fontconfig freetype m paper png z
> +WANTLIB += ${COMPILER_LIBCXX} GL Qt6Concurrent Qt6Core Qt6Gui
> +WANTLIB += Qt6Network Qt6PrintSupport Qt6Widgets c cups fontconfig
> +WANTLIB += freetype m paper png z
>
> MODULES = devel/cmake \
> - x11/qt5
> + x11/qt6
>
> LIB_DEPENDS = graphics/png \
> print/libpaper
> @@ -24,13 +26,10 @@ CONFIGURE_ARGS = -DOPI_SUPPORT=ON \
> -DXPDFWIDGET_PRINTING=ON \
> -DSYSTEM_XPDFRC=/etc/xpdfrc
>
> -# deprecated Qt5 print code fails to build with Qt6
> -CONFIGURE_ARGS += -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Widgets=ON
> -
> CXXFLAGS += -I${X11BASE}/include \
> - -I/usr/local/include
> + -I${LOCALBASE}/include
> MODCMAKE_LDFLAGS = -L${X11BASE}/lib \
> - -L/usr/local/lib
> + -L${LOCALBASE}/lib
>
> # other programs conflict with poppler-utils
> PROGS = xpdf pdftopng