lbellonda / qxmledit

QXmlEdit XML editor. Downloads: https://sourceforge.net/projects/qxmledit/files
http://qxmledit.org
Other
160 stars 46 forks source link

Wrong library versions #73

Closed tieugene closed 3 years ago

tieugene commented 4 years ago

Trying to build Fedora rpms, splitting insto subpackages (separate binary and library subpackages):

bash-5.0$ rpm -q --requires qxmledit-0.9.15-2.fc32.x86_64.rpm 
...
libQXmlEditSessions-0.9.15.so.0()(64bit)
libQXmlEditWidget-0.9.15.so.0()(64bit)

bash-5.0$ rpm -q --requires libqxmledit-devel-0.9.15-2.fc32.x86_64.rpm 
libQXmlEditSessions-0.9.15.so.0()(64bit)
libQXmlEditWidget-0.9.15.so.0()(64bit)

bash-5.0$ rpm -q --provides libqxmledit-0.9.15-2.fc32.x86_64.rpm 
libqxmledit = 0.9.15-2.fc32
libqxmledit(x86-64) = 0.9.15-2.fc32
lbellonda commented 4 years ago

Hello, I am not an expert in spec files, however I can help on it. May you share the spec and the rpms?

Thank you

tieugene commented 4 years ago

May you share the spec and the rpms?

No problem. This is not freshest version, but functionally is OK. Freshest results - rpms, srpms (spec+sources+patches)

lbellonda commented 4 years ago

I have not yet a Fedora environment to test. The SUSE package is slightly different and I can see that there are no naming differences in the SUSE packages. You can enable the verbose output from rpmbuild and check the log. I think that the dependency of the application from libraries is automatically traced by rpmbuild and can be removed from spec. Another possibility is to install only one package avoiding the devel includes; you can try.

tieugene commented 4 years ago

The SUSE package is slightly different and I can see that there are no naming differences in the SUSE packages.

I can't find SUSE rpms for qxmledit-0.9.15 - just qxmledit-0.9.10. Or 0.9.15, but "all-in-one" rpm (binary+libs).

lbellonda commented 4 years ago

You can find SUSE spec here: https://build.opensuse.org/package/view_file/editors/qxmledit/qxmledit.spec?expand=1

To ease testing I enclose:

fake-qxmledit-0.9.15.zip

Best regards

tieugene commented 4 years ago

You can find SUSE spec here: https://build.opensuse.org/package/view_file/editors/qxmledit/qxmledit.spec?expand=1

This works at Fedora, thank you. I will investigate this thing further.

PS. But anyway naming libraries like libQXmlEdit-0.9.15.so.0.9.15 is not good idea IMHO ($${QXMLEDIT_LIB_SUFFIX}).

tieugene commented 4 years ago

Dirty patch, that I use:

--- src/QXmlEdit.pro.orig   2020-07-05 16:48:24.793927681 +0300
+++ src/QXmlEdit.pro    2020-07-05 16:50:42.750346143 +0300
@@ -490,14 +490,14 @@
 else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../build/lib/debug/ -L$$OUT_PWD/../build -lQXmlEditWidget$${QXMLEDIT_LIB_SUFFIX}
 else:symbian: LIBS += -lQXmlEditWidget$${QXMLEDIT_LIB_SUFFIX}
 else:macx: LIBS += -L$(DESTDIR) -lQXmlEditWidget$${QXMLEDIT_LIB_SUFFIX}
-else:unix: LIBS += -L$$OUT_PWD/../build/ -lQXmlEditWidget$${QXMLEDIT_LIB_SUFFIX}
+else:unix: LIBS += -L$$OUT_PWD/../build/ -lQXmlEditWidget
 else:os2: LIBS += -L../build -lQXmlEdtW

 win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../build/lib/release/ -L$$OUT_PWD/../build -lQXmlEditSessions$${QXMLEDIT_LIB_SUFFIX}
 else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../build/lib/debug/ -L$$OUT_PWD/../build -lQXmlEditSessions$${QXMLEDIT_LIB_SUFFIX}
 else:symbian: LIBS += -lQXmlEditSessions$${QXMLEDIT_LIB_SUFFIX}
 else:macx: LIBS += -L$(DESTDIR) -lQXmlEditSessions$${QXMLEDIT_LIB_SUFFIX}
-else:unix: LIBS += -L$$OUT_PWD/../build/ -lQXmlEditSessions$${QXMLEDIT_LIB_SUFFIX}
+else:unix: LIBS += -L$$OUT_PWD/../build/ -lQXmlEditSessions
 else:os2: LIBS += -L../build -lQXEdtSes

 equals(USE_QWTPLOT, "Y") {
--- src/QXmlEditWidget.pro.orig 2020-03-07 21:22:00.000000000 +0300
+++ src/QXmlEditWidget.pro  2020-07-05 16:51:32.277855390 +0300
@@ -54,7 +54,7 @@
   QT       += qml
 }

-TARGET = QXmlEditWidget$${QXMLEDIT_LIB_SUFFIX}
+TARGET = QXmlEditWidget
 os2:TARGET = QXmlEdtW
 TEMPLATE = lib

--- src/sessions/QXmlEditSessions.pro.orig  2020-03-07 21:22:00.000000000 +0300
+++ src/sessions/QXmlEditSessions.pro   2020-07-05 16:52:01.286153650 +0300
@@ -60,7 +60,7 @@
 }

-TARGET = QXmlEditSessions$${QXMLEDIT_LIB_SUFFIX}
+TARGET = QXmlEditSessions
 os2:TARGET = QXEdtSes
 TEMPLATE = lib
lbellonda commented 3 years ago

This issue has been addressed on "devel" branch (the base of next release) using command line parameters and defaults for versioning and suffixes. A switch QXMLEDIT_USE_FAKE_SOURCES has been added to test in no time the outcome of the switches. See INSTALL for details.