pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fix libtool installation problem



Module Name:	pkgsrc-wip
Committed By:	Iain Hibbert <plunky%netbsd.org@localhost>
Pushed By:	plunky
Date:		Sat Jul 30 08:15:40 2016 +0100
Changeset:	35870bf81ce3fe142117fcaba2209c2937534699

Modified Files:
	qcad/Makefile
	qcad/PLIST
	qcad/TODO
	qcad/distinfo
Added Files:
	qcad/patches/patch-src_3rdparty_quazip_quazip.pro
	qcad/patches/patch-src_3rdparty_spatialindexnavel_spatialindexnavel.pro

Log Message:
Fix libtool installation problem

did this by changing libquazip and libspatialindexnavel to be static libs
remove all the temp stuff to test that

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=35870bf81ce3fe142117fcaba2209c2937534699

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 qcad/Makefile                                      | 52 +++++++++--------
 qcad/PLIST                                         | 12 ++--
 qcad/TODO                                          | 65 +---------------------
 qcad/distinfo                                      | 10 ++--
 qcad/patches/patch-src_3rdparty_quazip_quazip.pro  | 20 +++++++
 ...rdparty_spatialindexnavel_spatialindexnavel.pro | 20 +++++++
 6 files changed, 79 insertions(+), 100 deletions(-)

diffs:
diff --git a/qcad/Makefile b/qcad/Makefile
index 20b3643..46645c1 100644
--- a/qcad/Makefile
+++ b/qcad/Makefile
@@ -28,28 +28,36 @@ SUBST_FILES.paths+=	src/core/RS.cpp src/core/RSettings.cpp
 SUBST_SED.paths=	-e 's,@PREFIX@,${PREFIX},g'
 
 # Note: Using pax to install the data files duplicates the lax permissions
-# from the source archive. We use 'umask 133' to prevent this, but we must
+# from the zip archive. We use 'umask 133' to prevent this, but we must
 # create the directories first otherwise they are not searchable.
 # When updating you may need to make the package, update the PLIST and then
 # remake the package to bootstrap the directory permissions
 #
+# XXX Or use the .tar.gz archive available from git but it won't extract properly for me
+#
+#INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 share/applications share/qcad \
+#			lib/qcad/plugins/designer lib/qcad/plugins/script
 AUTO_MKDIRS=	yes
 
-SHLIBS=		libqcadcore.la \
+QCADLIBS=	libqcadcore.la \
+		libqcadecmaapi.la \
 		libqcadentity.la \
 		libqcadgrid.la \
 		libqcadgui.la \
 		libqcadoperations.la \
 		libqcadsnap.la \
+		libqcadspatialindex.la \
 		libqcadstemmer.la \
-		libquazip.la \
-		libspatialindexnavel.la \
+		libqcadzip.la \
 		libdxflib.a \
 		libopennurbs.a \
+		libquazip.a \
+		libspatialindexnavel.a \
 		libstemmer.a \
 		libzlib.a
 
-PLUGINS=	plugins/libqcaddxf.la \
+QCADPLUGINS=	plugins/libqcaddxf.la \
+		plugins/libqcadexample.la \
 		plugins/libtransactionlistener.la \
 		plugins/designer/libqcadcustomwidgets.la \
 		plugins/script/libqcadqtscript_core.la \
@@ -63,33 +71,23 @@ PLUGINS=	plugins/libqcaddxf.la \
 		plugins/script/libqcadqtscript_xml.la \
 		plugins/script/libqcadqtscript_xmlpatterns.la
 
-# XXX these are the files libtool is failing to install
-# XXX enable by 'make FOO='
-PLIST_VARS+=	foo
-.if defined(FOO)
-PLIST.foo=	yes
-SHLIBS+=	libqcadecmaapi.la \
-		libqcadspatialindex.la \
-		libqcadzip.la
-PLUGINS+=	plugins/libqcadexample.la
-.endif
-# XXX
-
 do-configure:
 	cd ${WRKSRC} && ${QTDIR}/bin/qmake
 
 do-install:
-	${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/release/qcad-bin \
-	    ${DESTDIR}${PREFIX}/bin/qcad
-	${INSTALL_DATA} ${WRKSRC}/qcad.desktop ${DESTDIR}${PREFIX}/share/applications
-	${INSTALL_MAN} ${WRKSRC}/qcad.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
-.for x in ${SHLIBS}
-	${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/release/${x} \
-	    ${DESTDIR}${PREFIX}/lib
+	${LIBTOOL} --mode=install ${INSTALL_PROGRAM} \
+	    ${WRKSRC}/release/qcad-bin ${DESTDIR}${PREFIX}/bin/qcad
+	${INSTALL_DATA} ${WRKSRC}/qcad.desktop \
+	    ${DESTDIR}${PREFIX}/share/applications
+	${INSTALL_MAN} ${WRKSRC}/qcad.1 \
+	    ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+.for x in ${QCADLIBS}
+	${LIBTOOL} --mode=install ${INSTALL_LIB} \
+	    ${WRKSRC}/release/${x} ${DESTDIR}${PREFIX}/lib
 .endfor
-.for x in ${PLUGINS}
-	${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/${x} \
-	    ${DESTDIR}${PREFIX}/lib/qcad/${x:ts/:H}
+.for x in ${QCADPLUGINS}
+	${LIBTOOL} --mode=install ${INSTALL_LIB} \
+	    ${WRKSRC}/${x} ${DESTDIR}${PREFIX}/lib/qcad/${x:ts/:H}
 .endfor
 	cd ${WRKSRC} && umask 133 && ${PAX} -rw fonts libraries linetypes \
 	    patterns scripts themes ts ${DESTDIR}${PREFIX}/lib/qcad
diff --git a/qcad/PLIST b/qcad/PLIST
index 064743a..c599a43 100644
--- a/qcad/PLIST
+++ b/qcad/PLIST
@@ -3,17 +3,17 @@ bin/qcad
 lib/libdxflib.a
 lib/libopennurbs.a
 lib/libqcadcore.la
-${PLIST.foo}lib/libqcadecmaapi.la
+lib/libqcadecmaapi.la
 lib/libqcadentity.la
 lib/libqcadgrid.la
 lib/libqcadgui.la
 lib/libqcadoperations.la
 lib/libqcadsnap.la
-${PLIST.foo}lib/libqcadspatialindex.la
+lib/libqcadspatialindex.la
 lib/libqcadstemmer.la
-${PLIST.foo}lib/libqcadzip.la
-lib/libquazip.la
-lib/libspatialindexnavel.la
+lib/libqcadzip.la
+lib/libquazip.a
+lib/libspatialindexnavel.a
 lib/libstemmer.a
 lib/libzlib.a
 lib/qcad/fonts/CourierCad.cxf
@@ -361,7 +361,7 @@ lib/qcad/patterns/metric/triang.pat
 lib/qcad/patterns/metric/zigzag.pat
 lib/qcad/plugins/designer/libqcadcustomwidgets.la
 lib/qcad/plugins/libqcaddxf.la
-${PLIST.foo}lib/qcad/plugins/libqcadexample.la
+lib/qcad/plugins/libqcadexample.la
 lib/qcad/plugins/libtransactionlistener.la
 lib/qcad/plugins/script/libqcadqtscript_core.la
 lib/qcad/plugins/script/libqcadqtscript_gui.la
diff --git a/qcad/TODO b/qcad/TODO
index 6a5f353..f50ee2a 100644
--- a/qcad/TODO
+++ b/qcad/TODO
@@ -1,65 +1,5 @@
-The native build for QCad installs files to release/ and hopes they will
-run from there. pkgsrc needs to move them to the real locations but
-libtool fails to install some files, notably
 
-	release/libqcadecmaapi.la
-	release/libqcadspatialindex.la
-	release/libqcadzip.la
-	plugins/libqcadexample.la
-
- with errors like:
-
-libtool --mode=install /usr/bin/install -c -o plunky -g staff -m 755 /var/work/pkgsrc/wip/qcad/work/qcad-3.15.4.0/release/libqcadecmaapi.la  /var/work/pkgsrc/wip/qcad/work/.destdir/usr/pkg/lib
-libtool: install: error: cannot install `/var/work/pkgsrc/wip/qcad/work/qcad-3.15.4.0/release/libqcadecmaapi.la' to a directory not ending in /
-*** Error code 1
-
- -- I can't see any significant difference in the Makefiles for those libs
-
- -- those generated .la files are the only ones which contain @inst_prefix_dir@
-
- -- adding QMAKE_RPATHDIR=/usr/pkg/lib to .pro file doesn't seem to help (I hoped it would add it to the Makefile)
-
- -- manually adding -rpath /usr/pkg/lib to the Makefile does mean that
-    libtool will install it later, but perhaps thats not quite the answer
-
- -- looking at dependencies:
-
-   libqcadecmaapi => libquazip and libspatialindexnavel
-   libqcadexample => libquazip and libspatialindexnavel
-   libqcadspatialindex => libspatialindexnavel
-   libqcadzip => libquazip
-
- nothing else depends on libquazip or libspatialindexnavel and there are warnings about this
- being unportable during the build, for example while linking libqcadexample
-
---- ../../../plugins/../../../plugins/libqcadexample.la ---
-libtool --silent --mode=link c++ -avoid-version -rpath / -module -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/qt4/lib -Wl,-R/usr/pkg/qt4/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/pkg/qt4/lib -pthread -Wl,-R/usr/pkg/qt4/lib -shared -o ../../../plugins/libqcadexample.la RExamplePlugin.lo  moc_RExamplePlugin.lo    -L/usr/pkg/lib -L/usr/pkg/qt4/lib -L/usr/X11R7/lib -L/var/work/pkgsrc/wip/qcad/work/qcad-3.15.4.0/release -lqcadcore -lqcadgui /var/work/pkgsrc/wip/qcad/work/qcad-3.15.4.0/release/libqcadecmaapi.la -lQtWebKit -lQtScript -lQtScriptTools -lQtSvg -lQtSql -lQtXmlPatterns -lQtXml -lQtOpenGL -lQtGui -lQtNetwork -lQtCore -lQtUiTools -lGLU -lGL -lXmu -lQtDesigner -lQtHelp
-*** [buildlink3] Warning: libtool replaced -lqcadcore with /var/work/pkgsrc/wip/qcad/work/qcad-3.15.4.0/release/libqcadcore.la
-*** [buildlink3] Warning: libtool replaced -lqcadgui with /var/work/pkgsrc/wip/qcad/work/qcad-3.15.4.0/release/libqcadgui.la
-*** Warning: This system can not link to static lib archive /var/work/pkgsrc/wip/qcad/work/qcad-3.15.4.0/release/libqcadecmaapi.la.
-*** I have the capability to make that library automatically link in when
-*** you link to this library.  But I can only do this if you have a
-*** shared version of the library, which you do not appear to have.
-*** But as you try to build a module library, libtool will still create
-*** a static module, that should work as long as the dlopening application
-*** is linked with the -dlopen flag to resolve symbols at runtime.
-*** Warning: Linking the shared library ../../../plugins/libqcadexample.la against the loadable module
-*** libspatialindexnavel.so is not portable!
-*** Warning: Linking the shared library ../../../plugins/libqcadexample.la against the loadable module
-*** libquazip.so is not portable!
-
-so perhaps this is the problem that needs to be surmounted?
-
-
-
-
-XXXX these files are currently disabled in the Makefile, use 'make FOO=' to include them XXXX
-
-
-
-
-Anyway, if I skip those four lib files the generated QCad binary fails, probably because something
-is missing. The application starts ok and asks for initial setup (language, page size, units etc)
+The application starts ok and asks for initial setup (language, page size, units etc)
 but then won't run any more:
 
 QCAD version  3.15.4
@@ -72,5 +12,4 @@ Warning:  At least one uncaught exception:
 Warning:  "<anonymous>()@/usr/pkg/lib/qcad/scripts/Widgets/CommandLine/CommandLine.js:181"
 Debug:    "<global>() at -1"
 
-
-it seems that RTextEdit and RCommandLine have something to do with libqcadecmaapi at least, which was not installed
+I started it with the qcad -enable-script-debugger and it shows that but I don't know anything about it or how to get past it
diff --git a/qcad/distinfo b/qcad/distinfo
index 6dc2183..62dd8be 100644
--- a/qcad/distinfo
+++ b/qcad/distinfo
@@ -4,7 +4,9 @@ SHA1 (qcad-3.15.4.0.zip) = 96962f35a94e0d124e009b43ae1a87d62926483d
 RMD160 (qcad-3.15.4.0.zip) = 1dd7b4c07548ada6c2524f01f6572847d4d483ed
 SHA512 (qcad-3.15.4.0.zip) = 7a6179b65c9f7720c3f2134bc5d11594ebdb3ec6f17cf2ec7030c3375235238851d8b396ecd123aada63ed1946de816587bb53b2dbdc46cc1e1bf1b53ed27ad3
 Size (qcad-3.15.4.0.zip) = 37420539 bytes
-SHA1 (patch-src_3rdparty_dxflib_src_dl__writer.h) = 3e8d283a3de10f8c06341eaaa36a00b1721dae43
-SHA1 (patch-src_core_RS.cpp) = 62c35a6b65fe2712707f47e79fef614af99fadbb
-SHA1 (patch-src_core_RSettings.cpp) = 427df969146c4ed212b820e25d6d464b0769c2ea
-SHA1 (patch-src_run_run.pri) = 66daaea352e183079064ee2a7a159e18dc0b5745
+SHA1 (patch-src_3rdparty_dxflib_src_dl__writer.h) = 21e99b53bcb964c9dc010a6013a5ed9f028738d2
+SHA1 (patch-src_3rdparty_quazip_quazip.pro) = 76f0f38b8e8ac8fc441685ae13a12f68385b5298
+SHA1 (patch-src_3rdparty_spatialindexnavel_spatialindexnavel.pro) = b641f00398fb4d7bc5c80c6597d23252b0667dec
+SHA1 (patch-src_core_RS.cpp) = 04677e154aff2906b20911b1e8c7a6e15546748a
+SHA1 (patch-src_core_RSettings.cpp) = a8f1d9c16c30c605f73239da1121c4d997625032
+SHA1 (patch-src_run_run.pri) = 10f94e46c743e92dd8518bd5bd1ddadb4104a212
diff --git a/qcad/patches/patch-src_3rdparty_quazip_quazip.pro b/qcad/patches/patch-src_3rdparty_quazip_quazip.pro
new file mode 100644
index 0000000..25fa9b8
--- /dev/null
+++ b/qcad/patches/patch-src_3rdparty_quazip_quazip.pro
@@ -0,0 +1,20 @@
+$NetBSD$
+
+libtool won't install libraries depending on this when it is a plugin
+
+--- src/3rdparty/quazip/quazip.pro.orig	2016-06-30 12:42:57.000000000 +0000
++++ src/3rdparty/quazip/quazip.pro
+@@ -2,12 +2,7 @@ include( ../../../shared.pri )
+
+ TARGET = quazip
+ TEMPLATE = lib
+-r_static_libs {
+-    CONFIG += staticlib
+-}
+-else {
+-    CONFIG += plugin
+-}
++CONFIG += staticlib
+
+ CONFIG -= warn_on
+ CONFIG += warn_off
diff --git a/qcad/patches/patch-src_3rdparty_spatialindexnavel_spatialindexnavel.pro b/qcad/patches/patch-src_3rdparty_spatialindexnavel_spatialindexnavel.pro
new file mode 100644
index 0000000..50c4a11
--- /dev/null
+++ b/qcad/patches/patch-src_3rdparty_spatialindexnavel_spatialindexnavel.pro
@@ -0,0 +1,20 @@
+$NetBSD$
+
+libtool won't install libraries depending on this when it is a plugin
+
+--- src/3rdparty/spatialindexnavel/spatialindexnavel.pro.orig	2016-06-30 12:42:57.000000000 +0000
++++ src/3rdparty/spatialindexnavel/spatialindexnavel.pro
+@@ -2,12 +2,7 @@ include( ../../../shared.pri )
+
+ TARGET = spatialindexnavel
+ TEMPLATE = lib
+-r_static_libs {
+-    CONFIG += staticlib
+-}
+-else {
+-    CONFIG += plugin
+-}
++CONFIG += staticlib
+
+ # this is required to compile the spatial index library from navel ltd:
+ #DEFINES += PACKAGE_BUGREPORT=\\\"mhadji%gmail.com@localhost\\\"


Home | Main Index | Thread Index | Old Index