Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support GNUInstallDirs #132

Closed
martinkg opened this issue Feb 3, 2016 · 17 comments
Closed

support GNUInstallDirs #132

martinkg opened this issue Feb 3, 2016 · 17 comments
Assignees
Milestone

Comments

@martinkg
Copy link

martinkg commented Feb 3, 2016

Add LIB_SUFFIX cmake convention to support fedora/redhat-style multilib, instead of hard-coding path
SET(VlcQtConfigPackageLocation lib/cmake/VLCQt)

Long-term, probably ought to consider using something like
https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html
instead
vlc-qt-1.0.0-libsuffix.patch.txt

@ntadej
Copy link
Member

ntadej commented Feb 3, 2016

Will CMake properly detect both debug and release libs if cmake files are in separate directories?

@martinkg
Copy link
Author

martinkg commented Feb 3, 2016

sorry can"t answer your question, because of lack of knowledge.

@martinkg
Copy link
Author

martinkg commented Feb 4, 2016

I can send you the build log of the compilation on my linux Fedora 23 machine, maybe it
brings more light into the dark ?
vlc-qt-build-messages.txt

@ntadej
Copy link
Member

ntadej commented Feb 6, 2016

This is helpful. Can you also provide spec file. I can add it to the repo.

@martinkg
Copy link
Author

martinkg commented Feb 6, 2016

Of course, if I can help with it.
At the moment I"am working on a review of the vlc-qt package for the Fedora rpmfusion repo.
It"s not yet complete and it can even tiling changes
https://bugzilla.rpmfusion.org/show_bug.cgi?id=3963

Spec URL: https://martinkg.fedorapeople.org/Review/SPECS/vlc-qt.spec
SRPM URL: https://martinkg.fedorapeople.org/Review/SRPMS/vlc-qt-1.0.0-1.fc23.src.rpm

hopefully you can add the libsuffix patch to your github

@ntadej ntadej added this to the 1.0.x milestone Feb 6, 2016
@ntadej ntadej self-assigned this Feb 6, 2016
ntadej added a commit that referenced this issue Feb 7, 2016
@ntadej
Copy link
Member

ntadej commented Feb 7, 2016

I supported GNUInstallDirs. Please check if this works for you as expected. Otherwise I will just use your patch.

@martinkg
Copy link
Author

martinkg commented Feb 7, 2016

i checked out your version from git.
the libraries will be installed correctly under /usr/lib64/
but the *.cmake files are still leaves under /usr/lib

Directory not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.0.1-1.fc23.x86_64/usr/lib64/cmake/VLCQt
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.0.1-1.fc23.x86_64/usr/lib64/cmake/VLCQt/VLCQt*.cmake

[martin@fc23 SPECS]$ ll /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.0.1-1.fc23.x86_64/usr/lib64/
libVLCQtCore.so libVLCQtCore.so.1.0.0 libVLCQtQml.so.1.0 libVLCQtWidgets.so libVLCQtWidgets.so.1.0.0
libVLCQtCore.so.1.0 libVLCQtQml.so libVLCQtQml.so.1.0.0 libVLCQtWidgets.so.1.0 pkgconfig/
[martin@fc23 SPECS]$ ll /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.0.1-1.fc23.x86_64/usr/lib64/
total 340
lrwxrwxrwx 1 martin martin 19 Feb 7 17:58 libVLCQtCore.so -> libVLCQtCore.so.1.0
lrwxrwxrwx 1 martin martin 21 Feb 7 17:58 libVLCQtCore.so.1.0 -> libVLCQtCore.so.1.0.0
-rwxr-xr-x 1 martin martin 175280 Feb 7 17:58 libVLCQtCore.so.1.0.0
lrwxrwxrwx 1 martin martin 18 Feb 7 17:58 libVLCQtQml.so -> libVLCQtQml.so.1.0
lrwxrwxrwx 1 martin martin 20 Feb 7 17:58 libVLCQtQml.so.1.0 -> libVLCQtQml.so.1.0.0
-rwxr-xr-x 1 martin martin 72696 Feb 7 17:58 libVLCQtQml.so.1.0.0
lrwxrwxrwx 1 martin martin 22 Feb 7 17:58 libVLCQtWidgets.so -> libVLCQtWidgets.so.1.0
lrwxrwxrwx 1 martin martin 24 Feb 7 17:58 libVLCQtWidgets.so.1.0 -> libVLCQtWidgets.so.1.0.0
-rwxr-xr-x 1 martin martin 93256 Feb 7 17:58 libVLCQtWidgets.so.1.0.0
drwxr-xr-x 2 martin martin 4096 Feb 7 17:58 pkgconfig
[martin@fc23 SPECS]$ ll /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.0.1-1.fc23.x86_64/usr/lib/cmake/VLCQt*
/home/martin/rpmbuild/BUILDROOT/vlc-qt-1.0.1-1.fc23.x86_64/usr/lib/cmake/VLCQt:
total 8
-rw-r--r-- 1 martin martin 1469 Feb 7 10:49 VLCQtConfig.cmake
-rw-r--r-- 1 martin martin 1269 Feb 7 17:57 VLCQtConfigVersion.cmake

