Skip to content

Commit

Permalink
Ver 2.2.7, tweaks to build
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbannon committed Sep 6, 2023
1 parent 4cbabcc commit 7330191
Show file tree
Hide file tree
Showing 10 changed files with 249 additions and 15 deletions.
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ README
========


<sub>Don't edit this markdown file, its generated from the tomboy-ng note.</sub>



**Please Note :** you probably don't need these files unless you are using Lazarus Main and Qt6. Several LTS distros will not have a viable Qt6 at present.

Expand Down Expand Up @@ -89,6 +86,37 @@ OK, we are now on the third packaging of the same library. All to do with versio

**Building this Library**
--------
By using an experimental PPA we can install Qt6.2.2 (not 6.2.3) on a U2004 so, avoid the dreaded libc and get a Qt6 almost exactly as Zeljko want. So far, seems to work. This model is a credit to **salvadorbs** who worked out how to do this as a github action.

**First Time**
* Build a U2004 VM, bring it up to date

* Add the Qt6.2.2 PPA -

* sudo add-apt-repository ppa:okirby/qt6-backports; sudo apt update;

* sudo apt install qt6-base-dev build-essential libgl1-mesa-dev rpm lintian devscripts vim

* Then, pull down (or refresh) a git copy of this repo into ~/Pascal (ie /home/$USER/Pascal/libqt6pas)

* cd into cbindings and run the script, refresh.bash (it will pull down just the relevent parts of lazarus from gitlab and patch your local libqt6pas tree if necessary)

* Remove any existing library and symlinks. make (to build library binary)

* cd down into packages and update the whatsnew file.

* run DEBEMAIL=YOUR_EMAIL bash ./package-lib, it should build the packages for you.



Now, push the changes you made to the source earlier back up to github, create a new release page and give it an appropriate version tag. Upload the files, the tag will be created when the release is published.





**Legacy Information**
--------
Right now, seems the only way to make a generic library package is to make the Library on a Fedora 35 box and then package on an Ubuntu 20.04 box. This is because

* Fedora 35 has the older Qt6 6.2.3 that the interface is based on. If built on a later Qt6, then the earlier end user systems will not be supported.
Expand Down
8 changes: 4 additions & 4 deletions cbindings/Qt6Pas.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@



# Binding Release Version 6.2.6 against Qt6 6.2 LTS release.
# Binding Release Version 6.2.7 against Qt6 6.2 LTS release.

win32:VERSION = 6.2.6.0
else:VERSION = 6.2.6
win32:VERSION = 6.2.7.0
else:VERSION = 6.2.7
VER_MAJ = 6
VER_MIN = 2
VER_PAT = 6
VER_PAT = 7
win32:VERSION_PE_HEADER = 6.2

QT += gui printsupport
Expand Down
123 changes: 123 additions & 0 deletions cbindings/package/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
libqt6pas (6.2.7) unstable; urgency=medium

* Release of new version.
* added startSystemMove() & startSystemResize() to the C bindings for
better wayland integration
* Please see Lazarus at gitlab for further change details.

-- David Bannon <[email protected]> Wed, 06 Sep 2023 16:12:23 +1000

libqt6pas (1.0) unstable; urgency=medium

* Initial release of Qt6 version

-- David Bannon <[email protected]> Sat, 12 Nov 2022 16:22:01 +1100

libqt5pas (1.2.9) unstable; urgency=medium

* TLazAccessibleObject accessinility functionality for Qt5 widgetsets

-- David Bannon <[email protected]> Tue, 06 Apr 2021 18:29:02 +1100

libqt5pas (1.2.8) unstable; urgency=medium

* Calling this version 1.2.8
* Zeljko added QLCLOpenGLWidget, Lazarus issue #36342
* Zeljko fixed Lazarus issue #35657
* Zeljko fixed Lazarus issue #35156 and reved to ver 1.2.7
* Range of 2018 fixes.

-- David Bannon <[email protected]> Thu, 19 Mar 2020 17:47:01 +1100

