Skip to content

Commit 4cdfc3a

Browse files
committed
release 1.2.15. Fixes to package-lib.
1 parent b095922 commit 4cdfc3a

File tree

9 files changed

+110
-46
lines changed

9 files changed

+110
-46
lines changed

cbindings/Qt5Pas.pro

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111

1212

13-
# Binding Release Version 1.2.14 against Qt5 5.6 LTS release.
13+
# Binding Release Version 1.2.15 against Qt5 5.6 LTS release.
1414
# WebKit widgets are disabled until webenginewidgets are implemented.
1515

16-
VERSION = 1.2.14
16+
VERSION = 1.2.15
1717
VER_MAJ = 1
1818
VER_MIN = 2
19-
VER_PAT = 14
19+
VER_PAT = 15
2020
win32:VERSION_PE_HEADER = 1.2
2121

2222
QT += gui network printsupport

cbindings/package/changelog.libqt5pas renamed to cbindings/package/changelog

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
libqt5pas (1.2.15) unstable; urgency=medium
2+
3+
* Release of new version.
4+
* removed QTimer_singleShot4() overload because it cannot be used with
5+
Qt5 < 5.10
6+
* use QTimer::singleShot() with QObject context from Qt 5.9.0
7+
* fixed Qt documentation inconsistency about QTimer::singleShot()
8+
overload.
9+
* Please see Lazarus at gitlab for further change details.
10+
11+
-- David Bannon <[email protected]> Tue, 05 Sep 2023 22:02:35 +1000
12+
113
libqt5pas (1.2.9) unstable; urgency=medium
214

315
* TLazAccessibleObject accessinility functionality for Qt5 widgetsets

cbindings/package/libqt5pas.spec

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ Lazarus main, current release versions do not need it.
3030
"/usr/share/doc/libqt5pas/changelog.gz"
3131
"/usr/share/doc/libqt5pas/copyright"
3232

33+
%post -p /sbin/ldconfig
34+
%postun -p /sbin/ldconfig
35+
3336
%changelog
3437
* Sat Dec 3 2022 David Bannon <[email protected]> - INSERT_FULL_VER
3538
- Follow release of Qt5 bindings 1.2.11 in lazarus-main, lib Package

cbindings/package/package-lib

+35-32
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,16 @@
66
# Resonable lintian and rpmlint result. See end of script !
77
#
88
# David Bannon 2022-11-25
9-
# NAMING
10-
# Hard to be sure, no clear definition and varying conventions in use but -
11-
# ftp.debian.org/debian/pool/main/q/qt6-base - typical...
12-
# libqt6opengl6-dev_6.4.1-1_armhf.deb
13-
# libqt6opengl6_6.3.1-1_i386.deb
14-
# Note that the '6' appears 3 times but in each case refers to the same thing !
15-
# So, we always have a name including 'qt6' then ending in'6' and then a VerNo starting with '6'
16-
# And all three '6' are both in main package and -dev package.
17-
# And the number of the beast shall be 666 .....
18-
# The actual, binary library file is libQt6OpenGL.so.6.4.1 so the trailing '6' on the name has dissapeared !
19-
# So, we will do -
20-
# Library, binary libQt6Pas.so.6.2.3
21-
# Package, libqt6pas6_6.2.0-1_amd64.deb
22-
# Dev Package libqt6pas6-dev.6.2.0-1_amd64.deb
23-
# The '0' in above will be rev'ed by every change Z makes to the interface, the 6.2 is the LTS Qt6 release
24-
25-
26-
PACKVER='4' # should start at '1', rev if you re-package same binary
9+
10+
PACKVER='1' # should start at '1', rev if you re-package same binary
2711

2812
LIBNAME=libQt5Pas
2913
PRODUCT="libqt5pas" # lib has upper case Q - P, this appears in Package name, add '1' to lib, -dev to devlib
3014
CURRENT=`pwd`
3115

32-
# library will be called something like ./libQt6Pas.so.6.2.3, the package libqt6pas6_6.2.0-1_amd64.deb and libqt6pas6-dev.6.2.0-1_amd64
16+
# library will be called something like -
17+
# libQt5Pas.so.1.2.14, the package libqt5pas1_2.14-1_amd64.deb and libqt5pas-dev_2.14-1_amd64
18+
# libqt5pas-1.2.14-1.x86_64.rpm and libqt5pas-devel-1.2.14-1.x86_64.rpm
3319
cd ..
3420
LIBFILE=$(find . -maxdepth 1 ! -type l -name "$LIBNAME""*")
3521
cd $CURRENT
@@ -52,6 +38,8 @@ M_ARCH=`uname -m` # Might return, eg aarch64, x86_64. Raspi running 32bit return
5238
WHOAMI="David Bannon <[email protected]>"
5339
BUILDDATE=`date -R`
5440