/home/martin/rpmbuild/BUILDROOT/vlc-qt-1.0.1-1.fc23.x86_64/usr/lib/cmake/VLCQtCore:
total 16
-rw-r--r-- 1 martin martin 364 Feb 7 10:49 VLCQtCoreConfig.cmake
-rw-r--r-- 1 martin martin 1269 Feb 7 17:57 VLCQtCoreConfigVersion.cmake
-rw-r--r-- 1 martin martin 806 Feb 7 17:57 VLCQtCoreTargets-noconfig.cmake
-rw-r--r-- 1 martin martin 3468 Feb 7 17:57 VLCQtCoreTargets.cmake

/home/martin/rpmbuild/BUILDROOT/vlc-qt-1.0.1-1.fc23.x86_64/usr/lib/cmake/VLCQtQml:
total 16
-rw-r--r-- 1 martin martin 507 Feb 7 10:49 VLCQtQmlConfig.cmake
-rw-r--r-- 1 martin martin 1269 Feb 7 17:57 VLCQtQmlConfigVersion.cmake
-rw-r--r-- 1 martin martin 798 Feb 7 17:57 VLCQtQmlTargets-noconfig.cmake
-rw-r--r-- 1 martin martin 3461 Feb 7 17:57 VLCQtQmlTargets.cmake

/home/martin/rpmbuild/BUILDROOT/vlc-qt-1.0.1-1.fc23.x86_64/usr/lib/cmake/VLCQtWidgets:
total 16
-rw-r--r-- 1 martin martin 539 Feb 7 10:49 VLCQtWidgetsConfig.cmake
-rw-r--r-- 1 martin martin 1269 Feb 7 17:57 VLCQtWidgetsConfigVersion.cmake
-rw-r--r-- 1 martin martin 830 Feb 7 17:57 VLCQtWidgetsTargets-noconfig.cmake
-rw-r--r-- 1 martin martin 3489 Feb 7 17:57 VLCQtWidgetsTargets.cmake

@ntadej
Copy link
Member

ntadej commented Feb 7, 2016

Just to make sure, did you build feature/gnuinstalldirs branch?

@martinkg
Copy link
Author

martinkg commented Feb 7, 2016

@ntadej
Copy link
Member

ntadej commented Feb 7, 2016

Interesting that it works for libraries but not for CMake files. I will add your original patch for now and leave this for later as it needs more investigation.

@ntadej ntadej changed the title support LIB_SUFFIX support GNUInstallDirs Feb 7, 2016
@ntadej
Copy link
Member

ntadej commented Feb 7, 2016

Your patch should be in devel branch. If that"s OK for now, I"ll release 1.0.1 with it in today or tomorrow (as I will also be updating to VLC 2.2.2).

@martinkg
Copy link
Author

martinkg commented Feb 7, 2016

That"s ok, many thanks for supporting me.

@ntadej ntadej removed this from the 1.0.x milestone Feb 9, 2016
ntadej added a commit that referenced this issue Aug 11, 2016
ntadej added a commit that referenced this issue Aug 11, 2016
@ntadej
Copy link
Member

ntadej commented Aug 11, 2016

@martinkg Could you please check the latest version feature/gnuinstalldirs branch again.

@martinkg
Copy link
Author

i testet with the last git checkout, but the libraries are installed into /usr/lib, correct is /usr/lib64