libqtpas (2.6~beta-4) unstable; urgency=medium

* Drop d/watch as it is now distributed inside the lazarus tar ball
* Update symbols file for GCC 7 (Closes: #853505)

-- Paul Gevers <[email protected]> Sat, 05 Aug 2017 18:36:01 -0400

libqtpas (2.6~beta-3) unstable; urgency=medium

* Upload to unstable
* Invert arch logic for one symbol in the symbols file
* Bump standards version to 4.0.0 (no changes)

-- Paul Gevers <[email protected]> Mon, 10 Jul 2017 20:27:50 +0200

libqtpas (2.6~beta-2) experimental; urgency=medium

* Patch code with changes from lazarus 1.8~rc2
* Update Željan's name in d/copyright

-- Paul Gevers <[email protected]> Thu, 08 Jun 2017 21:45:35 +0200

libqtpas (2.6~beta-1) experimental; urgency=medium

* Team upload
* Package new release from the qt5/cbindings tree from the 1.8~rc1
release of lazarus
* Refresh patches (drop one applied upstream)
* Convert d/copyright to machine readable format
* Update symbols file (some are actually dropped)

-- Paul Gevers <[email protected]> Wed, 24 May 2017 22:18:27 +0200

libqtpas (2.6~alpha-1) experimental; urgency=medium

* Team upload
* Package upstream 2.6Alpha (Closes: #784493)
- soname bump, so create new binary packages
- Update copyright (years)
* Refresh patch
* Add find_QtPrintSupport.patch to add printsupport to the include path
to prevent FTBFS
* Update watch file
* Bump debhelper compat level to 10
* Enable hardening
* Change build-depends from fpc to fp-units-rtl as that is lighter and
serves the same purpose (prevent building on non-fpc supported arches)

-- Paul Gevers <[email protected]> Wed, 23 Nov 2016 22:08:43 +0100

libqtpas (2.5-18) unstable; urgency=medium

* Update .symbols file again, this time for armel
- This is getting ridiculous - future versions of this library
should compile with default-hidden symbol visibility and mark
symbols that are actually supposed to be used by the library
users as visible explicitly.

-- Matthias Klumpp <[email protected]> Wed, 31 Aug 2016 10:48:17 +0200

libqtpas (2.5-17) unstable; urgency=medium

* Compile with inlines-hidden
* Update symbols file for GCC 6 (Closes: #811965)

-- Matthias Klumpp <[email protected]> Wed, 10 Aug 2016 22:35:55 +0200

libqtpas (2.5-16) unstable; urgency=medium

* Transfer package to Pascal packaging team
* Bump standards version: No changes needed
* Rename source package to a more generic name
- Pick "libqtpas" instead of the more upstream-ish "qtpas", to avoid
confusion with the "qtpass" package.
* Use secure Vcs-* URLs

-- Matthias Klumpp <[email protected]> Thu, 30 Jun 2016 11:34:54 +0200

libqt4pas (2.5-15) unstable; urgency=medium

* Update symbols file (Closes: #804304)
- Fixes build on ppc64 and arm64

-- Matthias Klumpp <[email protected]> Wed, 10 Feb 2016 19:56:58 +0100

libqt4pas (2.5-14) unstable; urgency=medium

* Update symbols file

-- Matthias Klumpp <[email protected]> Sat, 08 Aug 2015 16:45:56 +0200

# For older changelog entries, run 'apt-get changelog libqt5pas1'
2 changes: 1 addition & 1 deletion cbindings/package/libqt6pas-devel.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Name: libqt6pas6-devel
Version:
Release:
Summary: Qt6 interface bindings for Pascal Devel Package
License: see /usr/share/doc/libqt6pas6/copyright
License: LGPLv2
Packager: David Bannon <[email protected]>
URL: https://github.com/davidbannon/libqt6pas
Requires: INSERT_DEPEND
Expand Down
5 changes: 4 additions & 1 deletion cbindings/package/libqt6pas6.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Name: libqt6pas6
Version:
Release:
Summary: Qt6 interface bindings for Pascal
License: see /usr/share/doc/libqt6pas6/copyright
License: LGPLv2
Packager: David Bannon <[email protected]>
URL: https://github.com/davidbannon/libqt6pas

Expand All @@ -30,6 +30,9 @@ Lazarus main, current release versions do not need it.
"/usr/share/doc/libqt6pas6/changelog.gz"
"/usr/share/doc/libqt6pas6/copyright"

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%changelog
* Thu Nov 24 2022 David Bannon <[email protected]> - INSERT_FULL_VER
- Initial version of the package
Expand Down
27 changes: 22 additions & 5 deletions cbindings/package/package-lib
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,20 @@ function DebianPackage () {

echo "activate-noawait ldconfig" > BUILD/DEBIAN/triggers
echo "libQt6Pas $MAJORVER libqt6pas$MAJORVER" > BUILD/DEBIAN/shlibs
gzip -knc --best changelog.libqt6pas >> BUILD/usr/share/doc/"$PRODUCT"/changelog.gz

dch -cchangelog -v "$MAJORVER"."$MINORVER"."$EXTRAVER" -D"unstable" "Release of new version."
if [ -f whatsnew ]; then
echo "---------- Including whatsnew in changelog"
while IFS= read -r Line; do
dch -cchangelog --append "$Line"
done < whatsnew
fi
dch -cchangelog --append "Please see Lazarus at gitlab for further change details."




gzip -knc --best changelog >> BUILD/usr/share/doc/"$PRODUCT"/changelog.gz
# ------ Make the md5sum file -----------
cd BUILD
md5sum usr/lib/"$DIR_ARCH"/"$LIBNAME".so."$VERSION" > DEBIAN/md5sums
Expand All @@ -133,7 +146,7 @@ function DebianPackageDev () {
cp ../qt62.pas BUILD/usr/share/pascal/qt6/.
chmod 0644 BUILD/usr/share/pascal/qt6/*
cp copyright BUILD/usr/share/doc/"$PRODUCT-dev"/copyright
gzip -knc --best changelog.libqt6pas >> BUILD/usr/share/doc/"$PRODUCT-dev"/changelog.gz
gzip -knc --best changelog >> BUILD/usr/share/doc/"$PRODUCT-dev"/changelog.gz

# ------ Make the md5sum file -----------
cd BUILD
Expand Down Expand Up @@ -166,7 +179,7 @@ function MakeRPM () {
mkdir -p "$RDIR"/usr/share/doc/"$PRODUCT"-devel
chmod 755 "$RDIR"/usr/share/doc/"$PRODUCT"-devel
cp copyright "$RDIR"/usr/share/doc/"$PRODUCT"-devel/copyright
gzip -knc --best changelog.libqt6pas >> "$RDIR"/usr/share/doc/"$PRODUCT"-devel/changelog.gz
gzip -knc --best changelog >> "$RDIR"/usr/share/doc/"$PRODUCT"-devel/changelog.gz

cd "$RDIR"/usr/"$RDIR_ARCH"
ln -s "$FULLLIBNAME" "$LIBNAME".so
Expand All @@ -182,7 +195,7 @@ function MakeRPM () {
mkdir -p "$RDIR"/usr/share/doc/"$PRODUCT"
chmod 755 "$RDIR"/usr/share/doc/"$PRODUCT"
cp copyright "$RDIR/usr/share/doc/"$PRODUCT"/copyright"
gzip -knc --best changelog.libqt6pas >> "$RDIR"/usr/share/doc/"$PRODUCT"/changelog.gz
gzip -knc --best changelog >> "$RDIR"/usr/share/doc/"$PRODUCT"/changelog.gz
cp ../"$FULLLIBNAME" "$RDIR"/usr/"$RDIR_ARCH"/.
chmod 755 "$RDIR"/usr/"$RDIR_ARCH"/"$FULLLIBNAME"
ln -s -r "$RDIR"/usr/"$RDIR_ARCH"/"$FULLLIBNAME" "$RDIR"/usr/"$RDIR_ARCH"/"$LIBNAME".so."$MAJORVER"."$MINORVER"
Expand Down Expand Up @@ -241,7 +254,11 @@ rm -Rf "$TARNAME"
rm -Rf BUILD
ls -ltr

# ------- RESTORE ME --------------- lintian -IiE *.deb
echo " ======================== Debian Lintian =============================="
lintian -IiE *.deb

echo "========================= RPM Lint Results ============================"
rpmlint -i *.rpm

#echo " === OK, now make the rpms with fakeroot bash ./rpm-package.bash <enter> ==="

Expand Down
2 changes: 2 additions & 0 deletions cbindings/package/whatsnew
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
added startSystemMove() & startSystemResize() to the C bindings for better wayland integration

48 changes: 48 additions & 0 deletions cbindings/refresh.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

# A script, run from the git dir pulled down from https://github.com/davidbannon/libqt6pas
# expects to be run from the cbinding dir.
# It gets the relevent files from gitlab, checks to see if we are out of date
# and updates the local repo if we are.
# After this, you will make the library and then package it. Finally, commit and upload binaries.

# David Bannon, September 6, 2023


CURRENT=`pwd`
TMP="/tmp"
TMPFILE="lazarus-main-lcl-interfaces-qt6"
TMPPATH="$TMPFILE"/"lcl/interfaces/qt6/cbindings"
DIFFRES=""

cd $TMP
rm -f "$TMPFILE".zip
rm -Rf "$TMPFILE"

wget --output-document="$TMPFILE".zip https://gitlab.com/freepascal.org/lazarus/lazarus/-/archive/main/lazarus-main.zip?path=lcl/interfaces/qt6
unzip -q "$TMPFILE".zip

echo "comparing "$TMP"/"$TMPPATH"/"Qt6Pas.pro" with "$CURRENT"/"Qt6Pas.pro""

DIFFRES=`diff "$TMP"/"$TMPPATH"/"Qt6Pas.pro" "$CURRENT"/"Qt6Pas.pro"`

echo "$DIFFRES"

if [ "$DIFFRES" == "" ]; then
echo "No update needed, we will exit"
exit
fi

echo "--------------- update needed"


rm -Rf "$CURRENT"/"src"

cp -r "$TMP"/"$TMPPATH"/* "$CURRENT"/.

cd "$CURRENT"
git status

echo "you should now type qmake6 -query; qmake6"
echo "then, make <enter> and wait a while"
echo "After that, run the package-lib script in package dir"
11 changes: 11 additions & 0 deletions cbindings/src/qwindow_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,14 @@ void QWindow_requestUpdate(QWindowH handle)
((QWindow *)handle)->requestUpdate();
}

bool QWindow_startSystemMove(QWindowH handle)
{
return (bool) ((QWindow *)handle)->startSystemMove();
}

bool QWindow_startSystemResize(QWindowH handle, Qt::Edges edges)
{
return (bool) ((QWindow *)handle)->startSystemResize((Qt::Edges)edges);
}


4 changes: 3 additions & 1 deletion cbindings/src/qwindow_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//******************************************************************************

/* TODO startSystemMove(), startSystemResize(), setFlag(), parent(params), setWindowStates() , windowStates() */
/* TODO setFlag(), parent(params), setWindowStates() , windowStates() */

#ifndef QWINDOW_C_H
#define QWINDOW_C_H
Expand Down Expand Up @@ -121,5 +121,7 @@ C_EXPORT void QWindow_setMaximumWidth(QWindowH handle, int w);
C_EXPORT void QWindow_setMaximumHeight(QWindowH handle, int h);
C_EXPORT void QWindow_alert(QWindowH handle, int msec);
C_EXPORT void QWindow_requestUpdate(QWindowH handle);
C_EXPORT bool QWindow_startSystemMove(QWindowH handle);
C_EXPORT bool QWindow_startSystemResize(QWindowH handle, Qt::Edges edges);

#endif

0 comments on commit 7330191

Please sign in to comment.