41+
42+
5543
function WriteControl () {
5644
if [ "$1" = "DEV" ]; then
5745
echo "Package: $PRODUCT-dev" >> BUILD/DEBIAN/control
@@ -100,24 +88,36 @@ function DebianPackage () {
10088
rm -rf BUILD
10189
mkdir -p BUILD/DEBIAN
10290
mkdir -p BUILD/usr/lib/"$DIR_ARCH"
103-
mkdir -p BUILD/usr/share/doc/"$PRODUCT"
91+
mkdir -p BUILD/usr/share/doc/"$PRODUCT""$MAJORVER"
10492
WriteControl
10593
cp ../"$FULLLIBNAME" BUILD/usr/lib/"$DIR_ARCH"/.
10694
ln -s -r BUILD/usr/lib/"$DIR_ARCH"/"$FULLLIBNAME" BUILD/usr/lib/"$DIR_ARCH"/"$LIBNAME".so."$MAJORVER"."$MINORVER"
10795
ln -s -r BUILD/usr/lib/"$DIR_ARCH"/"$FULLLIBNAME" BUILD/usr/lib/"$DIR_ARCH"/"$LIBNAME".so."$MAJORVER"
10896
# Don't link to base name, Lintian objects 'cos thats the -dev package's job
10997
chmod 0644 BUILD/usr/lib/"$DIR_ARCH"/*
11098

111-
cp copyright "BUILD/usr/share/doc/$PRODUCT/copyright"
99+
cp copyright "BUILD/usr/share/doc/$PRODUCT$MAJORVER/copyright"
112100

113101
echo "activate-noawait ldconfig" > BUILD/DEBIAN/triggers
114102
echo "libQt5Pas $MAJORVER libqt5pas$MAJORVER" > BUILD/DEBIAN/shlibs
115-
gzip -knc --best changelog.libqt5pas >> BUILD/usr/share/doc/"$PRODUCT"/changelog.gz
103+
104+
dch -cchangelog -v "$MAJORVER"."$MINORVER"."$EXTRAVER" -D"unstable" "Release of new version."
105+
if [ -f whatsnew ]; then
106+
echo "---------- Including whatsnew in changelog"
107+
while IFS= read -r Line; do
108+
dch -cchangelog --append "$Line"
109+
done < whatsnew
110+
fi
111+
dch -cchangelog --append "Please see Lazarus at gitlab for further change details."
112+
113+
gzip -knc --best changelog >> BUILD/usr/share/doc/"$PRODUCT$MAJORVER"/changelog.gz
114+
ls -l BUILD/usr/share/doc/"$PRODUCT$MAJORVER"
115+
gzip -knc --best changelog >> changelog.gz
116116
# ------ Make the md5sum file -----------
117117
cd BUILD
118118
md5sum usr/lib/"$DIR_ARCH"/"$LIBNAME".so."$MAJORVER"."$VERSION" > DEBIAN/md5sums
119-
md5sum usr/share/doc/"$PRODUCT"/copyright >> DEBIAN/md5sums
120-
md5sum usr/share/doc/"$PRODUCT"/changelog.gz >> DEBIAN/md5sums
119+
md5sum usr/share/doc/"$PRODUCT$MAJORVER"/copyright >> DEBIAN/md5sums
120+
md5sum usr/share/doc/"$PRODUCT$MAJORVER"/changelog.gz >> DEBIAN/md5sums
121121
cd ..
122122
chmod -R g-w BUILD
123123
fakeroot dpkg-deb -b BUILD/. "$PRODUCT"1_"$VERSION"-"$PACKVER"_"$ARCH".deb
@@ -136,7 +136,7 @@ function DebianPackageDev () {
136136
#cp ../qt62.pas BUILD/usr/share/pascal/qt6/.
137137
chmod 0644 BUILD/usr/share/pascal/qt5/*
138138
cp copyright BUILD/usr/share/doc/"$PRODUCT-dev"/copyright
139-
gzip -knc --best changelog.libqt5pas >> BUILD/usr/share/doc/"$PRODUCT-dev"/changelog.gz
139+
gzip -knc --best changelog >> BUILD/usr/share/doc/"$PRODUCT-dev"/changelog.gz
140140

141141
# ------ Make the md5sum file -----------
142142
cd BUILD
@@ -169,8 +169,8 @@ function MakeRPM () {
169169
echo "========= RPM Devel Package ========"
170170
mkdir -p "$RDIR"/usr/share/doc/"$PRODUCT"-devel
171171
chmod 755 "$RDIR"/usr/share/doc/"$PRODUCT"-devel
172-
cp copyright "$RDIR"/usr/share/doc/"$PRODUCT"-devel/copyright
173-
gzip -knc --best changelog.libqt5pas >> "$RDIR"/usr/share/doc/"$PRODUCT"-devel/changelog.gz
172+
cp copyright "$RDIR"/usr/share/doc/"$PRODUCT"-devel/copyright
173+
gzip -knc --best changelog >> "$RDIR"/usr/share/doc/"$PRODUCT"-devel/changelog.gz
174174
cd "$RDIR"/usr/"$RDIR_ARCH"
175175
ln -s "$FULLLIBNAME" "$LIBNAME".so
176176
cd "$CURRENT"
@@ -186,7 +186,7 @@ function MakeRPM () {
186186
mkdir -p "$RDIR"/usr/share/doc/"$PRODUCT"
187187
chmod 755 "$RDIR"/usr/share/doc/"$PRODUCT"
188188
cp copyright "$RDIR/usr/share/doc/"$PRODUCT"/copyright"
189-
gzip -knc --best changelog.libqt5pas >> "$RDIR"/usr/share/doc/"$PRODUCT"/changelog.gz
189+
gzip -knc --best changelog >> "$RDIR"/usr/share/doc/"$PRODUCT"/changelog.gz
190190
cp ../"$FULLLIBNAME" "$RDIR"/usr/"$RDIR_ARCH"/.
191191
chmod 755 "$RDIR"/usr/"$RDIR_ARCH"/"$FULLLIBNAME"
192192
ln -s -r "$RDIR"/usr/"$RDIR_ARCH"/"$FULLLIBNAME" "$RDIR"/usr/"$RDIR_ARCH"/"$LIBNAME".so."$MAJORVER"."$MINORVER"
@@ -196,7 +196,8 @@ function MakeRPM () {
196196
sed -i "s/^Version:*./Version: ${MAJORVER}.${VERSION}/" "$RDIR"/"$PRODUCT".spec
197197
sed -i "s/^Release:*./Release: ${PACKVER}/" "$RDIR"/"$PRODUCT".spec
198198
sed -i "s/INSERT_FULL_VER/Version: ${FULLVER}/" "$RDIR"/"$PRODUCT".spec
199-
sed -i "s/INSERT_VERSION/${MAJORVER}.${VERSION}/" "$RDIR"/"$PRODUCT".spec
199+
# sed -i "s/INSERT_VERSION/${MAJORVER}.${VERSION}/" "$RDIR"/"$PRODUCT".spec
200+
sed -i "s/INSERT_EXTRAVER/${EXTRAVER}/" "$RDIR"/"$PRODUCT".spec
200201
cp -f "$RDIR"/"$PRODUCT".spec "$PRODUCT""$1".spec-just-used
201202
cd "$RDIR"
202203
fakeroot rpmbuild --target "$M_ARCH" --buildroot "$CURRENT"/"$RDIR" -bb "$PRODUCT".spec
@@ -230,7 +231,7 @@ rm -f *.deb *.rpm *.gz
230231

231232
strip --remove-section=.comment ../"$FULLLIBNAME"
232233

233-
DebianPackage
234+
DebianPackage # do before dev package because it updates the changelog
234235
DebianPackageDev
235236
echo " ====== Finished Building Debs ======="
236237
MakeRPM
@@ -246,10 +247,12 @@ rm -Rf "$TARNAME"
246247
rm -Rf BUILD
247248
ls -ltr
248249

249-
# ------- RESTORE ME --------------- lintian -IiE *.deb
250+
echo "---------------- DEB Lintian Results ----------------------------"
250251

251-
#echo " === OK, now make the rpms with fakeroot bash ./rpm-package.bash <enter> ==="
252+
lintian -IiE *.deb
252253

254+
echo "---------------- RPM Lint Results --------------------------------"
255+
rpmlint -i *.rpm
253256

254257
# --------------- RPM LINT Issues ------------------------------
255258

cbindings/package/rpm-package

+8-1
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,16 @@ function MakeRPM () {
5858
chmod 755 "$RDIR"/usr/share/doc/"$PRODUCT"-devel
5959
cp copyright "$RDIR"/usr/share/doc/"$PRODUCT"-devel/copyright
6060
gzip -knc --best changelog.libqt5pas >> "$RDIR"/usr/share/doc/"$PRODUCT"-devel/changelog.gz
61-
ln -s "$RDIR"/usr/"$RDIR_ARCH"/"$FULLLIBNAME" "$RDIR"/usr/"$RDIR_ARCH"/"$LIBNAME".so
61+
# ln -s "$RDIR"/usr/"$RDIR_ARCH"/"$FULLLIBNAME" "$RDIR"/usr/"$RDIR_ARCH"/"$LIBNAME".so
62+
63+
cd "$RDIR"/usr/"$RDIR_ARCH"
64+
ln -s "$FULLLIBNAME" "$LIBNAME".so
65+
cd "$CURRENT"
66+
6267
cp ../qt5.pas "$RDIR/usr/share/doc/"$PRODUCT"-devel/."
6368
cp libqt5pas-devel.spec "$RDIR"/"$PRODUCT".spec
6469
sed -i "s/INSERT_DEPEND/${PRODUCT} = ${VERSION}, qt5-qtbase-devel/" "$RDIR"/"$PRODUCT".spec
70+
# sed -i "s/INSERT_DEPEND/${PRODUCT} = ${MAJORVER}.${VERSION}/" "$RDIR"/"$PRODUCT".spec
6571
sed -i "s/INSERT_RDIR/${RDIR}/" "$RDIR"/"$PRODUCT".spec
6672
else
6773
echo "==== RPM Lib Package FULLLIBNAME $FULLLIBNAME ==="
@@ -116,6 +122,7 @@ function SetUpArch () {
116122
}
117123

118124

125+
strip --remove-section=.comment ../"$FULLLIBNAME"
119126
SetUpArch
120127
echo "Arch setup version=$VERSION"
121128
MakeRPM

cbindings/package/whatsnew

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
removed QTimer_singleShot4() overload because it cannot be used with Qt5 < 5.10
2+
use QTimer::singleShot() with QObject context from Qt 5.9.0
3+
fixed Qt documentation inconsistency about QTimer::singleShot() overload.

cbindings/refresh.bash

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
# A script, run from the git dir pulled down from https://github.com/davidbannon/libqt5pas
4+
# expects to be run from the cbinding dir.
5+
# It gets the relevent files from gitlab, checks to see if we are out of date
6+
# and updates the local repo if we are.
7+
# After this, you will make the library and then package it. Finally, commit and upload binaries.
8+
9+
# David Bannon, September 4, 2023
10+
11+
12+
LAZARUS_GIT="/home/dbannon/bin/Lazarus/lazarus-git/"
13+
CURRENT=`pwd`
14+
TMP="/tmp"
15+
TMPFILE="lazarus-main-lcl-interfaces-qt5"
16+
TMPPATH="$TMPFILE"/"lcl/interfaces/qt5/cbindings"
17+
DIFFRES=""
18+
19+
cd $TMP
20+
rm -f "$TMPFILE".zip
21+
rm -Rf "$TMPFILE"
22+
23+
wget --output-document="$TMPFILE".zip https://gitlab.com/freepascal.org/lazarus/lazarus/-/archive/main/lazarus-main.zip?path=lcl/interfaces/qt5
24+
unzip -q "$TMPFILE".zip
25+
26+
echo "comparing "$TMP"/"$TMPPATH"/"Qt5Pas.pro" with "$CURRENT"/"Qt5Pas.pro""
27+
28+
DIFFRES=`diff "$TMP"/"$TMPPATH"/"Qt5Pas.pro" "$CURRENT"/"Qt5Pas.pro"`
29+
30+
echo "$DIFFRES"
31+
32+
if [ "$DIFFRES" == "" ]; then
33+
echo "No update needed, we will exit"
34+
exit
35+
fi
36+
37+
echo "--------------- update needed"
38+
rm -Rf "$CURRENT"/"src"
39+
40+
cp -r "$TMP"/"$TMPPATH"/* "$CURRENT"/.
41+
42+
cd "$CURRENT"
43+
git status
44+
45+
echo "you should now type qmake -qt=qt5; make <enter> and wait a while"
46+
echo "After that, run the package-lib script in package dir"

cbindings/src/qtimer_c.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,6 @@ void QTimer_singleShot3(int msec, void (*TimeoutEvent)())
8181
QTimer::singleShot(msec, TimeoutEvent);
8282
}
8383

84-
void QTimer_singleShot4(int msec, const QObjectH context, void (*TimeoutEvent)())
85-
{
86-
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
87-
QTimer::singleShot(msec, (const QObject*)context, TimeoutEvent);
88-
#else
89-
QTimer::singleShot(msec, TimeoutEvent);
90-
#endif
91-
}
92-
9384
void QTimer_start(QTimerH handle, int msec)
9485
{
9586
((QTimer *)handle)->start(msec);

cbindings/src/qtimer_c.h

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ C_EXPORT bool QTimer_isSingleShot(QTimerH handle);
2929
C_EXPORT void QTimer_singleShot(int msec, const QObjectH receiver, const char* member);
3030
C_EXPORT void QTimer_singleShot2(int msec, Qt::TimerType timerType, const QObjectH receiver, const char* member);
3131
C_EXPORT void QTimer_singleShot3(int msec, void (*TimeoutEvent)());
32-
C_EXPORT void QTimer_singleShot4(int msec, const QObjectH context, void (*TimeoutEvent)());
3332
C_EXPORT void QTimer_start(QTimerH handle, int msec);
3433
C_EXPORT void QTimer_start2(QTimerH handle);
3534
C_EXPORT void QTimer_stop(QTimerH handle);

0 commit comments

Comments
 (0)