Please avoid Debianism/Ubuntism in build system (moc-qt4)

Bug #653882 reported by Maciej Mrozowski
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ntrack
Fix Released
High
Alexander Sack
Arch Linux
Fix Released
Undecided
Alex Merry

Bug Description

moc-qt4 is only provided by Debian based distros. If you really need to override Qt4 moc executable (for FreeBSD like changelog says), please allow it by the mean of either configure switch or environment variable.

Also, would it be possible to have a bit of flexibility wrt bindings? For instance --with-qt4 would build Qt4 bindings, --with-glib2 would build glib bindings etc.

Thanks in advance.

Related branches

Revision history for this message
Alexander Sack (asac) wrote :

> moc-qt4 is only provided by Debian based distros. If you really need to override Qt4 moc executable (for FreeBSD like changelog says), please allow it by the mean of either configure switch or environment variable.

yes. i think we could try moc-qt4 and fall back to moc and bail out of none is found?

> Also, would it be possible to have a bit of flexibility wrt bindings? For instance --with-qt4 would build Qt4 bindings, --with-glib2 would build glib bindings etc.

Yes, atm everything is auto probed and disabled/enabled based on whether build dep is available.

I agree the build system could allow more explicit configuration. Please open a new bug for this.

Revision history for this message
Alexander Sack (asac) wrote :

i think its high as this blocks building ntrack on systems that dont have moc-qt4.

Changed in ntrack:
importance: Undecided → High
status: New → Triaged
Alexander Sack (asac)
Changed in ntrack:
milestone: none → 009
assignee: nobody → Alexander Sack (asac)
Revision history for this message
Alexander Sack (asac) wrote :

filed bug 654221 for the binding flexibility requested above.

Revision history for this message
Maciej Mrozowski (reavertm-deactivatedaccount) wrote :

Thanks!

Revision history for this message
Alex Merry (randomguy3) wrote :

=== modified file 'configure.ac'
--- configure.ac 2010-10-03 18:45:55 +0000
+++ configure.ac 2010-10-05 15:31:58 +0000
@@ -105,6 +105,15 @@
         [PKG_CHECK_MODULES(QTCORE, QtCore, ac_have_qt4=1, ac_have_qt4=0)
          AC_SUBST(QTCORE_CFLAGS)
          AC_SUBST(QTCORE_LIBS)])
+if test $ac_have_qt4 = 1; then
+ MOC=`$PKG_CONFIG --variable=moc_location QtCore`
+ AC_PATH_PROGS([MOC], [moc-qt4,moc])
+fi
+AC_SUBST(MOC)
+if test "x$MOC" = "x"; then
+ AC_MSG_WARN([Could not find the moc command, required for Qt4 support.])
+ ac_have_qt4=0
+fi
 AM_CONDITIONAL(HAVE_QT4, test $ac_have_qt4 = 1)

 PKG_CHECK_MODULES(LIBNL, libnl-1, ac_have_libnl=1,ac_have_libnl=0)

=== modified file 'qt4/Makefile.am'
--- qt4/Makefile.am 2010-08-10 20:58:16 +0000
+++ qt4/Makefile.am 2010-10-05 15:33:16 +0000
@@ -75,7 +75,7 @@

 # This rule lets GNU make create any moc_*.cpp from the equivalent *.h
 moc_QNtrack.cpp: QNtrack.h
- moc-qt4 $? -o $@
+ $(MOC) $? -o $@

 CLEANFILES = moc_QNtrack.cpp

Alex Merry (randomguy3)
Changed in archlinux:
assignee: nobody → Alex Merry (randomguy3)
Revision history for this message
Alexander Sack (asac) wrote :

------------------------------------------------------------
revno: 209
fixes bug(s): https://launchpad.net/bugs/653882
committer: Alexander Sack <email address hidden>
branch nick: ntrack
timestamp: Fri 2010-10-08 23:08:28 +0200
message:
  add support for moc binary if moc-qt4 is not available - lp:653882
------------------------------------------------------------

Changed in ntrack:
status: Triaged → Fix Committed
Revision history for this message
Alexander Sack (asac) wrote :

sorry, have no access to mail and didnt see you patch there.

Alex Merry (randomguy3)
Changed in archlinux:
status: New → Fix Committed
Revision history for this message
Alexander Sack (asac) wrote :
Changed in ntrack:
status: Fix Committed → Fix Released
Revision history for this message
Alexander Sack (asac) wrote :

any chance that this ever goes to fixed release for arch linux?

Alex Merry (randomguy3)
Changed in archlinux:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.