RPM build errors:
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git98a0b9a.fc24.x86_64/usr/lib64/libVLCQt_.so._
Directory not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git98a0b9a.fc24.x86_64/usr/lib64/cmake/VLCQt
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git98a0b9a.fc24.x86_64/usr/lib64/cmake/VLCQt/VLCQt*.cmake
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git98a0b9a.fc24.x86_64/usr/lib64/qml/VLCQt/libVLCQt.so
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git98a0b9a.fc24.x86_64/usr/lib64/qml/VLCQt/libVLCQt.so.1.1
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git98a0b9a.fc24.x86_64/usr/lib64/qml/VLCQt/libVLCQt.so.1.1.0
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git98a0b9a.fc24.x86_64/usr/lib64/qml/VLCQt/qmldir
Directory not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git98a0b9a.fc24.x86_64/usr/lib64/qml/VLCQt
[martin@fc24 SPECS]$

[martin@fc24 SPECS]$ ll /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git98a0b9a.fc24.x86_64/usr/lib/
total 528
drwxr-xr-x 6 martin martin 4096 Aug 12 10:38 cmake
drwxr-xr-x 5 martin martin 4096 Aug 12 10:38 debug
lrwxrwxrwx 1 martin martin 19 Aug 12 10:38 libVLCQtCore.so -> libVLCQtCore.so.1.1
lrwxrwxrwx 1 martin martin 21 Aug 12 10:38 libVLCQtCore.so.1.1 -> libVLCQtCore.so.1.1.0
-rwxr-xr-x 1 martin martin 249208 Aug 12 10:38 libVLCQtCore.so.1.1.0
lrwxrwxrwx 1 martin martin 18 Aug 12 10:38 libVLCQtQml.so -> libVLCQtQml.so.1.1
lrwxrwxrwx 1 martin martin 20 Aug 12 10:38 libVLCQtQml.so.1.1 -> libVLCQtQml.so.1.1.0
-rwxr-xr-x 1 martin martin 175296 Aug 12 10:38 libVLCQtQml.so.1.1.0
lrwxrwxrwx 1 martin martin 22 Aug 12 10:38 libVLCQtWidgets.so -> libVLCQtWidgets.so.1.1
lrwxrwxrwx 1 martin martin 24 Aug 12 10:38 libVLCQtWidgets.so.1.1 -> libVLCQtWidgets.so.1.1.0
-rwxr-xr-x 1 martin martin 101552 Aug 12 10:38 libVLCQtWidgets.so.1.1.0
drwxr-xr-x 2 martin martin 4096 Aug 12 10:38 pkgconfig

@ntadej
Copy link
Member

ntadej commented Aug 13, 2016

May it be related with this? It works for me in Ubuntu.

ntadej added a commit that referenced this issue Aug 14, 2016
@ntadej
Copy link
Member

ntadej commented Aug 14, 2016

@martinkg try one more time. It seems I need to include GNUInstallDirs after project call. If this doesn"t fix your build, I will set up a Fedora virtual machine :)

@ntadej
Copy link
Member

ntadej commented Sep 12, 2016

I managed to fix the spec. It builds for me on Fedora 24 and seems OK. I will merge this into 1.1.1 as it also fixes Ubuntu location. Please test, when you can.
Change build to:

%build
%cmake . \
    -DSYSTEM_QML:BOOL=ON \
    -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir}
make %{?_smp_mflags}

Change files to:

%files
%license LICENSE.md
%doc README.md
%{_qt5_libdir}/libVLCQt*.so.*
%dir %{_qt5_libdir}/cmake/VLCQt/
%{_qt5_libdir}/cmake/VLCQt/VLCQt*.cmake
%{_qt5_libdir}/qt5/qml/VLCQt/libVLCQt.so
%{_qt5_libdir}/qt5/qml/VLCQt/libVLCQt.so.1.1
%{_qt5_libdir}/qt5/qml/VLCQt/libVLCQt.so.1.1.0
%{_qt5_libdir}/qt5/qml/VLCQt/qmldir
%dir %{_qt5_libdir}/qt5/qml/VLCQt/

Build with latest feature/gnuinstalldirs branch

@ntadej ntadej modified the milestone: 1.1.1 Sep 17, 2016
@ntadej ntadej closed this as completed in ec4d75c Sep 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants